@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
Authentication
Set your API key via environment variable (recommended) or the--api-key flag:
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)
Global options
| Flag | Description |
|---|---|
--api-key <key> | API key (falls back to WEBACY_API_KEY) |
--base-url <url> | Override the API base URL (e.g. staging) |
--chain <chain> | Default blockchain — applies to any command that accepts a chain |
--timeout <ms> | Request timeout in milliseconds |
--debug [level] | Log SDK activity: requests, responses, errors, or all |
--pretty / --no-pretty | Force pretty or compact JSON (auto-detects TTY by default) |
--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-prettyoverride) - stderr — errors and debug logs
- exit code —
0on success,1on any error (pipes that close early exit0— safe for| head)
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):
/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 validRiskModulevalue; unknown values surface aValidationErrorlisting the full allowed set.--tags(rwa list) — each entry must be one ofstandard,yield,rwa,gold,bridged,vault.- Numeric flags (
--depth,--limit,--timeout, etc.) — must be integers;3.9or10abcare rejected (no silent truncation). - Addresses — validated against chain-specific formats (0x for EVM, base58 for Solana, etc.) before dispatch.
ValidationError + recovery hint and exits 1.
Command reference
Threat
| Group | Subcommands | --chain semantics |
|---|---|---|
addresses | analyze, check-sanctioned, check-poisoning, quick-profile¹, summary | optional (uses defaultChain if set) |
contracts | analyze, source-code, taxes, analyze-solidity, code-analysis, audits, by-symbol | optional (by-symbol is chain-agnostic) |
url | check, add | chain-agnostic |
wallets | transactions, approvals | optional |
ledger | scan-transaction, scan-eip712 | chain ID lives in the JSON body; global --chain is ignored |
account-trace | trace | optional |
usage | current, history, plans, max-rps | chain-agnostic |
transactions | analyze² | optional |
scan | transaction, eip712, start-risk-scan, risk-scan-status | chain ID lives in the JSON body for transaction/eip712 |
batch | addresses, contracts, transactions | required |
rwa | list, get | optional |
vaults | list, list-cursor, get, list-events, list-events-for-address | required on get and list-events-for-address |
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
| Group | Subcommands | --chain semantics |
|---|---|---|
holder-analysis | get | optional |
trading-lite | analyze | Solana only (default when omitted) |
tokens | pools, trending, trending-pools, get³, pool-ohlcv³ | required on get and pool-ohlcv |
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
Stream trending tokens and flag high-risk ones
Debugging
Use--debug to see what the SDK is sending and receiving without changing your code:
--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 code1:
AuthenticationError— missing or invalid API keyValidationError— malformed input (address, chain, required field)RateLimitError— you’ve exceeded your plan’s rate limitNotFoundError— resource doesn’t exist on the given chainNetworkError— timeout or connectivity issue
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
