CLI
All commands and flags.
Commands
sieve [OPTIONS] Run the indexer sieve init Scaffold a new project (sieve.toml, .env, abis/) sieve init --docker Same + docker-compose.yml with PostgreSQL sieve schema Print generated SQL DDL sieve reset Drop and recreate all tables sieve inspect Dry-run: show tables, columns, and filters sieve add-contract <ADDRESS> Fetch ABI from Etherscan and add to config sieve peers Test P2P connectivity (no DB or config needed)
Flags
Path to TOML config. Default: sieve.toml
Override start block for all contracts.
Stop at this block. Omit for follow mode.
PostgreSQL URL. Overrides DATABASE_URL from .env.
Override GraphQL API port. Also configurable via [api] port in TOML.
Override P2P listen port. Default: 30303.
Drop and recreate all tables before indexing.
Use tracing logs instead of the pretty UI.
Print version.
Environment variables
All sensitive values live in .env (auto-loaded at startup via dotenvy). Never in TOML.
| Variable | Purpose |
|---|---|
| DATABASE_URL | PostgreSQL connection URL |
| WEBHOOK_URL | Webhook endpoint URL |
| RABBITMQ_URL | RabbitMQ connection URL |
| ETHERSCAN_API_KEY | Etherscan API key |
sieve add-contract
Fetches a verified ABI from Etherscan, saves it to abis/, and appends a [[contracts]] block to your config. Auto-detects proxy contracts. Automatically sets start_block to the contract's deploy block.
sieve add-contract 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 sieve add-contract 0xA0b8... --name USDC sieve add-contract 0xA0b8... --start-block 21000000
sieve inspect
Validates your config without a database connection. Shows what tables, columns, context fields, and filters would be created.
sieve inspect --config sieve.toml
sieve peers
Tests P2P connectivity without a database or config. Reports peer count and chain head every 5 seconds. Useful for diagnosing Docker/NAT issues.
sieve peers # peers=5 best_head=22525078 # peers=8 best_head=22525090