Ponder CLI
The Ponder CLI (provided by the @ponder/core
package) is the entrypoint for your Ponder project.
Usage: ponder <command> [OPTIONS]
Options:
--root <PATH> Path to the project root directory (default: working directory)
--config <PATH> Path to the project config file (default: "ponder.config.ts")
-v, --debug Enable debug logs, e.g. realtime blocks, internal events
-vv, --trace Enable trace logs, e.g. db queries, indexing checkpoints
--log-level <LEVEL> Minimum log level ("error", "warn", "info", "debug", or "trace") (default: "info")
--log-format <FORMAT> The log format ("pretty" or "json") (default: "pretty")
-V, --version Show the version number
-h, --help Show this help message
Commands:
dev [options] Start the development server with hot reloading
start [options] Start the production server
serve [options] Start the production HTTP server without the indexer
codegen Generate the schema.graphql file, then exit
dev
Start the app in development mode.
- The app automatically restarts when changes are detected in any project file.
- An auto-updating terminal UI displays useful information.
Usage: ponder dev [options]
Start the development server with hot reloading
Options:
-p, --port <PORT> Port for the web server (default: 42069)
-H, --hostname <HOSTNAME> Hostname for the web server (default: "0.0.0.0")
-h, --help display help for command
start
Start the app in production mode.
- Project files are built once on startup, and file changes are ignored.
- The terminal UI is disabled.
Usage: ponder start [options]
Start the production server
Options:
-p, --port <PORT> Port for the web server (default: 42069)
-H, --hostname <HOSTNAME> Hostname for the web server (default: "0.0.0.0")
-h, --help display help for command
serve
Start the app in server-only mode. This option can be used to horizontally scale the GraphQL API in production.
- Only works with Postgres.
- Project files are built once on startup, and file changes are ignored.
- The sync and indexing engines is disabled.
- The GraphQL API server runs as normal, serving data from the connected database.
Usage: ponder serve [options]
Start the production HTTP server without the indexer
Options:
-p, --port <PORT> Port for the web server (default: 42069)
-H, --hostname <HOSTNAME> Hostname for the web server (default: "0.0.0.0")
-h, --help display help for command
codegen
During development (when using ponder dev
), codegen runs automatically run when changes are detected in ponder.schema.ts
.
Generate the schema.graphql
file.
Usage: ponder codegen [options]
Generate the schema.graphql file, then exit
Options:
-h, --help display help for command