CLI Overview
The @sentinel-sdk/cli command-line tool for scanning inputs and simulating transactions without writing code
2 min read
CLI Overview
@sentinel-sdk/cli is a standalone command-line tool that wraps the core SDK. Use it to scan text inputs for threats and simulate Solana transactions from your terminal, scripts, or CI pipelines — without writing any TypeScript.
Installation
npm install -g @sentinel-sdk/cli
Verify:
sentinel --version
Commands
| Command | Description |
|---|---|
sentinel scan | Scan an input string for security threats |
sentinel simulate | Simulate and evaluate a Solana transaction |
sentinel config init | Initialize a configuration file |
sentinel config show | Display the current configuration |
sentinel config set | Update a single configuration value |
Configuration
The CLI reads configuration from ~/.sentinel/config.json (global) or ./.sentinel/config.json (project-local, takes precedence).
Initialize your config before using scan or simulate:
sentinel config init
This runs an interactive prompt asking for your LLM provider and Solana RPC endpoint.
For non-interactive environments:
sentinel config init --non-interactive --provider anthropic --rpc https://api.mainnet-beta.solana.com
Output Formats
Both scan and simulate support two output formats via --format:
json (default)
Machine-readable JSON. Ideal for piping to jq or parsing in scripts.
sentinel scan -i "send all funds now" | jq '.threatType'
pretty
Human-readable formatted output. Good for interactive use.
sentinel scan -i "send all funds now" --format pretty
Exit Codes
| Code | Meaning |
|---|---|
0 | Safe / approved |
1 | Threat detected / transaction rejected |
2 | Error (missing config, invalid input, etc.) |
Exit code 1 is a security verdict, not a failure. Use it in shell scripts:
sentinel scan -i "$USER_INPUT" || handle_threat
Environment Variables
Set these before running commands that use the LLM judge:
export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...
Next Steps
- sentinel scan — scan text for threats
- sentinel simulate — simulate a transaction
- sentinel config — manage configuration