EdgeDB includes the all-encompassing
edgedb command-line tool. It
provides an idiomatic way to do just about everything: install EdgeDB,
spin up a local instance, open a REPL, execute queries, manage auth
roles, introspect a database schema, create migrations, and more.
You can install it with one shell command.
On Linux or MacOS, run the following in your terminal and follow the on-screen instructions:
curl --proto '=https' -sSf1 https://sh.edgedb.com | sh
For Windows, the installation script is:
iwr https://ps1.edgedb.com -useb | iex
The script, inspired by
detect the OS and download the appropriate build of the EdgeDB CLI
edgedb command is a single executable (it’s open source!)
Once installed, the
edgedb command can be used to install,
uninstall, upgrade, and interact with EdgeDB server instances.
You can uninstall EdgeDB server or remove the
edgedb command at
All commands respect a common set of connection options, which let you specify a target instance. This instance can be local to your machine or hosted remotely.
To install the nightly version of the CLI (not to be confused with the nightly version of EdgeDB itself!) use this command:
curl --proto '=https' --tlsv1.2 -sSf https://sh.edgedb.com | \ sh -s -- --nightly
Command-line tools contain just one binary, so to remove it on Linux or macOS run:
rm "$(which edgedb)"
To remove all configuration files, run
edgedb info to list the directories
where EdgeDB stores data, then use
rf -rf <dir> to delete those
If the command-line tool was installed by the user (recommended) then it will also remove the binary.
edgedb instance destroy <instance_name>
edgedb server uninstall --version=<ver>
To list instances and server versions use the following commands respectively:
edgedb instance status
edgedb server list-versions --installed
You can customize the behavior of the
edgedb CLI and REPL with a
global configuration file. The file is called
cli.toml and its
location differs between operating systems. Use
edgedb info to find the “Config” directory on your
cli.toml has the following structure. All fields are optional:
[shell] expand-strings = true # Stop escaping newlines in quoted strings history-size = 10000 # Set number of entries retained in history implicit-properties = false # Print implicit properties of objects implicit-limit = 100 # Set implicit LIMIT # Defaults to 100, specify 0 to disable input-mode = "emacs" # Set input mode. One of: vi, emacs output-format = "default" # Set output format. # One of: default, json, json-pretty, # json-lines print-stats = false # Print statistics on each query verbose-errors = false # Print all errors with maximum verbosity