Toolchain

CLI Commands

Using the surfpool Command Line Interface (CLI)

The surfpool CLI is used to start local Surfnets (Solana simulation networks), execute Runbooks, and manage cloud deployments.

surfpool start

Starts a local Surfnet. If run in a Solana program directory, Surfpool automatically generates Runbooks to deploy your programs.

surfpool start [OPTIONS]

Network Options

FlagShortDescriptionDefault
--port-pSimnet RPC port8899
--ws-port-wSimnet WebSocket port8900
--host-oSimnet host address127.0.0.1
--slot-time-tSlot time in milliseconds400
--block-production-mode-bBlock production mode: clock, transaction, or manualclock
--rpc-url-uDatasource RPC URL (conflicts with --network)-
--network-nPredefined network: mainnet, devnet, or testnet (conflicts with --rpc-url)-
--offline-Start without remote RPC clientfalse

Deployment Options

FlagShortDescriptionDefault
--manifest-file-path-mPath to the manifest./txtx.yml
--no-deploy-Disable auto deploymentsfalse
--runbook-rRunbook IDs to execute (repeatable)deployment
--runbook-input-iInputs for runbooks (repeatable)-
--yes-ySkip prompts, assume "yes" for allfalse
--watch-Watch target/deploy and re-deploy when .so files changefalse
--snapshot-Path to JSON snapshot file(s) to preload accounts (repeatable)-

Airdrop Options

FlagShortDescriptionDefault
--airdrop-aPubkeys to airdrop tokens to (repeatable)-
--airdrop-amount-qAmount of lamports to airdrop10000000000000
--airdrop-keypair-path-kKeypair paths to airdrop (repeatable)~/.config/solana/id.json

UI Options

FlagShortDescriptionDefault
--no-tui-Display logs instead of terminal UI dashboardfalse
--no-studio-Disable Studiofalse
--studio-port-sStudio port18488

Logging & Profiling

FlagShortDescriptionDefault
--log-level-lLog level: trace, debug, info, warn, error, noneinfo
--log-path-Directory for simnet logs.surfpool/logs
--disable-instruction-profiling-Disable instruction profilingfalse
--max-profiles-cMax transaction profiles held in memory200
--log-bytes-limit-Max bytes allowed in transaction logs (0 = unlimited)10000

Database Options

FlagShortDescriptionDefault
--db-Surfnet database URL for persistence (:memory:, .sqlite file, or postgres URL)-
--surfnet-id-Unique ID for this surfnet instance (isolates database storage)default
--subgraph-db-dSubgraph database URL (sqlite :memory: or postgres):memory:

Plugin & Feature Options

FlagShortDescriptionDefault
--geyser-plugin-config-gGeyser plugin config JSON files to load (repeatable)-
--feature-fEnable specific SVM features (repeatable)-
--disable-feature-Disable specific SVM features (repeatable)-
--features-all-Enable all SVM features (overrides mainnet defaults)false

Compatibility & CI

FlagShortDescriptionDefault
--ci-CI mode: disables profiling, studio, tui; sets log level to nonefalse
--daemon-Start as background process (Linux only)false
--legacy-anchor-compatibility-Apply defaults for Anchor test suite compatibilityfalse
--anchor-test-config-path-Path to Test.toml test suite files (repeatable)-

Examples

Start with default settings:

surfpool start

Start with a specific datasource network and custom slot time:

surfpool start --network mainnet --slot-time 200

Start in CI mode:

surfpool start --ci

Start with airdrops and watch mode:

surfpool start -a MyPubkey123 --watch

surfpool run

Executes a Runbook. Can run a .tx file directly or reference a runbook declared in a txtx.yml manifest.

surfpool run [OPTIONS] <RUNBOOK>

Arguments

ArgumentDescription
RUNBOOKName of the runbook as indexed in txtx.yml, or path to a .tx file

Execution Mode

These flags are mutually exclusive. If none is specified, --browser is the default.

FlagShortDescription
--unsupervised-uExecute without supervision
--browser-bExecute with browser UI supervision (default)
--terminal-tExecute with terminal supervision (coming soon)

Options

FlagShortDescriptionDefault
--manifest-file-path-mPath to the manifest./txtx.yml
--output-json-Output in JSON format; optionally provide a directory to write to file-
--output-Pick specific output to stdout (conflicts with --output-json)-
--explain-Explain how the runbook will be executedfalse
--port-pWeb UI port8488
--ip-iWeb UI IP address127.0.0.1
--env-Environment to use from txtx.yml config-
--input-Inputs for batch processing (repeatable)-
--force-fExecute even if cached state shows already executedfalse
--log-level-lLog level: trace, debug, info, warn, errorinfo
--log-path-Directory for runbook logs.surfpool/logs

Supervised Mode

By default, surfpool run starts a web server for manual interaction with your Runbook execution steps. Each step can be validated, and runtime data can be input during execution.

surfpool run my-runbook
→ Processing manifest './txtx.yml'
✓ Runbook 'My Runbook' successfully checked and loaded

→ Running Web console
http://127.0.0.1:8488

Unsupervised Mode

In unsupervised mode, each Runbook step executes automatically in order. This is what Surfpool uses by default when deploying programs to your Surfnet.

surfpool run my-runbook -u
→ Processing manifest './txtx.yml'
✓ Runbook 'My Runbook' successfully checked and loaded

→ Starting runbook 'My Runbook' execution in unsupervised mode
┌───────┬───┐
│ ouput │ 1 │
└───────┴───┘

surfpool ls

Lists all runbooks declared in the manifest in the current directory.

surfpool ls [OPTIONS]
FlagShortDescriptionDefault
--manifest-file-path-mPath to the manifest./txtx.yml

surfpool cloud

Commands for interacting with the Txtx Cloud platform.

surfpool cloud login

Authenticate with Txtx Cloud.

surfpool cloud login

surfpool cloud start

Start a new Cloud Surfnet instance.

surfpool cloud start [OPTIONS]
FlagShortDescriptionDefault
--workspace-wWorkspace name-
--name-nName of the surfnet to create-
--description-dDescription for the surfnet-
--rpc-url-uDatasource RPC URLhttps://api.mainnet-beta.solana.com
--block-production-bBlock production mode: clock, transaction, or manual-
--profile-transactions-Enable transaction profilingfalse

surfpool completions

Generate shell completion scripts.

surfpool completions <SHELL>
ArgumentDescription
SHELLTarget shell (e.g., bash, zsh, fish)

surfpool mcp

Start an MCP (Model Context Protocol) server for AI tool integration.

surfpool mcp

On this page