Command-line interface
The vestiarion command: log in once, read records and the agent's decisions, add records after a confirmation, and verify exports and webhooks offline.
The vestiarion command is this API from a terminal. With it you can:
- read a workspace's status, bills, invoices, counterparties, milestones and treasury;
- read the agent's decisions, with its reasoning;
- add records, after it shows what it will send and asks;
- save a payment's evidence, a bill's receipt, the payee lock's evidence and a month's close pack as signed files;
- check those files, an audit export and a webhook delivery's signature, offline.
It is built on the TypeScript SDK and needs Node 20 or later.
Install
npm install --global @vestiarion/cli
vestiarion --helpOr run it without installing:
npx @vestiarion/cli --helpThe package is @vestiarion/cli on npm. This site serves the same package, byte for byte:
npm install --global https://www.vestiarion.xyz/cli/vestiarion-cli-0.2.0.tgzLog in
Create a workspace API key first: an owner or an admin does it on the workspace's Settings page, under API keys. Then:
vestiarion login
vestiarion whoamilogin asks for the key without showing it. It checks the key with one read, GET /api/v1/status, and saves it only if the API accepts it. To pipe the key in instead, add --stdin. It never takes the key as an argument, so the key stays out of your shell history.
whoami answers with:
- the workspace's name;
- its network, from the chain of its operating account:
ARC-TESTNETis Arc testnet,ARCis Arc mainnet; - whether payments are
live,simulateorunavailable, and when the agent last ran; - the key's prefix, and where the key came from.
The API does not say whether a key may also add records. Settings lists each key as Read only or Read and write, and a write with a read-only key answers 403.
Where the key comes from
Each command takes the first key it finds:
--api-key, for one command. A flag stays in your shell history, so prefer the next two.- The
VESTIARION_API_KEYenvironment variable. - A profile saved by
vestiarion login: the one--profilenames, elseVESTIARION_PROFILE, elsedefault.
The API is https://www.vestiarion.xyz unless --base-url or VESTIARION_BASE_URL names another, such as your own deployment. A profile keeps the base URL its key was checked against: only that key is sent there, and that key is sent nowhere else. With a --base-url or VESTIARION_BASE_URL that names another API, a saved key is refused (exit 3); log in to that API under another profile. Plain http is refused, except to localhost.
Where profiles are saved
| System | File |
|---|---|
| Windows | %APPDATA%\vestiarion\config.json |
| macOS and Linux | $XDG_CONFIG_HOME/vestiarion/config.json, or ~/.config/vestiarion/config.json |
The file is readable by you alone. On macOS and Linux it has mode 0600. On Windows, %APPDATA% is inside your user profile, whose permissions let only you, administrators and the system read it. vestiarion logout removes a profile from it; the key itself keeps working until an owner or an admin revokes it.
The CLI never prints a key. It names one by its prefix, vxk_<prefix>_…, as Settings lists it.
Commands
Each command calls one or two API operations, and nothing the API does not have.
| Command | Operation |
|---|---|
vestiarion whoami | Get workspace status and Get the treasury |
vestiarion status | Get workspace status |
vestiarion bills list, vestiarion bills show | List invoices, payables only |
vestiarion bills add | Add an invoice, as a payable |
vestiarion invoices list, vestiarion invoices show | List invoices, receivables only |
vestiarion invoices create | Add an invoice, as a receivable |
vestiarion counterparties list | List counterparties |
vestiarion counterparties show | Get a counterparty |
vestiarion counterparties add | Add a counterparty |
vestiarion milestones list, vestiarion milestones show | List milestones |
vestiarion milestones add | Add a milestone |
vestiarion payee-links create | Create a payee link |
vestiarion decisions list, vestiarion decisions show | List ledger entries the agent wrote |
vestiarion ledger list | List ledger entries |
vestiarion ledger check | Verify the ledger |
vestiarion treasury | Get the treasury |
vestiarion insights | Get insights |
vestiarion evidence export --bill | Get a payable's evidence |
vestiarion evidence export --milestone | Get a milestone's evidence |
vestiarion evidence export --receipt | Get a payable's receipt |
vestiarion evidence export --payee-lock | Get the payee lock's evidence |
vestiarion close-pack export | Get a monthly close pack |
vestiarion ledger verify | None: an audit export, checked offline |
vestiarion evidence verify, vestiarion close-pack verify | None: an evidence file or a close pack, checked offline |
vestiarion webhooks verify | None: a delivery, checked offline |
Every command has --help, with its options and an example:
vestiarion bills list --status held
vestiarion bills show 9440f32c-000d-4a63-97f1-4eb6bf78439f
vestiarion decisions list --domain ap --all
vestiarion counterparties list --role vendor --json- One page at a time. A list answers one page, as the API pages it.
--limitsets its size, up to 200.--cursorcontinues from the cursor a page printed, and--allreads every page. - The agent's decisions.
decisions listreads the entries the agent signed into the ledger, oldest first, with the reasoning each one records. Store the last page's cursor to read only what is new next time. - Showing one record. The API has no single-record endpoint for invoices, milestones or ledger entries. So
bills show,invoices show,milestones showanddecisions showread the list page by page until they find the record. They stop looking after 10,000 records: the most recent ones, or fordecisions showthe agent's first 10,000 entries.list --all --jsonreads further. - What it does not do. The API does not list webhook endpoints: an owner or an admin manages them in Settings. And no key approves, rejects or pays, so neither does the CLI.
Add records
A key with write access adds bills, invoices, counterparties, milestones and payee links:
vestiarion counterparties add --name "Quill Studio" --role vendor --address 0x5b2d8c1f0e7a4936b8d1c0e2f3a4b5c6d7e8f901 --payment-limit 500
vestiarion bills add --counterparty dc5e5751-3287-46c9-8bd1-83a42ab02699 --amount 420.00 --due 2026-10-31 --po PO-4012 --goods-received --idempotency-key billing-inv-42
vestiarion milestones add --contractor 26d6ffed-356d-474a-8d42-89bc942f6b4e --title "CSV export for EURC" --amount 150.00 --verification-source https://github.com/acme/app/pull/42
vestiarion payee-links create --counterparty 26d6ffed-356d-474a-8d42-89bc942f6b4eBefore it sends a write, the CLI prints the method, the URL, the key's prefix and the body, says what follows, and asks Send it? [y/N]:
--yessends without asking.- Without a terminal to ask in, and without
--yes, it sends nothing and exits with2.
ImportantAn added bill is decided by the agent
The agent decides a bill added from the CLI as it decides one typed into the console, with every guardrail. Within its limits it may pay it, on the workspace's network. That is the agent's decision under the workspace's rules; the CLI itself never approves or pays.
- An address waits. An address added this way, or entered by a payee through a link, waits for a person in the workspace to confirm it. Until then the agent pays nothing to it.
- A milestone starts pending. GitHub verifies it once its pull request is merged, or a person does; then the agent decides.
- Reruns are safe with your own id.
--idempotency-keyis sent as theIdempotency-Key, so running the same command again cannot add the record twice. Without it, each run sends a new key. - A payee link takes no key. Its link is printed once: the API keeps only its hash.
Evidence and close packs
A read key saves the signed files the workspace's pages download: a payment's evidence, a paid bill's receipt, the payee lock's evidence and a month's close pack. Each names members by user id, never by email.
vestiarion evidence export --bill 9440f32c-000d-4a63-97f1-4eb6bf78439f
vestiarion evidence export --milestone 26d6ffed-356d-474a-8d42-89bc942f6b4e
vestiarion evidence export --receipt 9440f32c-000d-4a63-97f1-4eb6bf78439f
vestiarion evidence export --payee-lock --from 2026-10-01 --to 2026-10-31
vestiarion close-pack export 2026-10- The download's file, under its name. The file is the one the workspace's Download button gives, written the same way, with one difference: it names members by user id where the download names them by email. It is saved in the current directory under the download's name, such as
vestiarion-close-pack-your-workspace-2026-10.json. A month that has not ended reads so far, and its name ends in-so-far. A receipt has no download, so its file isvestiarion-receipt-your-workspace-and the bill id's first part. - Where it goes.
--out <file>names another file, in a folder that is there; a folder, or a folder that is not there, is refused before anything is read.--out -prints the document and saves nothing. It prints every character outside ASCII as a JSON escape, so the document reads the same and a shell's>cannot change it. - Nothing is replaced. A file that is already there is kept unless you pass
--force. When--outnames one, the CLI says so before it reads anything. - What it prints. The file's name and size, what it holds (the bill and its status, whether a receipt is ready, the period's address changes, or the month's payments per token), its network, how many signed entries it carries and the key ids.
--jsonprints the same as fields, for a script. - A receipt not ready yet is saved too, with its reason, such as
not_paidorsimulated. The command still exits0: readreadywith--json. - Its limits are the API's. The evidence reads take 10 at once per key, then one every 6 seconds, and the CLI waits when the API asks it to. A close pack over 4 MB is too large for the API: download that month from the workspace. Reading a close pack records nothing in the ledger.
Check any of these files offline, with the public key from the workspace's Audit log page:
vestiarion evidence verify vestiarion-evidence-your-workspace-invoice-9440f32c.json --public-key workspace-key.pem
vestiarion close-pack verify vestiarion-close-pack-your-workspace-2026-10.json --public-key workspace-key.pem- It is the SDK's
verifyEvidence. Every entry the file carries is checked: its body hash, its Ed25519 signature and its chain hash. Every entry a fact cites must be in the file, two entries whose numbers follow each other must link, and every copy of an entry's hash must be the entry's. The file's owncheckfields are never read. - Three answers. VALID exits
0. BROKEN exits2and lists what does not hold, such as an entry whose content no longer matches its signature. NOT CHECKED exits2too: some entry was signed by a key you did not pass, or the file or a key could not be read. - Whose keys. The answer names the keys that signed the entries, such as "Signed by key 9b03458d9a617871", read from the entries that verified, never from the list of keys the file carries. Without
--public-key, the file is checked with the keys it carries, and the answer says so. That proves the entries were not changed after those keys signed them, not that the keys are the workspace's: compare the signing key's id with the Audit log. After a key rotation, pass every key: repeat--public-key, or put the PEM blocks in one file. A private key, or a key that is not Ed25519, is refused. A file that lists a key under an id that is not that key's is BROKEN: the workspace never makes one. When some entry's key was not given, the answer names the key those entries ask for beside the ones given, and lists the entries on one line. - A close pack only.
close-pack verifyrefuses any other file. It also prints the month's payments per token and the ledger head the pack was read at, as what the file states: no signature covers them. The rows' entries are what is signed. - Files saved another way. A whole API answer,
{ "data": ... }, saved withcurl, is read as its data, and a file in UTF-16, as Windows PowerShell 5.1's>writes it, is read too. A document saved from--out -with>checks as it should: PowerShell 5.1 re-encodes what it captures through the console's code page, which would change a name such as "Café", but--out -prints only ASCII. Another program's copy may not, so save with--outwhen you can.
NoteWhat an offline check cannot say
It cannot say that the facts' words follow from the entries: that is the server's reading. It cannot say that the file carries every entry of its period. To show a close pack leaves nothing out, compare its entries' seq and hash with an audit export checked by vestiarion ledger verify. And it says nothing about the chain: open the transaction on the explorer.
Output and exit codes
Text is for reading. --json prints the API's answer as it came: data, and page for a list, ready for jq. The exports and checks are the exception: --json prints what was saved, or the verdict, as their sections say. whoami --json prints the workspace, its network, the key's prefix and source, and the base URL. An error goes to stderr, as JSON with --json.
| Exit code | Meaning |
|---|---|
0 | Done. |
1 | A usage error: an unknown command or option, a missing argument or value, an option given twice, or an export's file that is already there. |
2 | The API answered with an error, a check did not pass, or a write was not confirmed. |
3 | No key, a key not shaped like one, or a key the API refused with 401 or 403. |
The API's own error message is printed as it is, with its status and code. A command that failed never prints a result.
Offline checks
Neither needs a key or a network, and neither do evidence verify and close-pack verify (see Evidence and close packs).
vestiarion ledger verify checks an audit export:
vestiarion ledger verify vestiarion-your-workspace-ledger-392.json --public-key workspace-key.pem- It checks every entry with the SDK's
verifyLedgerEntry: its body hash, its Ed25519 signature and its chain hash. Then it checks the links from the first entry and the head. - It gives the same answer as verify-ledger-export.mjs, word for word: VALID, BROKEN at an entry, or NOT CHECKED.
- It exits
0for VALID, and2for the other two. - Without
--public-key, the file vouches for itself. Compare the key id and head hash it prints with the workspace's Audit log page. After a key rotation, pass every key: repeat--public-key.
vestiarion webhooks verify checks a delivery's Vestiarion-Signature header, as Verifying signatures describes:
export VESTIARION_WEBHOOK_SECRET="..."
vestiarion webhooks verify --signature "t=1760000000,v1=5f2b..." --body delivery.json- The secret is the endpoint's signing secret, from
--secretorVESTIARION_WEBHOOK_SECRET. - Pass the body byte for byte as it arrived, from a file, or from stdin with
--body -. - A signature more than 300 seconds from now is refused. To check a delivery saved earlier, pass a larger
--tolerance, in seconds.
What it sends
- The key goes in
Authorization: Bearer, never in a URL. - Every request carries
User-Agent: vestiarion-cli/and the CLI's version, then the SDK's own. - Nothing else. It sends no telemetry and checks for no updates.