The am CLI

Install and sign in to the am command-line client, and run Amanucci's task catalog as terminal commands.

am is the Amanucci command-line client. It is a client of the same /v1 API as the web app: each domain command runs exactly one API operation.

Requirements

Node.js 24.19.0 or newer.

Point it at the API

Every command needs an explicit origin, from --base-url or the environment:

export AMANUCCI_BASE_URL=https://api.amanucci.com

Sign in

am login

am login asks for your email, sends you a one-time code, and asks for the code with hidden input. It needs an interactive terminal: there is no flag or environment variable for the code, and no browser opens. The session is saved for that origin under ~/.config/amanucci (or AMANUCCI_CONFIG_DIR), readable only by you.

Other account commands:

CommandDoes
am step-upproves presence with a fresh code, for signed acts and creating a key (valid 15 minutes)
am keys create / list / revokemanages your own API keys
am auth forgetremoves the saved session from this machine
am invite acceptaccepts an invitation in the terminal

For scripts, set AMANUCCI_API_KEY instead of signing in. Set AMANUCCI_HAT to the seat you act in (see Authentication).

Commands are the task catalog

Domain commands have the shape am <noun> <verb> [action]. They are generated from the same task catalog the MCP server exposes. To see them all:

am --help
am books inspect --help

A few of the tasks:

CommandDoes
am workspace inspect selfyour identity and your seats
am documents exchange upload <file>…uploads one or more files
am documents inspect listlists sales documents
am matching inspect bank_transactionslists bank movements and their match status
am matching review confirmconfirms a proposed match
am cases inspect requestslists the questions on an entity
am filings prepare generategenerates a filing from a locked period
am filings signsigns a filing (session and step-up only)

Input and output

Request parameters go in one JSON object with path, query and body keys, passed with --input <file> or --input - for stdin. It is validated against the operation's schema before anything is sent.

echo '{"path":{"entityId":"0192f0c4-..."},"query":{"limit":50,"direction":"inbound"}}' \
  | am documents inspect list --input - --json

Without --json, results print as tables. With --json, one record is written to stdout with operationId, status and the unchanged data. Binary results, such as an invoice PDF, need --output <file>; an existing file is never overwritten.

Uploading files

am documents exchange upload receipt.pdf invoice.pdf --input upload.json --json

with upload.json:

{ "path": { "entityId": "0192f0c4-..." }, "body": { "kind": "pdf" } }

For each file, the command asks the API for an upload URL, sends the bytes straight to storage, and finalizes the file. Several files form one batch, and the batch id is printed. A file the books already hold is reported, not uploaded again. If a run stops partway, continue the same batch with --batch <id>. Nothing is retried automatically.

Exit codes

ExitMeaning
0success
2the command, options or input were refused locally
3the API refused the request (the problem is printed unchanged)
4the request could not be sent
5the response was not what the contract declares
6a local file could not be read or written
130interrupted