SurrealDB ships three command-line tools. They are installed separately and cover different jobs, so most workflows use more than one of them.
| Tool | Covers | Reference |
|---|---|---|
surrealctl | The control plane: organisations, instances, members, tokens, and billing. | surrealctl |
surreal | The data plane: run a server, query it, and move data in and out. | SurrealDB CLI |
surqlfmt | Formatting .surql files to a consistent style. | SurrealQL formatter |
surrealctl
surrealctl manages SurrealDB Cloud from the command line: it signs you in, selects an organisation, and creates, scales, pauses, and deletes instances. Every command can emit JSON, so it is the scriptable path for CI pipelines and provisioning scripts.
surrealctl auth login
surrealctl instance create api --type shared-1 --region aws-euw1surrealctl never replaces surreal. For SurrealQL work against a Cloud instance it resolves the endpoint and credentials, then hands off to the surreal binary.
See the surrealctl reference for installation, authentication, global flags, and every command.
SurrealDB CLI
The surreal binary is the data-plane tool. It starts a server, opens an interactive SurrealQL shell, imports and exports data, validates query files, and reports the version in use.
surreal start --user root --pass secret
surreal sql --username root --password secret --prettySee the SurrealDB CLI reference for a walkthrough, the command list for each subcommand, and environment variables for the SURREAL_* variables that mirror its flags.
SurrealQL formatter
surqlfmt reformats .surql files to a consistent style. It is distributed as an npm package rather than as part of the surreal binary, which makes it easy to pin in a project and run in CI.
npm install -g @surrealdb/surql-fmt
surqlfmt --check ./src/**/*.surqlSee the SurrealQL formatter reference for its options and usage patterns.