CLI reference
The csds CLI brings token risk checks to your terminal and scripts. It's scriptable (JSON/CSV/NDJSON output), CI-friendly (exit codes mirror risk), and starts free — three lifetime quick checks, no account.
check, batch, tokens, stats, and config are functional. auth and dashboard are placeholders and print a "not yet implemented" notice.Install
The recommended install is pipx. Full options on the installation page.
$ pipx install csds-cli
$ csds --version
Quickstart
# Analyze a token (chain auto-detected when omitted)
$ csds check 0x6982508145454ce325ddbe47a25d4ec3d2311933
# JSON for scripts; pipe into jq
$ csds check 0x6982… --format json | jq '.risk_score'
Global concepts
Output formats
Most commands take --format. Available formats vary by command:
| Command | Formats | Default |
|---|---|---|
check | table · json · csv · md | table |
batch | ndjson · csv · table | ndjson |
tokens | table · json · csv | table |
stats | table · json | table |
Exit codes
check and batch set the process exit code from the risk result, so you can gate pipelines without parsing output:
| Code | Meaning |
|---|---|
| 0 | Success — risk LOW or MEDIUM (score < 51). |
| 1 | Risk HIGH (score 51–75). |
| 2 | Risk CRITICAL (score > 75). |
| 3 | Error — bad input, network failure, or quota exhausted. |
Configuration & precedence
Settings resolve in this order (highest wins): command flags → environment variables → config file (~/.config/csds/config.toml).
| Config key | Environment variable | Purpose |
|---|---|---|
api-url | CSDS_API_URL | API base URL. |
default-chain | CSDS_DEFAULT_CHAIN | Chain used when --chain is omitted. |
default-format | CSDS_FORMAT | Default output format. |
api-key | CSDS_API_KEY | API key Beta. |
wallet-key | CSDS_WALLET_KEY | x402 wallet key Beta. |
csds check
Analyze a single token. Defaults to a quick check; --full runs a standard report and --deep a deep dive.
$ csds check ADDRESS [--chain CHAIN] [--full | --deep] [--format FMT] [--no-color]
| Argument / flag | Description |
|---|---|
| ADDRESS Required | Contract/mint address to analyze. |
| --chain | Chain to analyze; auto-detected when omitted. See supported chains. |
| --full | Run a standard report ($1.00). |
| --deep | Run a deep dive ($5.00). |
| --format | table (default) · json · csv · md. |
| --no-color | Strip ANSI colors (useful in logs/CI). |
# Markdown summary for a report (e.g. paste into an issue)
$ csds check 0x… --full --format md
# Fail a CI step on HIGH/CRITICAL risk
$ csds check 0x… || echo "flagged (exit $?)"
csds batch
Analyze many addresses from a file. Reads one address per line (an optional address,chain pair); lines starting with # are comments. Streams NDJSON by default; a summary is printed to stderr.
$ csds batch FILE [--chain CHAIN] [--format ndjson|csv|table] [--concurrency N]
| Argument / flag | Description |
|---|---|
| FILE Required | Path to a file of addresses. |
| --chain | Default chain for lines without an explicit one. |
| --format | ndjson (default) · csv · table. |
| --concurrency | Max parallel requests. Default 5. |
$ csds batch watchlist.txt --format csv > report.csv
csds tokens
Search the public token database (free, read-only).
$ csds tokens [--search Q] [--chain CHAIN] [--risk-min N] [--risk-max N] [--limit N] [--format FMT]
| Flag | Description |
|---|---|
| --search | Match by name or symbol. |
| --chain | Filter by chain. |
| --risk-min / --risk-max | Bound the risk score. |
| --limit | Max results. Default 20. |
| --format | table (default) · json · csv. |
$ csds tokens --search pepe --chain ethereum --risk-max 40
csds stats
Show platform-wide statistics.
$ csds stats --format json
csds config
Read and write persisted settings (see precedence).
# Set a default chain and output format
$ csds config set default-chain ethereum
$ csds config set default-format json
# Read one key, or all of them
$ csds config get default-chain
$ csds config get
Valid keys: default-chain, default-format, api-url, api-key, wallet-key.
csds auth & dashboard Stub
The auth subcommands (setup, status, fund, export) and dashboard are placeholders today — they print a "not yet implemented" message. They'll manage x402 wallet funding and an interactive dashboard once shipped. See Authentication for current options.
Common workflows
Gate CI on risk
- name: Screen contract
run: |
pipx install csds-cli
csds check ${{ env.CONTRACT }} --chain ethereum --no-color
# exit 1 (HIGH) or 2 (CRITICAL) fails the step
Extract fields with jq
$ csds check 0x… --format json | jq '{score:.risk_score, level:.risk_level}'
Screen a portfolio
$ csds batch portfolio.txt --format csv | column -t -s,
Troubleshooting
| Symptom | Fix |
|---|---|
csds: command not found | Ensure pipx's bin dir is on PATH: pipx ensurepath, then restart the shell. |
| Exit code 3 with "quota" | Free quick checks (3) are used up. Fund an account or wait for key-based auth (Beta). |
| Network/timeout errors | Check connectivity and CSDS_API_URL; retry — analysis fans out to several providers. |
| Colors look wrong in logs | Add --no-color. |