Open source · MIT · Freelance management for your AI agent

Track Time. Send Invoices.
Keep It Simple.

Fretwork isn't an app you open. It lives inside the AI agent you already talk to — Grok Bot, Hermes, OpenClaw, Claude, Cursor — and gives it time tracking, invoicing, expenses, and a light CRM. No account, no server, nothing phones home. Your data is one SQLite file on your machine. Paste one line to your agent and it installs everything.

Paste to your agent
Read https://raw.githubusercontent.com/ryanlanciaux/fretwork.ai/refs/heads/main/AGENT.md and follow it to install Fretwork on this machine, set up my database and business profile, and connect it to yourself. Ask me for my business name, billing email, and a logo image file if I have one.

MIT licensed · Local SQLite, your machine · No accounts, no telemetry

Already installed? Tell your agent "upgrade Fretwork" — it re-runs the install (fretwork upgrade). Your data stays put.

How it works

Talk to Your Data

Your agent reads AGENT.md, installs Fretwork from GitHub with one npm install, creates your database, and connects itself as an MCP server (Grok Bot, Claude, Cursor, Hermes, OpenClaw, OpenCode, Codex…) — or drives the fretwork CLI, same operations. Then you just talk.

Show me my invoices

12:14 AM
Accessing invoice records…

You have one invoice:

#ClientDateAmountStatus
INV-2026-001Acme CorpMay 9, 2026$1,415.38Paid

Want to do anything with it, or create a new one?

Log 4.5 hours for Acme on the redesign

12:15 AM
Logging time entry…

Logged 4.5 hours against Acme Corp for May 9. Unbilled total is now 11h. Want to invoice May yet?

Yeah — invoice Acme for May and render the PDF

7:43 AM
Creating invoice and rendering…

Created INV-2026-002 for Acme Corp · 11h × $200/hr + 8.875% tax = $2,396.13. PDF saved to ~/.fretwork/invoices/INV-2026-002/invoice.pdf.

Capabilities

Everything It Can Do

58 operations, each available two ways over the same local database: as an MCP tool for agents that attach local servers, and as a CLI command (every command takes --json). Agents can read the same table as markdown at /CAPABILITIES.md.

