@spendmarshal/cli
v0.0.2
Published
Operator CLI for the Agentic Payment Gateway: export-evidence, verify (offline), statement (a client's month-end statement from its evidence bundle), policy lint, audit-logs (read-only LiteLLM spend-log diagnostic)
Maintainers
Readme
@spendmarshal/cli
Operator command line: spendmarshal export-evidence, spendmarshal verify <bundle.json> (offline, no network), spendmarshal statement <bundle.json> (a client's month-end statement from its evidence bundle), spendmarshal policy lint <policy.yaml>, spendmarshal audit-logs <spend-logs.json> (offline diagnostic over a LiteLLM spend-log export).
npx @spendmarshal/cli verify evidence.jsonThe verifier re-checks every receipt signature (against the gateway key in force at its position), the hash chain and its gateway key history, policy versions and activation times, credential monotonicity, approvals and anchors from the bundle alone. --gateway-key ADDRESS (repeatable) pins the gateway keys you trust: every key that signed the chain must be one of them, or linked to one by handovers. Without it, a key change that the previous key did not hand over fails. --rpc URL also checks each anchor on-chain under the address that sent it.
spendmarshal audit-logs spend-logs.json [--budgets keys.json] [--prices model_prices.json] [--format text|html|json] reads a LiteLLM spend-log export (/spend/logs/v2 pages or a plain array) and prints a one-page exceptions report: repeated requests, retry storms, failed and empty spend, expensive models on small outputs, and caps against real use, each with its source rows and a label that says what the data supports. Offline, metadata only; prompts and responses are never printed. See docs/AUDIT_LOGS.md.
spendmarshal statement evidence.json --period 2026-10 [--provider-total 0.18] [--payee ADDRESS] [--format text|html|json] verifies a client's evidence bundle and prints its statement for the period: settlements by agent, payee and rail, approvals with the approver and the policy version, denials by reason, payments allowed but never settled, the policy versions and mandates in force, and, when the provider's figure is given, a reconciliation whose verdict is matches, explained (the difference equals subscription charges, boundary settlements or unsettled allows) or unexplained. Every amount is read from a receipt, exactly; the footer gives the verify command and the file's SHA-256. See docs/STATEMENT.md.
Part of SpendMarshal, the open-source Agentic Payment Gateway: policy, settlement and evidence between AI agents and any payment rail. Apache-2.0. Alpha: APIs change between 0.0.x versions.
