rindexer CLI
rindexer is a CLI first tool allowing you to do everything you need to do with rindexer.
Usage: rindexer <COMMAND>
Commands:
new Creates a new rindexer no-code project or rust project
start Start various services like indexers, GraphQL APIs or both together
add Add elements such as contracts to the rindexer.yaml file
codegen Generates rust code based on rindexer.yaml or graphql queries
delete Delete data from the postgres database or csv files
phantom Use phantom events to add your own events to contracts
foundry Import and sync Foundry projects with rindexer projects
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print versionnew
Creates a new rindexer no-code project or rust project. This will walk you through setting up your project by asking you a series of questions in the terminal.
Usage: rindexer new [OPTIONS] <COMMAND>
Commands:
no-code Creates a new no-code project
rust Creates a new rust project
help Print this message or the help of the given subcommand(s)
Options:
-p, --path <PATH>
optional - The path to create the project in, default will be where the command is run
-h, --help
Print help (see a summary with '-h')Subcommand Options
The no-code and rust subcommands support:
Options:
-r, --reth
optional - Enable Reth support for high-performance indexing
[-- <RETH_ARGS>...]
Additional arguments to pass to reth when --reth is enabled
These should be provided after -- e.g. -- --datadir /path --http true
Examples:
# Standard project
rindexer new no-code
# Reth-enabled project
rindexer new no-code --reth
# Reth project with custom arguments
rindexer new rust --reth -- --datadir /custom/path --http true--reth requires a CLI binary built with the reth feature. Official native Windows release binaries are built without that feature, so use Linux, macOS, Docker, or WSL/Linux for Reth mode.
foundry
Imports and syncs Foundry projects with generated no-code rindexer projects.
Usage: rindexer foundry <COMMAND>
Commands:
new Creates a no-code rindexer project from a Foundry project or Git URL
sync Sync an existing Foundry-generated rindexer project from its source
help Print this message or the help of the given subcommand(s)new
Usage: rindexer foundry new [OPTIONS] [SOURCE]
Arguments:
[SOURCE]
optional - Foundry source path or Git URL, defaults to the current directory
Options:
--output <OUTPUT>
optional - Output directory for the generated rindexer project
--name <NAME>
optional - Project name for the generated rindexer project
-h, --help
Print help (see a summary with '-h')Supported SOURCE values include local paths, GitHub repository URLs, GitHub tree URLs, any git clone compatible URL, and the generic suffix form <git-url>#<ref>:<subdir>.
Git sources are cloned into a temporary directory and Git submodules are initialized when .gitmodules is present. The source must build with forge build; if dependencies are not available from a fresh clone, install them locally and import from that local path.
Generated Foundry projects do not include public RPC URLs for non-local chains. The generated rindexer.yaml uses placeholders such as ${CHAIN_84532_RPC_URL}, and .env contains matching empty values such as CHAIN_84532_RPC_URL=. Set those .env values to RPC endpoints with enough history/archive access before running rindexer start. Chain 31337 is the only prefilled RPC value and uses ANVIL_RPC_URL=http://127.0.0.1:8545.
Examples:
# Foundry import from the current directory
rindexer foundry new
# Foundry import from GitHub
rindexer foundry new https://github.com/org/repo
# Foundry import to a specific output directory
rindexer foundry new https://github.com/org/repo --output ./my-indexersync
Usage: rindexer foundry sync [OPTIONS] [SOURCE]
Arguments:
[SOURCE]
optional - Override the saved Foundry source path or Git URL
Options:
-p, --path <PATH>
optional - The rindexer project path, default will be where the command is run
--dry-run
Report changes without writing files
-h, --help
Print help (see a summary with '-h')Examples:
rindexer foundry sync
rindexer foundry sync --path ./my-indexer
rindexer foundry sync --path ./my-indexer --dry-run
rindexer foundry sync https://github.com/org/repo/tree/main/packages/contracts --path ./my-indexerDuring sync, rindexer preserves existing values in .env and only appends missing CHAIN_<id>_RPC_URL keys for newly discovered networks.
start
Start various services like indexers, GraphQL APIs or both together. This will start the services based on the rindexer.yaml file. A health monitoring server is automatically started alongside these services.
`rindexer start indexer` or `rindexer start graphql` or `rindexer start all`
Usage: rindexer start [OPTIONS] <COMMAND>
Commands:
indexer Starts the indexing service based on the rindexer.yaml file
graphql Starts the GraphQL server based on the rindexer.yaml file
all Starts the indexers and the GraphQL together based on the rindexer.yaml file
help Print this message or the help of the given subcommand(s)
Options:
-p, --path <PATH>
optional - The path to run the command in, default will be where the command is run
-y, --yes
Auto-confirm all schema migration prompts. Useful for CI/CD pipelines.
-w, --watch
Watch rindexer.yaml for changes and hot-reload (no-code projects only).
-h, --help
Print help (see a summary with '-h')add
These commands allow you to through the CLI add elements to your YAML file.
Usage: rindexer_cli add [OPTIONS] <COMMAND>
Commands:
contract Add a contract from a network to the rindexer.yaml file. It will download the ABI and add it to the abis folder and map it in the yaml file.
help Print this message or the help of the given subcommand(s)
Options:
-p, --path <PATH>
optional - The path to run the command in, default will be where the command is run
-h, --help
Print help (see a summary with '-h')codegen
Generates rust code based on rindexer.yaml or graphql queries. This will generate the code based on the command you run.
Example: `rindexer codegen typings` or `rindexer codegen handlers` or `rindexer codegen graphql --endpoint=graphql_api` or `rindexer codegen rust-all`
Usage: rindexer codegen [OPTIONS] <COMMAND>
Commands:
typings Generates the rindexer rust typings based on the rindexer.yaml file
indexer Generates the rindexer rust indexers handlers based on the rindexer.yaml file
graphql Generates the GraphQL queries from a GraphQL schema
all Generates both typings and indexers handlers based on the rindexer.yaml file
help Print this message or the help of the given subcommand(s)
Options:
-p, --path <PATH>
optional - The path to run the command in, default will be where the command is run
-h, --help
Print help (see a summary with '-h')delete
This can be used to delete data from the postgres database or csv files. It will ask you questions in the terminal to determine what you want to delete.
Usage: rindexer deletephantom
Example: `rindexer phantom init` or `rindexer phantom clone --contract-name <CONTRACT_NAME> --network <NETWORK>` or `rindexer phantom compile --contract-name <CONTRACT_NAME> --network <NETWORK>` or `rindexer phantom deploy --contract-name <CONTRACT_NAME> --network <NETWORK>`
Usage: rindexer phantom [OPTIONS] <COMMAND>
Commands:
init Sets up phantom events on rindexer
clone Clone the contract with the network you wish to add phantom events to
compile Compiles the phantom contract
deploy Deploy the modified phantom contract
help Print this message or the help of the given subcommand(s)
Options:
-p, --path <PATH>
optional - The path to create the project in, default will be where the command is run
-h, --help
Print help (see a summary with '-h')