Output the version of the database component, or the version of a remote server. The launcher has its own version commands, described below.
surreal db version [OPTIONS]Example usage
To display the version of the database component, along with the platform and architecture, run surreal db version without any further arguments.
surreal db versionExample output:
4.0.0 for macos on aarch64If an endpoint is specified, only the version number of the server is displayed.
surreal db version --endpoint http://localhost:8000Output:
4.0.0Launcher versions
surreal list and surreal --version belong to the launcher and do not forward to the database. surreal list prints a table with each component, the version that runs, where that version came from, and its path. surreal --version prints the launcher's own version.
surreal listCOMPONENT VERSION SOURCE INSTALLED PATH
cli 1.0.0 cli /usr/local/bin/surreal
db 4.0.0 pinned 4.0.0 /home/you/.surrealdb/components/db/4.0.0/surreal-db
ext
cloud 1.0.0 pinned 1.0.0 /home/you/.surrealdb/components/cloud/1.0.0/surreal-cloud
lsp
memorysurreal --version1.0.0 for macos on aarch64A component that is not installed has a blank row in the table. To query a server, or to print the database version alone, use surreal db version. surreal version without db is the deprecated form of surreal db version, so it prints the database version and a warning that names the replacement. See the launcher reference for the other version commands, including surreal install, surreal use and surreal upgrade.