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

bash
npm install -g @sentinel-sdk/cli

Verify:

bash
sentinel --version

Commands

CommandDescription
sentinel scanScan an input string for security threats
sentinel simulateSimulate and evaluate a Solana transaction
sentinel config initInitialize a configuration file
sentinel config showDisplay the current configuration
sentinel config setUpdate 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:

bash
sentinel config init

This runs an interactive prompt asking for your LLM provider and Solana RPC endpoint.

For non-interactive environments:

bash
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.

bash
sentinel scan -i "send all funds now" | jq '.threatType'

pretty

Human-readable formatted output. Good for interactive use.

bash
sentinel scan -i "send all funds now" --format pretty

Exit Codes

CodeMeaning
0Safe / approved
1Threat detected / transaction rejected
2Error (missing config, invalid input, etc.)

Exit code 1 is a security verdict, not a failure. Use it in shell scripts:

bash
sentinel scan -i "$USER_INPUT" || handle_threat

Environment Variables

Set these before running commands that use the LLM judge:

bash
export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...

Next Steps