# tools
CLI Reference
The ChainAlert CLI is a command-line interface for managing blockchain monitoring. It provides two interaction modes: direct imperative commands (scriptable, composable with shell tools) and an AI-powered interactive REPL for natural-language management.
Installation
terminal
$ npm install -g @chainalert/cli
Authentication
The CLI authenticates via API keys. Create one in the web dashboard under Settings > API Keys (requires admin role), then run chainalert login and paste your ca_live_... key. It's stored in ~/.chainalert/config.json.
terminal — auth
$ chainalert login
Enter your API key: ca_live_••••••••
>API key saved to ~/.chainalert/config.json
$ chainalert whoami
Key: ca_live_abc1...
API: https://api.chainalert.dev