CLI Reference
Master the TokenCap command-line interface. A powerful, low-latency toolkit designed for rapid token engineering and asset management.
download
Install globally
Get started by installing the TokenCap CLI via npm, yarn, or pnpm. This provides the tc global command.
bash
$npm install -g @tokencap/cli
Generate snapshot
Capture the current state of all tracked assets into a secure, versioned JSON snapshot.
Terminal — tc snapshot
>tc snapshot --name "q3-audit"
✔ Validating chain data...
✔ Fetching metadata...
Snapshot created: ./snapshots/q3-audit.tc.json
Size: 142.5KB
Size: 142.5KB
Watch mode
Automatically re-sync and hot-reload your local environment when on-chain events occur.
Terminal — tc watch
>tc watch --verbose
[14:02:21] Watching for contract events...
● Event: Transfer detected (0x12...a3)
[14:02:45] Re-indexing local cache...
Configuration
tokencap.config.jsInitialize a new project configuration or print the currently resolved tree including environment overrides.
INITIALIZE PROJECT
tc initCreates a scaffold with default resolvers and security layers.
DEBUG RESOLUTION
tc config --printOutputs the full merged JSON config to stdout.
// Resolved Config Output
{
"network": "mainnet",
"caching": {
"enabled": true,
"ttl": 3600
},
"integrations": ["ledger", "trezor"]
}
"network": "mainnet",
"caching": {
"enabled": true,
"ttl": 3600
},
"integrations": ["ledger", "trezor"]
}
CLI Options
| Flag | Description | Default |
|---|---|---|
| --version, -v | Print the installed version of TokenCap. | n/a |
| --config, -c | Path to a custom configuration file. | tokencap.config.js |
| --silent, -s | Suppress all non-error output to the terminal. | false |
| --json | Format all CLI output as raw JSON strings. | false |
| --force, -f | Bypass validation checks and overwrite local files. | false |
Built for speed.
Rust-powered core ensures sub-50ms execution times.