Toolchain

CLI Commands

Using the surfpool Command Line Interface (CLI)

The surfpool CLI starts local Surfnets, executes Runbooks, lists Runbooks from a workspace manifest, generates shell completions, and starts the Surfpool MCP server.

Commands

CommandDescription
surfpool startStart a local Surfnet. Alias: surfpool simnet
surfpool runExecute a Runbook
surfpool lsList Runbooks in the current workspace
surfpool completionsGenerate shell completion scripts
surfpool mcpStart the Surfpool MCP server

surfpool start

Starts a local Surfnet. If you run it in a Solana program directory, Surfpool can generate and execute Runbooks that deploy your programs.

surfpool start [OPTIONS]

Network & Ports

FlagShortTypeDefaultDescription
--port <PORT>-pinteger8899Bind the JSON-RPC server to this port.
--ws-port <PORT>-winteger8900Bind the WebSocket server to this port.
--host <HOST>-ostring127.0.0.1Bind RPC, WebSocket, and Studio services to this host.
--rpc-url <RPC_URL>-ustringnoneFork from this datasource RPC URL. Conflicts with --network. Can also be set with SURFPOOL_DATASOURCE_RPC_URL.
--network <NETWORK>-nenumnoneFork from a predefined Solana network. Values: mainnet, devnet, testnet. Conflicts with --rpc-url.
--offlinenonebooleanfalseRun without a remote RPC datasource.

Project & Deployment

FlagShortTypeDefaultDescription
--manifest-file-path <MANIFEST_PATH>-mpath./txtx.ymlPath to the runbook manifest.
--no-deploynonebooleanfalseDisable automatic program deployments.
--runbook <RUNBOOK>-rstring[]deploymentRunbook ID to execute after startup. Repeatable.
--runbook-input <INPUT_PATH>-ipath[]noneInput file to provide to runbook execution. Repeatable.
--yes-ybooleanfalseSkip runbook generation prompts.
--watchnonebooleanfalseRedeploy when program artifacts change.
--artifacts-path <ARTIFACTS_PATH>nonepathnoneDirectory containing .so program artifacts. Defaults to target/deploy when omitted.
--legacy-anchor-compatibilitynonebooleanfalseUse defaults suited for legacy Anchor test suites.
--anchor-test-config-path <TEST_TOML>nonepath[]noneAnchor Test.toml file to inspect. Repeatable.

Accounts & State

FlagShortTypeDefaultDescription
--airdrop <PUBKEY>-apubkey[]nonePubkey to airdrop SOL to at startup. Repeatable.
--airdrop-keypair-path <KEYPAIR_PATH>-kpath[]~/.config/solana/id.jsonKeypair path whose pubkey should receive an airdrop. Repeatable.
--airdrop-amount <LAMPORTS>-qinteger10000000000000Lamports to airdrop to each startup account.
--snapshot <SNAPSHOT_PATH>nonepath[]noneJSON account snapshot to preload. Repeatable. Later files override earlier files for duplicate keys.
--db <DB_URL>nonestringnoneDatabase connection URL for persistent Surfnet state. Use :memory: for in-memory SQLite, a .sqlite file for on-disk SQLite, or a PostgreSQL URL when built with the postgres feature.
--surfnet-id <SURFNET_ID>nonestringdefaultStorage namespace for this Surfnet instance.

Runtime & UI

FlagShortTypeDefaultDescription
--no-tuinonebooleanfalsePrint logs instead of launching the terminal UI.
--no-studiononebooleanfalseDisable Surfpool Studio.
--studio-port <PORT>-sinteger18488Bind Studio to this port.
--daemonnonebooleanfalseRun Surfpool as a background process. Daemon mode is Linux-only.
--cinonebooleanfalseUse settings suitable for CI. This disables the TUI, Studio, instruction profiling, and log output.

SVM Behavior

FlagShortTypeDefaultDescription
--slot-time <MILLISECONDS>-tinteger400Slot time in milliseconds.
--block-production-mode <MODE>-benumclockBlock production mode.
--feature <FEATURE_PUBKEY>-fpubkey[]noneEnable an SVM feature by pubkey. Repeatable. Feature names are deprecated but still accepted for previously supported names.
--disable-feature <FEATURE_PUBKEY>nonepubkey[]noneDisable an SVM feature by pubkey. Repeatable. Feature names are deprecated but still accepted for previously supported names.
--features-allnonebooleanfalseEnable all SVM features from agave-feature-set.
--skip-signature-verificationnonebooleanfalseSkip transaction signature verification.
--skip-blockhash-checknonebooleanfalseSkip transaction blockhash validation.

Observability & Performance

