Skip to content

surreal db

/

CLI commands

help

Print the help information for surreal db, or for one of its subcommands.

surreal db help and surreal help print different things. surreal db help is the database's own help, described on this page, because everything after db is forwarded to the database. surreal help and surreal --help are the launcher's help, which lists the components and the commands that manage what is installed. See Launcher help.

Usage
surreal db help [COMMAND]surreal db <COMMAND> --help

Global options

NameDefaultEnvironment variableDescription
--online-version-check
NoneSURREAL_ONLINE_VERSION_CHECKWhether to allow a web check for client version upgrades at start.
--help, -h
NoneNonePrint help. Accepted by the binary and by every subcommand.
--version, -V
NoneNonePrint the version of the database component.
--log, -l<LOG>
infoSURREAL_LOGThe logging level for the command-line tool. Possible values: none, full, error, warn, info, debug, trace.

To see the general help information for the database, run surreal db help without any further arguments. This command lists the subcommands of surreal db.

surreal db help

The output of the above command:

 .d8888b.                                             888 8888888b.  888888b.
d88P  Y88b                                            888 888  'Y88b 888  '88b
Y88b.                                                 888 888    888 888  .88P
 'Y888b.   888  888 888d888 888d888  .d88b.   8888b.  888 888    888 8888888K.
    'Y88b. 888  888 888P'   888P'   d8P  Y8b     '88b 888 888    888 888  'Y88b
      '888 888  888 888     888     88888888 .d888888 888 888    888 888    888
Y88b  d88P Y88b 888 888     888     Y8b.     888  888 888 888  .d88P 888   d88P
 'Y8888P'   'Y88888 888     888      'Y8888  'Y888888 888 8888888P'  8888888P'


To get started using SurrealDB, and for guides on connecting to and building applications
on top of SurrealDB, check out the SurrealDB documentation (https://surrealdb.com/docs).

If you have questions or ideas, join the SurrealDB community (https://surrealdb.com/community).

If you find a bug, submit an issue on GitHub (https://github.com/surrealdb/surrealdb/issues).

We would love it if you could star the repository (https://github.com/surrealdb/surrealdb).

----------

Usage: surreal [OPTIONS] <COMMAND>

Commands:
  start     Start the database server
  import    Import a SurrealQL script into an existing database
  export    Export an existing database as a SurrealQL script
  version   Output the command-line tool and remote server version information
  upgrade   Upgrade to the latest stable version
  sql       Start an SQL REPL in your terminal with pipe support
  mcp       Start the MCP server over stdio for AI assistant integration
  ml        Manage SurrealML models within an existing database
  module    Manage and execute WASM modules
  is-ready  Check if the SurrealDB server is ready to accept connections [aliases: isready]
  validate  Validate SurrealQL query files
  fix       Fix database storage issues
  v2        Run commands in version 2 of the database for backwards compatibility
  help      Print this message or the help of the given subcommand(s)

Options:
      --online-version-check  Whether to allow web check for client version upgrades at start [env: SURREAL_ONLINE_VERSION_CHECK=]
  -h, --help                  Print help
  -V, --version               Print version

Logging:
  -l, --log <LOG>                              The logging level for the command-line tool [env: SURREAL_LOG=] [default: info] [possible
                                               values: none, full, error, warn, info, debug, trace]
      --log-format <LOG_FORMAT>                The format for terminal log output [env: SURREAL_LOG_FORMAT=] [default: text] [possible
                                               values: text, json]
      --log-socket <LOG_SOCKET>                Send logs to the specified host:port [env: SURREAL_LOG_SOCKET=]
      --log-file-level <LOG_FILE_LEVEL>        Override the logging level for file output [env: SURREAL_LOG_FILE_LEVEL=] [possible values:
                                               none, full, error, warn, info, debug, trace]
      --log-otel-level <LOG_OTEL_LEVEL>        Override the logging level for OpenTelemetry output [env: SURREAL_LOG_OTEL_LEVEL=] [possible
                                               values: none, full, error, warn, info, debug, trace]
      --log-socket-level <LOG_SOCKET_LEVEL>    Override the logging level for unix socket output [env: SURREAL_LOG_SOCKET_LEVEL=] [possible
                                               values: none, full, error, warn, info, debug, trace]
      --log-socket-format <LOG_SOCKET_FORMAT>  The format for socket output [env: SURREAL_LOG_SOCKET_FORMAT=] [default: text] [possible
                                               values: text, json]
      --log-file-enabled                       Whether to enable log file output [env: SURREAL_LOG_FILE_ENABLED=]
      --log-file-path <LOG_FILE_PATH>          The directory where log files will be stored [env: SURREAL_LOG_FILE_PATH=] [default: logs]
      --log-file-name <LOG_FILE_NAME>          The name of the log file [env: SURREAL_LOG_FILE_NAME=] [default: surrealdb.log]
      --log-file-format <LOG_FILE_FORMAT>      The format for log file output [env: SURREAL_LOG_FILE_FORMAT=] [default: text] [possible
                                               values: text, json]
      --log-file-rotation <LOG_FILE_ROTATION>  The log file rotation interval [env: SURREAL_LOG_FILE_ROTATION=] [default: daily] [possible
                                               values: daily, hourly, never]

The upgrade entry appears in the database's own list, but surreal db upgrade is refused. Use surreal upgrade db.

surreal help and surreal --help print the launcher's help. It lists the components (db, cloud), the commands that manage what is installed (version, install, upgrade, use, uninstall), and the +VERSION option that runs another version for one command. Run surreal <COMPONENT> help, such as surreal cloud help, for the help of a component. The --no-banner option, or SURREAL_CLI_NO_BANNER, prints the launcher help without the banner. See the launcher reference for each of these commands.

For individual commands, such as surreal db start and surreal db sql, a help prompt can be displayed by adding the --help flag. This flag overrides all other flags, and thus can be added to the end of any command regardless of length.

surreal db start --help
surreal db start --user root --pass secret --log debug --help

Was this page helpful?