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 [--chain <NAME>] 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.
Block-processing workers. Default: CPU count. Also configurable via [sync] workers in TOML. Cap it when running several instances on one host.
Drop and recreate all tables before indexing.
Adopt factories that have no coverage record, for databases created before coverage tracking. See Factory Contracts.
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 for the chain in your root config, 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. It reads and writes the root config only, never a fragment.
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, merging any *.sieve.toml fragments next to it.
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. Pass --chain to test any supported chain.
sieve peers # peers=5 best_head=22525078 # peers=8 best_head=22525090 sieve peers --chain base