accounting
Invoice Ninja CLI for Shell Scripts
Use the Invoice Ninja CLI for shell scripts with headless JSON commands, schema discovery, credentials, and permission controls.
8 functions 6 read 2 write API token auth
Invoice Ninja CLI for Shell Scripts
Call integration functions from shell scripts with stable JSON input and output.
Use shell scripts for small local automations that need one or more integration calls. The Invoice Ninja CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Invoice Ninja CLI for Shell Scripts
kosmokrator integrations:configure invoiceninja --set api_token="$INVOICENINJA_API_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call invoiceninja.invoiceninja_list_invoices '{"per_page":1,"page":1,"client_id":"example_client_id","status":"example_status","number":"example_number","sort":"example_sort"}' --json Discovery Before Execution
Agents and scripts can inspect Invoice Ninja docs and schemas before choosing a function.
kosmo integrations:docs invoiceninja --json
kosmo integrations:docs invoiceninja.invoiceninja_list_invoices --json
kosmo integrations:schema invoiceninja.invoiceninja_list_invoices --json
kosmo integrations:search "Invoice Ninja" --json
kosmo integrations:list --json Useful Invoice Ninja CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
invoiceninja.invoiceninja_list_invoices | Read | per_page, page, client_id, status, number, sort | List invoices from Invoice Ninja. Supports filtering by client, status, and date range with pagination. |
invoiceninja.invoiceninja_get_invoice | Read | id | Get a single invoice from Invoice Ninja by ID. Returns full invoice details including line items, client info, and payment status. |
invoiceninja.invoiceninja_create_invoice | Write | client_id, line_items, due_date, date, public_notes, private_notes, discount, is_amount_discount, tax_name1, tax_rate1, partial, partial_due_date | Create a new invoice in Invoice Ninja. Requires a client_id and at least one line item. Supports custom due dates, partial deposits, and notes. |
invoiceninja.invoiceninja_list_clients | Read | per_page, page, search, id_number, sort | List clients from Invoice Ninja. Supports filtering by name, email, and ID number with pagination. |
invoiceninja.invoiceninja_create_client | Write | name, contacts, id_number, vat_number, website, phone, address1, address2, city, state, postal_code, country_id, private_notes, public_notes | Create a new client in Invoice Ninja. Provide name and at least one contact with an email address. |
invoiceninja.invoiceninja_list_products | Read | per_page, page, product_key, sort, is_deleted | List products from Invoice Ninja. Supports filtering by product key, custom value, and text search with pagination. |
invoiceninja.invoiceninja_list_payments | Read | per_page, page, client_id, invoice_id, status, sort | List payments from Invoice Ninja. Supports filtering by client, invoice, status, and date range with pagination. |
invoiceninja.invoiceninja_get_current_user | Read | none | Get the profile of the currently authenticated Invoice Ninja user. Useful for verifying connection details and account information. |
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.