MCP toolCLIWhat it does
Clients
list_clientsfretwork clients listList clients, optionally by status (prospect / lead / client / archived).
get_clientfretwork clients get <slug>One client by slug or id.
add_clientfretwork clients add <name>Create a client; slug is derived from the name.
update_clientfretwork clients update <slug>Change name, email, rate, address, status.
promote_clientfretwork clients promote <slug>Advance prospect → lead → client (or set explicitly).
archive_clientfretwork clients archive <slug>Soft-delete; keeps history and reports intact.
delete_clientfretwork clients delete <slug>Hard-delete; refused while anything still references the client.
Time
log_timefretwork time logLog billable hours against a client (decimal hours, ISO date).
list_time_entriesfretwork time listEntries with client / date-range / unbilled / project filters.
get_time_entryfretwork time get <id>One entry by id.
update_time_entryfretwork time update <id>Edit an entry; refused once it's on an invoice.
delete_time_entryfretwork time delete <id>Delete an entry; refused once it's on an invoice.
summarise_timefretwork time summaryHours, unbilled hours and revenue per client over a range.
Timer
start_timerfretwork time startStart a running timer (client can be set later).
stop_timerfretwork time stopStop and log the elapsed time as an entry.
get_active_timerfretwork time statusShow the running timer, if any.
cancel_timerfretwork time cancelDiscard the running timer without logging.
update_active_timerfretwork time timer-updateChange the running timer's client / project / description / rate in place.
Expenses & activity
add_expensefretwork expenses addExpense with an amount, or a dated activity record (mileage, meeting) without one.
list_expensesfretwork expenses listFilter by client, dates, category, billable, unbilled.
get_expensefretwork expenses get <id>One record by id.
update_expensefretwork expenses update <id>Patch fields; can clear the amount.
delete_expensefretwork expenses delete <id>Delete a record.
Invoices
list_invoicesfretwork invoices listInvoices, optionally by client or status.
get_invoicefretwork invoices get <number>One invoice with line items.
create_invoicefretwork invoices createFrom a client's unbilled time over a date range, explicit line items, or both.
update_invoiceEdit notes, dates, tax rate, currency (not on paid/void invoices).
set_invoice_statusfretwork invoices status <number> <status>draft → sent → paid / overdue / void; timestamps set automatically.
list_overdue_invoicesfretwork invoices overdueUnpaid invoices past due, with days overdue.
reconcile_overdue_invoicesfretwork invoices overdue --markMark past-due 'sent' invoices as overdue. Idempotent.
delete_invoicefretwork invoices delete <number>Delete; releases its time entries back to unbilled.
render_invoice_htmlfretwork invoices render <number>The invoice as HTML (Mustache template you can customise).
generate_invoice_pdffretwork invoices pdf <number>PDF via your own Chrome, rendered fully offline.
Payments
record_paymentfretwork invoices pay <number>Record a full or partial payment; marks paid when settled.
list_paymentsfretwork invoices paymentsPayments for one invoice or all.
delete_paymentfretwork invoices payment-delete <id>Remove a payment; reopens the invoice if it drops below total.
Recurring invoices
add_recurring_invoicefretwork recurring addRetainers and subscriptions: weekly / monthly / quarterly / yearly templates.
list_recurring_invoicesfretwork recurring listTemplates, with filters.
get_recurring_invoicefretwork recurring get <id>One template.
update_recurring_invoicefretwork recurring update <id>Pause / resume, change cadence or line items.
delete_recurring_invoicefretwork recurring delete <id>Delete a template.
run_recurring_invoicesfretwork recurring runGenerate every invoice that's due. Safe to run daily.
upcoming_recurring_invoicesfretwork recurring upcomingPreview the next issuances without creating anything.
CRM
add_crm_notefretwork crm noteA dated touchpoint note, optionally with a follow-up date.
list_crm_notesfretwork crm notesNotes by client / date range.
get_crm_notefretwork crm note-get <id>One note.
update_crm_notefretwork crm note-update <id>Edit body, date, follow-up, client.
delete_crm_notefretwork crm note-delete <id>Delete a note.
list_followupsfretwork crm followupsClients you haven't talked to in N days (default 14).
Business profile
get_configfretwork config showBusiness name, email, address, logo, rate, currency, tax, due days.
update_configfretwork config setChange any of those (the CLI copies a logo file into ~/.fretwork for you).
init_configfretwork initFirst-run setup; creates the empty database.
Reports & data
financial_reportfretwork report financialTotals by status, revenue and outstanding per client.
export_datafretwork exportVersioned JSON snapshot of everything — backup or move machines.
import_datafretwork import <file>Restore: merge (default) or replace (requires confirmation; a backup is written first).
Invoice template
print_invoice_templatefretwork template printCurrent template HTML (your copy, or the bundled default).
write_invoice_templatefretwork template writeReplace it; validated first, previous version kept as .bak.
reset_invoice_templatefretwork template resetBack to the bundled default.
CLI only
fretwork upgradeUpgrade to the latest version from GitHub; data and settings untouched.
fretwork install --host <ids> --yesWire the MCP server + skill into Hermes, OpenClaw, Claude Code, Claude Desktop, Cursor, OpenCode, Codex, Grok Build.
fretwork skill path | printLocate or print the bundled SKILL.md / HELP.md (to save as a skill in hosts like Grok Bot).
fretwork template path | show-defaultWhere your template lives; the bundled default for diffing.

Follow me on

I post what I'm building with Fretwork and the agents it runs in. Questions, bugs, ideas — that's the place.

@ryanlanciaux