Documentation
API reference
Ponder CLI

Ponder CLI

The Ponder CLI (provided by the @ponder/core package) is the entrypoint for your Ponder project.

Usage:
  $ ponder <command> [OPTIONS]
 
Commands:
  dev      Start the app in development mode
  start    Start the app in production mode
  serve    Start the web server (experimental)
  codegen  Generate the schema.graphql file, then exit
 
Options:
  --root [PATH]    Path to the project root directory (default: working directory)
  --config [PATH]  Path to the project config file (default: ponder.config.ts)
  -h, --help       Display this message 

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:
  -p, --port [PORT]          Port number for the the web server (default: 42069) 
  -H, --hostname [HOSTNAME]  Hostname for the web server (default: 0.0.0.0) 
  -v, --debug                Enable debug logging (realtime blocks, internal events) 
  -vv, --trace               Enable trace logging (db query logs, indexing checkpoints) 

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:
  -p, --port [PORT]          Port number for the the web server (default: 42069)
  -H, --hostname [HOSTNAME]  Hostname for the web server (default: 0.0.0.0)
  -v, --debug                Enable debug logging (realtime blocks, internal events) 
  -vv, --trace               Enable trace logging (db query logs, indexing checkpoints) 

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:
  -p, --port [PORT]          Port number for the the web server (default: 42069) 
  -H, --hostname [HOSTNAME]  Hostname for the web server (default: 0.0.0.0) 
  -v, --debug                Enable debug logging (realtime blocks, internal events) 
  -vv, --trace               Enable trace logging (db query logs, indexing checkpoints) 

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:
  -p, --port [PORT]          Port number for the the web server (default: 42069) 
  -H, --hostname [HOSTNAME]  Hostname for the web server (default: 0.0.0.0) 
  -v, --debug                Enable debug logging (realtime blocks, internal events) 
  -vv, --trace               Enable trace logging (db query logs, indexing checkpoints)