• Start

SurrealDB CLI

/

CLI commands

Overview

How the SurrealDB CLI is organised into subcommands, with links to each command’s flags and examples.

The surreal executable exposes a single entry point with subcommands for running the server, executing SurrealQL, importing and exporting data, and maintenance tasks. Each page documents that subcommand’s arguments, related environment variables, and typical usage.

SubcommandPurpose
startRun a SurrealDB server (in memory, on disk, or clustered).
sqlOpen an interactive SurrealQL shell or run queries from scripts.
importLoad SurrealQL from a file into a database.
exportDump a database to SurrealQL.
fixApply data or schema fixes offline.
mlWork with machine-learning features from the CLI.
moduleBuild and manage WASM modules (including Surrealism).
validateValidate SurrealQL or configuration.
upgradeUpgrade between SurrealDB versions.
versionPrint CLI and server version information.
helpShow help for the CLI or a subcommand.
isreadyHealth check for readiness probes.

For installation and a minimal end-to-end example, see the SurrealDB CLI overview. For environment variables that mirror CLI flags, see Environment variables.

Was this page helpful?