For the complete documentation index, see llms.txt. This page is also available as Markdown.

CLI for AI Agents

The BitBadges CLI is the recommended interface for AI agents, bots, and automated systems. Start by installing the chain binary + CLI via curl -fsSL https://install.bitbadges.io | sh β€” that's the canonical entrypoint for every harness covered below.

The CLI provides structured JSON output, pipe-friendly input, and LLM-consumable command discovery β€” everything an agent needs without writing TypeScript.

Claude Code users: after the CLI install above, you can optionally layer the BitBadges plugin on top for auto-wired MCP and 8 workflow skills that route Claude to the right CLI / MCP / docs surface (/plugin install bitbadges). The plugin is a convenience layer; everything on this page works with or without it.

Why CLI for Agents?

  • Structured JSON output β€” every command returns parseable JSON

  • --help-json β€” outputs the full command tree as structured JSON, perfect for LLM tool discovery

  • --dry-run β€” simulate any API call without side effects

  • Pipe-friendly β€” accepts stdin (-), file paths (@file.json), and inline JSON

  • Self-documenting β€” bb dev docs all dumps the entire documentation

  • No build step β€” no TypeScript compilation, no bundling, just install and run

Quick Setup for Agents

# 1. Install everything
curl -fsSL https://install.bitbadges.io | sh

# 2. Configure API key
bb settings set apiKey YOUR_KEY

# 3. Verify
bb doctor

Deprecation banner β€” agent-relevant. If your harness invokes legacy forms (bb cli <subcmd>, bitbadges-cli sign-with-browser, bitbadges-cli gen-tx-payload, the per-utility top-level names that moved under bb account / bb dev / bb settings), each call prints a one-line deprecation banner to stderr during the migration window. Stdout (the JSON envelope) is unaffected. Set BB_QUIET=1 in the agent's environment if banner noise is breaking line-based stderr parsers β€” the same flag also suppresses every command's auto-review commentary. The release after the migration window hard-fails the old forms; update prompts and scripts to the short form ahead of that cutover.

Heads up β€” API key vs. session. The API key is required on every indexer call but is the app scope. Anything that mutates an account, manages keys, or publishes signed data also needs a user scope: a session cookie obtained via auth login. The CLI is wallet-agnostic β€” pair it with bb sign-arbitrary for fully headless Cosmos signing, or paste in a signature from any external wallet.

Agent Workflow: Query, Review, Transact

Step 1: Discover available commands

Step 2: Query data

Step 3: Review and audit

Step 4: Browse docs and skills

Step 5: Sign and broadcast (with chain binary)

Step 6: Authenticate for Full Access API routes

Most read-only API routes work with just the API key, but anything that mutates an account or publishes signed data needs a session cookie. The CLI ships a wallet-agnostic three-step flow that pairs cleanly with the chain binary's offline signer:

Multi-account, multi-network. Full reference: Auth Commands.

Combining with BitBadges Builder Tools

For AI assistants that speak MCP (Claude, Cursor, etc.), the BitBadges Builder Tools provide 50+ higher-level tools for building token collections. The CLI and builder tools are complementary:

Use Case
Tool

Query data, browse docs, review transactions

CLI (bb)

Build token collections with guided workflows

BitBadges Builder Tools

Sign and broadcast transactions

Chain binary (bb or bitbadgeschaind) or SDK Signing Client

Key management

Chain binary (bb keys ...)

Example: Fully Automated Agent Script

Further Reading

Last updated