CLI
ac-co — a schema-driven command line over accounting-mcp, built on @repo/sdk.
@repo/cli ships the ac-co command — a schema-driven CLI over accounting-mcp (see SDK for how that relates to the REST Public API documented elsewhere on this site). It doesn't hand-write a command per product domain: it reads the live tool list from accounting-mcp and generates one subcommand per tool, with flags derived from that tool's JSON Schema. Add a tool on the server and it shows up in the CLI automatically.
Install and log in
bun add -g @repo/cli # or run via bunx / your workspace's bin
ac-co login --key ac_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxlogin verifies the key against the server, then stores it under ~/.config/ac-co/ (or $XDG_CONFIG_HOME/ac-co) along with a cached copy of the tool list, so ac-co <tool> --help works offline once you've logged in.
Auth resolution order: --api-key flag > AC_CO_API_KEY environment variable > the stored credential. Same precedence for the server URL: --api-url flag > AC_CO_API_URL > stored > the SDK's local-development default.
Everyday commands
ac-co tools # list every available tool — the full API surface
ac-co search_invoices --status unpaid # any tool as a subcommand, flags generated from its schema
ac-co call reconcile_invoice '{"invoice_id":"…"}' # raw JSON escape hatch, any tool by name
ac-co upload invoice.pdf contract.pdf # ingest + auto-classify files
ac-co status # show the configured server and whether a key is stored
ac-co logout # remove the stored keyac-co tools --refresh re-fetches the tool list (and its cached flags) from the server — run it after a new tool ships if ac-co <newTool> --help doesn't show up yet.
Output and scripting
Every command supports -j / --json for machine-readable output (this is also the default when stdout is piped), and --agent for JSON output with no interactive prompts — useful for CI or another agent driving the CLI. Any tool's arguments can also be piped in as JSON:
echo '{"invoice_id":"…"}' | ac-co call reconcile_invoice --stdin
cat args.json | ac-co search_invoices --stdinGlobal flags
| Flag | Purpose |
|---|---|
-j, --json | Force JSON output |
--agent | JSON output, no prompts |
--api-key <key> | Override the stored API key for this invocation |
--api-url <url> | Override the server URL for this invocation |
Run ac-co --help or ac-co <tool> --help for the full, always-current command list and per-tool flags — since both are generated from the live schema, they never drift from what the server actually accepts.