accounting
FreshBooks CLI for Headless Automation
Use the FreshBooks CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
8 functions 7 read 1 write Bearer token auth
FreshBooks CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. The FreshBooks CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# FreshBooks CLI for Headless Automation
kosmokrator integrations:configure freshbooks --set access_token="$FRESHBOOKS_ACCESS_TOKEN" --set account_id="$FRESHBOOKS_ACCOUNT_ID" --enable --read allow --write ask --json
kosmo integrations:call freshbooks.freshbooks_list_invoices '{"search":"example_search","page":1,"per_page":1}' --json Discovery Before Execution
Agents and scripts can inspect FreshBooks docs and schemas before choosing a function.
kosmo integrations:docs freshbooks --json
kosmo integrations:docs freshbooks.freshbooks_list_invoices --json
kosmo integrations:schema freshbooks.freshbooks_list_invoices --json
kosmo integrations:search "FreshBooks" --json
kosmo integrations:list --json Useful FreshBooks CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
freshbooks.freshbooks_list_invoices | Read | search, page, per_page | List invoices from FreshBooks. Returns invoice details including status, amounts, client info, and dates. Supports filtering by status, client, date range, and more. |
freshbooks.freshbooks_get_invoice | Read | invoice_id | Get details of a specific FreshBooks invoice by ID. Returns full invoice data including line items, amounts, client details, status, and payment info. |
freshbooks.freshbooks_create_invoice | Write | client_id, lines, date, due_date, invoice_number, notes, terms, discount_value, discount_type | Create a new invoice in FreshBooks. Requires at minimum a client ID and line items. Supports setting due date, notes, discount, and other invoice fields. |
freshbooks.freshbooks_list_clients | Read | search, page, per_page | List clients from FreshBooks. Returns client details including name, email, company, and balance. Supports filtering and pagination. |
freshbooks.freshbooks_get_client | Read | client_id | Get details of a specific FreshBooks client by ID. Returns full client profile including contact info, company details, and outstanding balance. |
freshbooks.freshbooks_list_projects | Read | search, page, per_page | List projects from FreshBooks. Returns project details including title, description, billing method, budget, and active status. Supports filtering and pagination. |
freshbooks.freshbooks_list_payments | Read | search, page, per_page | List payments from FreshBooks. Returns payment details including amount, date, client, invoice, and payment method. Supports filtering and pagination. |
freshbooks.freshbooks_get_current_user | Read | none | Get the profile of the currently authenticated FreshBooks user. Returns user details including name, email, and linked business/member information. Useful for verifying connection and identity. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.