Skip to main content
The @webacy-xyz/cli package ships a webacy binary that exposes every ThreatClient and TradingClient method as a subcommand. Use it to script security checks, pipe JSON into other tools, or run one-off analyses without writing TypeScript.

Installation

Verify the install:
The CLI is a thin wrapper around the SDK. Every subcommand maps 1:1 to an SDK method, so behavior, validation, and errors match exactly.

Authentication

Set your API key via environment variable (recommended) or the --api-key flag:
Without a key, commands fail fast before making any HTTP request:
Never commit your API key to version control. Prefer WEBACY_API_KEY in a shell profile or a secrets manager for CI.

Command structure

Every command follows the same shape:
  • <group> — a resource namespace (addresses, contracts, tokens, …)
  • <subcommand> — a method on that resource (analyze, check-sanctioned, trending, …)
  • Positional args — typically an address, transaction hash, or token address
  • Local options — method-specific flags (e.g. --depth, --limit, --refresh-cache)
Drill into help at any level:

Global options

Global flags can appear before or after the subcommand:
--chain only accepts production chains (eth, sol, base, bsc, pol, arb, opt, ton, sui, stellar, btc, sei). An invalid value is rejected before any request is made.

Output

  • stdout — the SDK response as JSON (pretty when the terminal is interactive, compact when piped; --pretty / --no-pretty override)
  • stderr — errors and debug logs
  • exit code0 on success, 1 on any error (pipes that close early exit 0 — safe for | head)
This makes the CLI safe to pipe, redirect, and branch on in shell scripts:

Batch and JSON inputs

Any command that takes a list or request body accepts either a literal value, @./path/to/file.json, or @~/path/to/file.json (tilde expands to your home directory):
File inputs are capped at 16 MiB and must point at a regular file (directories, FIFOs, and /dev/stdin are rejected).

Input validation

Validation happens locally before any HTTP request:
  • --chain — rejected by the parser if not a supported production chain.
  • --modules (addresses analyze) — each entry must be a valid RiskModule value; unknown values surface a ValidationError listing the full allowed set.
  • --tags (rwa list) — each entry must be one of standard, yield, rwa, gold, bridged, vault.
  • Numeric flags (--depth, --limit, --timeout, etc.) — must be integers; 3.9 or 10abc are rejected (no silent truncation).
  • Addresses — validated against chain-specific formats (0x for EVM, base58 for Solana, etc.) before dispatch.
Each failure prints a typed ValidationError + recovery hint and exits 1.

Command reference

Threat

¹ addresses quick-profile supports eth, base, bsc, pol, opt, arb, sol only. ² transactions analyze supports eth, base, bsc, pol, opt, arb, sol, stellar only.

Trading

³ tokens get and tokens pool-ohlcv support eth, base, bsc, pol, opt, arb, sol only. When the global --chain value falls outside a command’s supported subset, the CLI throws a ValidationError locally with the allowed values — no HTTP round-trip. Each subcommand exposes the same options as the corresponding SDK method — run webacy <group> <subcommand> --help to see them.

Examples

Investigate a suspicious address

Vet a new Solana token

Check current API quota

Debugging

Use --debug to see what the SDK is sending and receiving without changing your code:
Granular levels: --debug requests, --debug responses, --debug errors. Point at a non-production environment for testing:

Error handling

The CLI surfaces the SDK’s typed errors with recovery hints on stderr, then exits with code 1:
Common error types:
  • AuthenticationError — missing or invalid API key
  • ValidationError — malformed input (address, chain, required field)
  • RateLimitError — you’ve exceeded your plan’s rate limit
  • NotFoundError — resource doesn’t exist on the given chain
  • NetworkError — timeout or connectivity issue
See Error Handling for the full list and how to recover from each.

Next steps

SDK Installation

Use the SDK directly in your TypeScript code

ThreatClient

Full method reference for threat analysis

TradingClient

Full method reference for trading analysis

Error Handling

Typed errors and recovery strategies