KosmoKrator

finance

QuickBooks CLI for AI Agents

Use the QuickBooks CLI from KosmoKrator to call QuickBooks tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 6 read 1 write Manual OAuth token auth

QuickBooks CLI Setup

QuickBooks can be configured headlessly with `kosmokrator integrations:configure quickbooks`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure quickbooks --set access_token="$QUICKBOOKS_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor quickbooks --json
kosmokrator integrations:status --json

Credentials

Authentication type: Manual OAuth token oauth2_manual_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token QUICKBOOKS_ACCESS_TOKEN Secret secret yes Access Token
base_url QUICKBOOKS_BASE_URL URL url no Base URL

Call QuickBooks Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call quickbooks.quickbooks_list_invoices '{
  "limit": 1
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:quickbooks quickbooks_list_invoices '{
  "limit": 1
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs quickbooks --json
kosmo integrations:docs quickbooks.quickbooks_list_invoices --json
kosmo integrations:schema quickbooks.quickbooks_list_invoices --json
kosmo integrations:search "QuickBooks" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to QuickBooks.

quickbooks.quickbooks_list_invoices

Read read

List QuickBooks invoices. Returns a list of invoices with key fields. Use the limit parameter to control page size.

Parameters
limit

Generic CLI call

kosmo integrations:call quickbooks.quickbooks_list_invoices '{"limit":1}' --json

Provider shortcut

kosmo integrations:quickbooks quickbooks_list_invoices '{"limit":1}' --json

quickbooks.quickbooks_get_invoice

Read read

Retrieve a QuickBooks invoice by ID. Returns full invoice details including line items, totals, balance, and status.

Parameters
invoice_id

Generic CLI call

kosmo integrations:call quickbooks.quickbooks_get_invoice '{"invoice_id":"example_invoice_id"}' --json

Provider shortcut

kosmo integrations:quickbooks quickbooks_get_invoice '{"invoice_id":"example_invoice_id"}' --json

quickbooks.quickbooks_create_invoice

Write write

Create a new QuickBooks invoice for a customer. Provide customer_id, line_items (array of items with DetailType, Amount, and SalesItemLineDetail), and an optional due_date.

Parameters
customer_id, line_items, due_date

Generic CLI call

kosmo integrations:call quickbooks.quickbooks_create_invoice '{"customer_id":"example_customer_id","line_items":"example_line_items","due_date":"example_due_date"}' --json

Provider shortcut

kosmo integrations:quickbooks quickbooks_create_invoice '{"customer_id":"example_customer_id","line_items":"example_line_items","due_date":"example_due_date"}' --json

quickbooks.quickbooks_list_customers

Read read

List QuickBooks customers. Returns a list of customers with key fields. Use the limit parameter to control page size.

Parameters
limit

Generic CLI call

kosmo integrations:call quickbooks.quickbooks_list_customers '{"limit":1}' --json

Provider shortcut

kosmo integrations:quickbooks quickbooks_list_customers '{"limit":1}' --json

quickbooks.quickbooks_get_customer

Read read

Retrieve a QuickBooks customer by ID. Returns full customer details including name, email, phone, and balance.

Parameters
customer_id

Generic CLI call

kosmo integrations:call quickbooks.quickbooks_get_customer '{"customer_id":"example_customer_id"}' --json

Provider shortcut

kosmo integrations:quickbooks quickbooks_get_customer '{"customer_id":"example_customer_id"}' --json

quickbooks.quickbooks_list_accounts

Read read

List QuickBooks accounts (chart of accounts). Returns a list of accounts with name, type, classification, and balance. Use the limit parameter to control page size.

Parameters
limit

Generic CLI call

kosmo integrations:call quickbooks.quickbooks_list_accounts '{"limit":1}' --json

Provider shortcut

kosmo integrations:quickbooks quickbooks_list_accounts '{"limit":1}' --json

quickbooks.quickbooks_get_current_user

Read read

Get the current user / company info from QuickBooks. Use this to verify the API connection is working.

Parameters
none

Generic CLI call

kosmo integrations:call quickbooks.quickbooks_get_current_user '{}' --json

Provider shortcut

kosmo integrations:quickbooks quickbooks_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

quickbooks.quickbooks_list_invoices

List QuickBooks invoices. Returns a list of invoices with key fields. Use the limit parameter to control page size.

Operation
Read read
Schema command
kosmo integrations:schema quickbooks.quickbooks_list_invoices --json
ParameterTypeRequiredDescription
limit integer no Maximum number of invoices to return (default 10, max 1000).

quickbooks.quickbooks_get_invoice

Retrieve a QuickBooks invoice by ID. Returns full invoice details including line items, totals, balance, and status.

Operation
Read read
Schema command
kosmo integrations:schema quickbooks.quickbooks_get_invoice --json
ParameterTypeRequiredDescription
invoice_id string yes QuickBooks invoice ID.

quickbooks.quickbooks_create_invoice

Create a new QuickBooks invoice for a customer. Provide customer_id, line_items (array of items with DetailType, Amount, and SalesItemLineDetail), and an optional due_date.

Operation
Write write
Schema command
kosmo integrations:schema quickbooks.quickbooks_create_invoice --json
ParameterTypeRequiredDescription
customer_id string yes QuickBooks customer ID to bill.
line_items object yes Array of line items. Each item should include DetailType, Amount, and SalesItemLineDetail with ItemRef.
due_date string no Due date for the invoice in YYYY-MM-DD format.

quickbooks.quickbooks_list_customers

List QuickBooks customers. Returns a list of customers with key fields. Use the limit parameter to control page size.

Operation
Read read
Schema command
kosmo integrations:schema quickbooks.quickbooks_list_customers --json
ParameterTypeRequiredDescription
limit integer no Maximum number of customers to return (default 10, max 1000).

quickbooks.quickbooks_get_customer

Retrieve a QuickBooks customer by ID. Returns full customer details including name, email, phone, and balance.

Operation
Read read
Schema command
kosmo integrations:schema quickbooks.quickbooks_get_customer --json
ParameterTypeRequiredDescription
customer_id string yes QuickBooks customer ID.

quickbooks.quickbooks_list_accounts

List QuickBooks accounts (chart of accounts). Returns a list of accounts with name, type, classification, and balance. Use the limit parameter to control page size.

Operation
Read read
Schema command
kosmo integrations:schema quickbooks.quickbooks_list_accounts --json
ParameterTypeRequiredDescription
limit integer no Maximum number of accounts to return (default 10, max 1000).

quickbooks.quickbooks_get_current_user

Get the current user / company info from QuickBooks. Use this to verify the API connection is working.

Operation
Read read
Schema command
kosmo integrations:schema quickbooks.quickbooks_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.