Commands
All commands follow the pattern chainalert <resource> <subcommand> [args] [--flags]. Every command supports --json for raw JSON output.
Command Reference
| Command | Description |
|---|---|
| health | Check API connectivity |
| networks list | List supported blockchain networks |
| templates list|get | Browse and inspect detection templates |
| detections list|get|create|update|delete|test | Full CRUD + historical block testing |
| alerts list|get|stats | View alerts and aggregate statistics |
| events list|get | Browse raw on-chain events |
| state-changes list | View storage slot mutations |
| channels list|create|test|delete | Manage notification channels |
| contracts resolve|storage-slots | Resolve contract metadata and storage layout |
| org-contracts list|get|register|traits | Register and inspect org contracts |
| rpc-configs list|add|test | Override RPC endpoints per network |
| login|logout|whoami | Authenticate with your API key |
| config set|get | Manage CLI configuration |
| chat | Launch the AI-powered interactive REPL |
Creating a Detection
Template inputs are passed via --input.<key>=<value> flags. Use templates get <slug> to see required inputs for a template.
terminal — create detection
$ chainalert detections create \
--template=large-transfer \
--name="USDC Whale Monitor" \
--network=ethereum-mainnet \
--contract=0xA0b8...eB48 \
--input.threshold=1000000 \
--input.tokenSymbol=USDC \
--severity=high \
--cooldown=30
>Detection "USDC Whale Monitor" created (active)
>ID: det_a1b2c3d4