Skip to content
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 stopStop a running Surfnet
surfpool updateUpdate Surfpool to the latest version

​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.

​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.
--genesis-hash <HASH>nonestringnoneReport this hash from getGenesisHash instead of the datasource’s, so clients identify the Surfnet as that cluster. Offline, the default hash changes on every start.

​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. In 1.7.0 the Studio port (--studio-port) is still bound.
--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>-tinteger250Slot time in milliseconds.
--block-production-mode <MODE>-benumclockBlock production mode. Values: clock, transaction, manual.
--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:
Fork devnet:
Use a custom datasource RPC URL:
Print logs instead of launching the TUI:
Start without a remote RPC datasource:
Airdrop SOL to multiple accounts:
Load account state from snapshots:
Redeploy programs when target/deploy changes:
Persist Surfnet state in an on-disk SQLite database:
In a program directory, surfpool start writes a txtx.yml whose localnet environment points at http://127.0.0.1:8899, even when you pass another --port. In 1.7.0 the deployment Runbook then can’t reach the Surfnet, and startup fails with failed to fetch RPC endpoint version. Set rpc_api_url under environments.localnet in the generated txtx.yml to your port, then run surfpool start again.

​surfpool run

Executes a Runbook declared in a txtx.yml manifest, or a .tx file by path. Either way, surfpool run loads the manifest (./txtx.yml unless you pass --manifest-file-path), and the manifest must have an environments key. To run a standalone .tx file, a minimal manifest is enough:
txtx.yml

​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. Ignored in 1.7.0, which prints every output.
--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>-istringlocalhostWeb 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:
Run without supervision and write JSON outputs:
Run a .tx file by path (a txtx.yml must still exist, as shown above):

​surfpool ls

Lists all Runbooks declared in the workspace manifest.
FlagShortTypeDefaultDescription
--manifest-file-path <MANIFEST_PATH>-mpath./txtx.ymlPath to the runbook manifest.

​surfpool completions

Generates a shell completion script and writes it to a file named surfpool.<shell> in the current directory (for example ./surfpool.bash). It does not print the script to stdout.
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 stop

Stops a running Surfnet (for example one started with --daemon) by sending a stop request to its RPC server.
FlagShortTypeDefaultDescription
--host <HOST>-ostringlocalhostRPC host of the running Surfpool instance.
--port <PORT>-pintegernoneRPC port of the running Surfpool instance. Required unless --rpc-url is set.
--rpc-url <RPC_URL>-ustringnoneFull RPC URL of the running Surfpool instance.
In 1.7.0, surfpool stop shuts down the RPC server of a --daemon Surfnet but the process can keep running, and it ignores SIGTERM. Find it with pgrep -f "surfpool start" and end it with kill -9 <PID>.

​surfpool update

Updates the Surfpool CLI to the latest release, or to the version you pass.
FlagShortTypeDefaultDescription
--yes-ybooleanfalseSkip the confirmation prompt.
--version <VERSION>-vstringlatestUpdate to this version instead of the latest.