@agentgrant.cash/cli
v1.5.0
Published
Grant Cash — one CLI for your money (gold) and your agent (pay-per-use services). Routes to the Perfolio backend and the Agent-mode backend behind a single, plain-language surface.
Readme
Grant Cash CLI (grant)
One CLI for your money (gold, via the Perfolio backend) and your agent (pay-per-use services, via the Agent-mode backend). Two engines, one wallet, one identity — behind a single plain-language surface. The user never sees which backend answered.
Built on the Perfolio CLI's structure (Commander + modular cli/commands +
lib/*), merged with the agent CLI's LLM-friendly output and verb set.
Quick start
npm install
cp .env.example .env # set the backend URLs (optional — prod defaults shipped)
npm run dev -- status # run from source
npm run build && ./dist/cli/index.js statusHow routing works
| Surface | Routes to | Auth |
|---|---|---|
| money: portfolio, price, buy, sell, activity | Perfolio backend (GRANTCASH_API_URL) | Authorization: Bearer <accessJwt> |
| agent: search, check, fetch, transfer, revoke | Agent-mode backend (GRANTCASH_AGENT_URL) | Authorization: Bearer <accessJwt> |
grant login runs ONE perfolio device handshake (browser sign-in + limit
approval) and stores a single credential — the perfolio-signed access JWT plus
the opaque pfr_ refresh token, in ~/.grant-cash/credentials.json. That one
JWT is sent to BOTH backends; a 401 from either silently refreshes it once.
Configuration
All URLs are env-driven — see .env.example. You do not need
final URLs to build; set them whenever they're ready.
Skill file
skills/grant-cash/SKILL.md documents the full
command surface, workflow, and error playbook for an AI assistant.
Status
Scaffold of the merged architecture with a working command set across both
engines. Money side is gold-focused by design; borrow/earn/perps endpoints are a
one-method-each extension on MoneyClient. Unified auth (CONTRACT v1): one
perfolio login mints one access JWT that both backends verify locally against
perfolio's JWKS — the CLI holds a single credential and sends it everywhere.