FlagShortTypeDefaultDescription
--geyser-plugin-config <PLUGIN_CONFIG_PATH>-gpath[]noneGeyser plugin config file to load. Repeatable.
--disable-instruction-profilingnonebooleanfalseDisable instruction profiling.
--max-profiles <COUNT>-cinteger200Transaction profiles to retain in memory. Higher values increase memory usage.
--log-bytes-limit <BYTES>noneinteger10000Maximum bytes stored for each transaction log. Set to 0 for unlimited logs.
--log-level <LEVEL>-lenuminfoSimnet log level. Values: trace, debug, info, warn, error, none.
--log-path <LOG_DIR>nonepath.surfpool/logsDirectory for simnet logs.
--metrics-enablednonebooleanenv: SURFPOOL_METRICS_ENABLEDEnable the Prometheus metrics endpoint. Available when Surfpool is built with the prometheus feature.
--metrics-addr <METRICS_ADDR>nonestring127.0.0.1:9000Prometheus metrics endpoint address. Can also be set with SURFPOOL_METRICS_ADDR. Available when Surfpool is built with the prometheus feature.

Deprecated Compatibility

FlagShortTypeDefaultDescription
--subgraph-db <SUBGRAPH_DB>-dstring:memory:Deprecated and hidden from surfpool start --help. Existing scripts can still pass it for compatibility.

Examples

Start with default settings:

surfpool start

Fork devnet:

surfpool start --network devnet

Use a custom datasource RPC URL:

surfpool start --rpc-url https://api.mainnet-beta.solana.com

Print logs instead of launching the TUI:

surfpool start --no-tui

Start without a remote RPC datasource:

surfpool start --offline

Airdrop SOL to multiple accounts:

surfpool start --airdrop <PUBKEY> --airdrop <PUBKEY>

Load account state from snapshots:

surfpool start --snapshot ./snapshot1.json --snapshot ./snapshot2.json

Redeploy programs when target/deploy changes:

surfpool start --watch

Persist Surfnet state in an on-disk SQLite database:

surfpool start --db ./surfnet.sqlite --surfnet-id local-dev

surfpool run

Executes a Runbook. You can run a .tx file directly or reference a Runbook declared in a txtx.yml manifest.

surfpool run [OPTIONS] <RUNBOOK>

Arguments

ArgumentTypeDescription
<RUNBOOK>stringRunbook ID from txtx.yml, or path to a .tx file.

Project

FlagShortTypeDefaultDescription
--manifest-file-path <MANIFEST_PATH>-mpath./txtx.ymlPath to the runbook manifest.
--env <ENVIRONMENT>nonestringnoneEnvironment from txtx.yml to use.

Execution Mode

These flags are mutually exclusive. If none is specified, Surfpool uses browser supervision.

FlagShortTypeDefaultDescription
--unsupervised-ubooleanfalseExecute without the supervisor UI.
--browser-bbooleandefault modeExecute with supervision in the browser UI.
--terminal-tbooleanfalseExecute with supervision in the terminal console.

Inputs & Outputs

FlagShortTypeDefaultDescription
--output-json [<OUTPUT_DIR>]noneoptional pathnonePrint or write Runbook outputs as JSON. When a directory is provided, output is written to a file in that directory.
--output <OUTPUT_NAME>nonestringnonePrint one named output at the end of execution. Conflicts with --output-json.
--input <INPUT_PATH>nonepath[]noneInput file to use for batch processing. Repeatable.

Execution

FlagShortTypeDefaultDescription
--explainnonebooleanfalseExplain how the Runbook will execute.
--force-fbooleanfalseIgnore cached execution state.

Supervisor UI

These flags are available when Surfpool is built with the supervisor_ui feature.

FlagShortTypeDefaultDescription
--port <PORT>-pinteger8488Web UI port.
--ip <IP_ADDRESS>-istring127.0.0.1Web UI IP address.

Logging

FlagShortTypeDefaultDescription
--log-level <LEVEL>-lenuminfoRunbook execution log level. Values: trace, debug, info, warn, error.
--log-path <LOG_DIR>nonepath.surfpool/logsDirectory for runbook execution logs.

Examples

Run a manifest Runbook with browser supervision:

surfpool run deployment

Run without supervision and write JSON outputs:

surfpool run deployment --unsupervised --output-json .surfpool/runbook-outputs

Run a .tx file directly:

surfpool run ./runbooks/deployment.tx

surfpool ls

Lists all Runbooks declared in the workspace manifest.

surfpool ls [OPTIONS]
FlagShortTypeDefaultDescription
--manifest-file-path <MANIFEST_PATH>-mpath./txtx.ymlPath to the runbook manifest.

surfpool completions

Generates shell completion scripts.

surfpool completions <SHELL>
ArgumentTypeDescription
<SHELL>enumShell to generate completions for. Values: bash, elvish, fish, powershell, zsh.

surfpool mcp

Starts the Surfpool MCP server for AI tool integration.

surfpool mcp

On this page