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.
| Subcommand | Purpose |
|---|---|
start | Run a SurrealDB server (in memory, on disk, or clustered). |
sql | Open an interactive SurrealQL shell or run queries from scripts. |
import | Load SurrealQL from a file into a database. |
export | Dump a database to SurrealQL. |
fix | Apply data or schema fixes offline. |
ml | Work with machine-learning features from the CLI. |
module | Build and manage WASM modules (including Surrealism). |
validate | Validate SurrealQL or configuration. |
upgrade | Upgrade between SurrealDB versions. |
version | Print CLI and server version information. |
help | Show help for the CLI or a subcommand. |
isready | Health 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.