---
title: "CLI for agents & shell"
description: "Use @bennybooks/cli to wire Streamable HTTP MCP and run curated ledger commands from the terminal."
canonical: https://bennybooks.com/developers/guides/cli
markdown: https://bennybooks.com/developers/guides/cli.md
---
# CLI for agents & shell

Use @bennybooks/cli to wire Streamable HTTP MCP and run curated ledger commands from the terminal.

> **Documentation index.** Fetch [https://bennybooks.com/developers/llms.txt](https://bennybooks.com/developers/llms.txt) before browsing further. Prefer markdown (this file or `Accept: text/markdown`). Site-wide map: [https://bennybooks.com/llms.txt](https://bennybooks.com/llms.txt).

MCP is the product for IDE and chat agents. The CLI is the installer plus shell/CI companion — same bb_live_ token, same proposal-only writes, not a second API.

| Host | Prefer |
| --- | --- |
| Cursor / Claude / Codex with MCP | Streamable HTTP tools at /api/mcp |
| Terminal, scripts, CI | @bennybooks/cli (JSON) or REST https://bennybooks.com/api/v1 |

> **Do not thrash.** If BennyBooks MCP tools are already registered in the host, prefer those tools. Do not shell the CLI as a substitute.

## Install

```bash npx
npx @bennybooks/cli --help
# or
npm i -g @bennybooks/cli
```

## Enable an agent

1. Create a bb_live_ token in Settings → MCP & agents (read or propose-write)
2. export BENNYBOOKS_TOKEN=bb_live_… (optional BENNYBOOKS_URL)
3. npx @bennybooks/cli agent setup — merges ~/.cursor/mcp.json and prints Claude/Codex steps
4. Restart / reload MCP; confirm list_transactions is available

```bash Dry-run MCP config
npx @bennybooks/cli agent mcp-config
```

## Curated commands

| Command | Maps to |
| --- | --- |
| auth set-token | whoami | logout | Local config + dashboard check |
| agent setup | mcp-config | Wire /api/mcp |
| transactions list | get | GET https://bennybooks.com/api/v1/transactions |
| dashboard summary | GET https://bennybooks.com/api/v1/dashboard/summary |
| categories list | GET https://bennybooks.com/api/v1/categories |
| proposals list | GET https://bennybooks.com/api/v1/proposals |
| propose categorize | POST https://bennybooks.com/api/v1/proposals/categorization |

All commands print JSON to stdout. Writes create pending proposals until a human approves in Ledger → Approvals (also recorded in Log).

## Agent skill

```bash Install from this repo
npx skills add . --skill bennybooks -y
# source folder: agent-skills/bennybooks/SKILL.md
```

Remote playbook: https://bennybooks.com/skill.md · Auth: https://bennybooks.com/auth.md · Native MCP: Connect Streamable HTTP MCP.

---

## Machine-readable

- HTML: https://bennybooks.com/developers/guides/cli
- Markdown: https://bennybooks.com/developers/guides/cli.md
- Docs index: https://bennybooks.com/developers/llms.txt
- OpenAPI: https://bennybooks.com/openapi.json
- Skill: https://bennybooks.com/skill.md
- Auth: https://bennybooks.com/auth.md

```json
{
  "@context": "https://schema.org",
  "@type": "TechArticle",
  "headline": "CLI for agents & shell",
  "description": "Use @bennybooks/cli to wire Streamable HTTP MCP and run curated ledger commands from the terminal.",
  "url": "https://bennybooks.com/developers/guides/cli",
  "inLanguage": "en",
  "encodingFormat": [
    "text/html",
    "text/markdown"
  ],
  "isAccessibleForFree": true,
  "publisher": {
    "@type": "Organization",
    "name": "BennyBooks",
    "url": "https://bennybooks.com"
  },
  "mainEntityOfPage": "https://bennybooks.com/developers/guides/cli",
  "workExample": {
    "@type": "CreativeWork",
    "url": "https://bennybooks.com/developers/guides/cli.md",
    "encodingFormat": "text/markdown",
    "name": "CLI for agents & shell (Markdown)"
  },
  "about": {
    "@type": "WebAPI",
    "name": "BennyBooks Agent API",
    "url": "https://bennybooks.com/api/v1",
    "documentation": "https://bennybooks.com/developers"
  }
}
```
