@agent-capsule/cli
v1.0.1
Published
Bundle and mint AI agent workspaces as NFTs on Base
Downloads
209
Readme
@agent-capsule/cli
Bundle AI agent workspaces into NFTs on Base. Store permanently on Arweave. Unbundle anywhere.
Capsule packages a complete agent workspace — skills, soul files, configs — into a single NFT with cryptographic integrity verification end-to-end. Files are stored permanently on Arweave via Irys; the NFT on Base stores a content URI and SHA-256 hash.
Contract: 0x42CA2eB000CDa3AdAcC3060f5Fe3Fa471264C7Cf on Base mainnet
Install
npm install -g @agent-capsule/cliOr run directly:
npx @agent-capsule/cli bundle ./my-agentCommands
capsule bundle <directory>
Scans the workspace, validates files, detects secrets, uploads to Arweave, and mints an NFT.
capsule bundle ./my-agent --private-key $PRIVATE_KEY| Option | Description |
|--------|-------------|
| --name <name> | Agent name (prompts if omitted) |
| --description <desc> | Agent description (prompts if omitted) |
| --dry-run | Validate and preview without uploading or minting |
| --output <file> | Save bundle JSON to file |
| --rpc <url> | Custom RPC URL (default: https://mainnet.base.org) |
| --private-key <key> | Wallet private key |
| --allow-pattern <pattern> | Override a false-positive secret detection pattern |
capsule unbundle <token-id>
Fetches the bundle from Arweave, verifies the SHA-256 hash against the onchain record, and extracts files.
capsule unbundle 0| Option | Description |
|--------|-------------|
| --output-dir <dir> | Output directory (default: capsule-<token-id>) |
| --skip-verify | Skip hash verification (not recommended) |
| --rpc <url> | Custom RPC URL |
capsule inspect <token-id>
Display Capsule metadata without extracting files.
capsule inspect 0| Option | Description |
|--------|-------------|
| --json | Output as JSON |
| --rpc <url> | Custom RPC URL |
capsule list <address-or-ens>
List all Capsules owned by an address.
capsule list 0x552c...7567| Option | Description |
|--------|-------------|
| --json | Output as JSON |
| --rpc <url> | Custom RPC URL (use Alchemy/Infura for reliable results) |
Note: The
listcommand useseth_getLogswhich public RPC endpoints may rate-limit. Use a dedicated provider for reliable results.
Workspace Structure
A Capsule workspace is scanned for these files:
| File | Location | Required |
|------|----------|----------|
| SOUL.md | Root | No |
| AGENTS.md | Root | No |
| MEMORY_TEMPLATE.md | Root | No |
| SKILL.md | skills/*/SKILL.md | No |
| config.json | skills/*/config.json | No |
At least one included file must be present. Secrets are aggressively detected — 14 patterns are hard-blocked to prevent publishing sensitive data to permanent storage.
How It Works
- Bundle — CLI scans your agent workspace, strips secrets, uploads files to Arweave (permanent storage), and mints an ERC-721 NFT on Base with the content URI and SHA-256 hash
- Unbundle — Given a token ID, fetches the bundle from Arweave, verifies the SHA-256 hash matches the onchain record, and extracts files to disk
- Inspect — Reads NFT metadata from the contract without downloading files
Requirements
- Node.js 18+
- A wallet with ETH on Base (for minting)
- Arweave upload fees are paid in ETH via Irys
License
MIT
