KosmoKrator

data

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.

QuickBooks CLI Setup

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

Install, configure, and verify
# 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 reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

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

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call quickbooks.quickbooks_list_invoices '{"limit":1}' --json
Provider shortcut
kosmo integrations:quickbooks quickbooks_list_invoices '{"limit":1}' --json

Discovery

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

Discovery commands
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

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

quickbooks.quickbooks_list_invoices

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

Read read
Parameters
limit
Generic call
kosmo integrations:call quickbooks.quickbooks_list_invoices '{"limit":1}' --json
Shortcut
kosmo integrations:quickbooks quickbooks_list_invoices '{"limit":1}' --json

quickbooks.quickbooks_get_invoice

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

Read read
Parameters
invoice_id
Generic call
kosmo integrations:call quickbooks.quickbooks_get_invoice '{"invoice_id":"example_invoice_id"}' --json
Shortcut
kosmo integrations:quickbooks quickbooks_get_invoice '{"invoice_id":"example_invoice_id"}' --json

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.

Write write
Parameters
customer_id, line_items, due_date
Generic call
kosmo integrations:call quickbooks.quickbooks_create_invoice '{"customer_id":"example_customer_id","line_items":"example_line_items","due_date":"example_due_date"}' --json
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

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

Read read
Parameters
limit
Generic call
kosmo integrations:call quickbooks.quickbooks_list_customers '{"limit":1}' --json
Shortcut
kosmo integrations:quickbooks quickbooks_list_customers '{"limit":1}' --json

quickbooks.quickbooks_get_customer

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

Read read
Parameters
customer_id
Generic call
kosmo integrations:call quickbooks.quickbooks_get_customer '{"customer_id":"example_customer_id"}' --json
Shortcut
kosmo integrations:quickbooks quickbooks_get_customer '{"customer_id":"example_customer_id"}' --json

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.

Read read
Parameters
limit
Generic call
kosmo integrations:call quickbooks.quickbooks_list_accounts '{"limit":1}' --json
Shortcut
kosmo integrations:quickbooks quickbooks_list_accounts '{"limit":1}' --json

quickbooks.quickbooks_get_current_user

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

Read read
Parameters
none
Generic call
kosmo integrations:call quickbooks.quickbooks_get_current_user '{}' --json
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 1 parameters
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 1 parameters
Schema command
kosmo integrations:schema quickbooks.quickbooks_get_invoice --json
ParameterTypeRequiredDescription
invoice_id string yes QuickBooks invoice ID.
quickbooks.quickbooks_create_invoice 3 parameters
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 1 parameters
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 1 parameters
Schema command
kosmo integrations:schema quickbooks.quickbooks_get_customer --json
ParameterTypeRequiredDescription
customer_id string yes QuickBooks customer ID.
quickbooks.quickbooks_list_accounts 1 parameters
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 0 parameters
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.