@tollway/cli
v0.2.0
Published
CLI for the Tollway protocol — generate agent identities, fetch URLs with identity headers, inspect site policies
Maintainers
Readme
@tollway/cli
Command-line interface for the Tollway protocol. Generate agent identities, fetch URLs with signed identity headers, and inspect site policies — all from the terminal.
Part of the Tollway open protocol — robots.txt rebuilt for the agentic era.
Install
npm install -g @tollway/cli
# or use without installing:
npx @tollway/cli <command>Quick Start
# 1. Generate an agent identity
tollway init
# 2. Check a site's policy
tollway policy https://example.com
# 3. Fetch a URL as an identified agent
tollway fetch https://example.com/articleCommands
tollway init
Generate a new Ed25519 key pair and save a did:key identity to ~/.tollway/config.json.
tollway init # generate new identity
tollway init --wallet 0xYourAddress # associate a USDC wallet
tollway init --force # overwrite existing identitytollway id
Show the current saved identity.
tollway id
tollway id --reputation # also fetch reputation score from oracletollway policy <url>
Fetch and display a site's tollway.json policy.
tollway policy https://example.com
tollway policy https://example.com --json # raw JSON outputtollway fetch <url>
Fetch a URL with Tollway identity headers attached.
tollway fetch https://example.com/article
tollway fetch https://example.com/article --scope summarize
tollway fetch https://example.com/article --purpose "Research for report"
tollway fetch https://example.com/article --json # full result as JSON
tollway fetch https://example.com/article --text # include response body
tollway fetch https://example.com/article --headers # show headers sentIdentity File
Identities are stored at ~/.tollway/config.json (mode 600, owner-readable only):
{
"did": "did:key:z6Mk...",
"privateKey": "<ed25519 private key hex>",
"wallet": "0x..."
}Protocol
@tollway/cli uses @tollway/client internally and implements the Tollway v0.1 specification.
- Spec: CC BY 4.0
- Code: MIT
- GitHub: TollwayProtocol/Tollway
