KosmoKrator

other

Freeagent CLI for CI

Use the Freeagent CLI for CI with headless JSON commands, schema discovery, credentials, and permission controls.

9 functions 7 read 2 write Manual OAuth token auth

Freeagent CLI for CI

Run integration calls from CI jobs with JSON output, explicit credentials, and predictable exit status.

Use this shape when a pipeline needs to read or update an external service. The Freeagent CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Freeagent CLI for CI
kosmokrator integrations:configure freeagent --set access_token="$FREEAGENT_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call freeagent.freeagent_list_invoices '{"status":"example_status","from_date":"example_from_date","to_date":"example_to_date","contact":"example_contact","project":"example_project","page":1,"per_page":1}' --json

Discovery Before Execution

Agents and scripts can inspect Freeagent docs and schemas before choosing a function.

kosmo integrations:docs freeagent --json
kosmo integrations:docs freeagent.freeagent_list_invoices --json
kosmo integrations:schema freeagent.freeagent_list_invoices --json
kosmo integrations:search "Freeagent" --json
kosmo integrations:list --json

Useful Freeagent CLI Functions

FunctionTypeParametersDescription
freeagent.freeagent_list_invoices Read status, from_date, to_date, contact, project, page, per_page List invoices from FreeAgent. Returns a paginated list of invoices with their details. Supports filtering by status (Draft, Sent, Cancelled, Late Paid, Paid), date range, contact, and project.
freeagent.freeagent_get_invoice Read invoice_id Get the full details of a specific invoice from FreeAgent, including line items, totals, contact information, and status.
freeagent.freeagent_create_invoice Write contact, dated_on, invoice_items, due_on, reference, currency, comments, project Create a new invoice in FreeAgent. Requires a contact and at least one line item. Supports setting due date, currency, invoice items with quantities and prices, and comments.
freeagent.freeagent_list_contacts Read view, order, created_since, updated_since, page, per_page List contacts from FreeAgent. Returns a paginated list of contacts including customers, suppliers, and employees. Supports filtering and sorting.
freeagent.freeagent_get_contact Read contact_id Get the full details of a specific contact from FreeAgent, including name, email, company, billing address, and contact type.
freeagent.freeagent_create_contact Write first_name, last_name, organisation_name, email, phone_number, contact_type, billing_email, address1, address2, town, region, postcode, country Create a new contact in FreeAgent. Contacts can be customers, suppliers, or employees. Provide at least a name (first_name/last_name for individuals or organisation_name for companies).
freeagent.freeagent_list_projects Read view, contact, page, per_page List projects from FreeAgent. Returns project names, status, budget, associated contacts, and time tracking information.
freeagent.freeagent_list_expenses Read from_date, to_date, contact, project, page, per_page List expenses from FreeAgent. Returns expense claims with amounts, categories, dates, and associated projects or contacts.
freeagent.freeagent_get_current_user Read none Get the currently authenticated FreeAgent user profile. Returns user details like name, email, role, and company information. Useful for verifying the connection and understanding which account is active.

Automation Notes

Related Freeagent CLI Pages