Light
Dark
System
v4latest
v4latest
v3
v2
v1

Using the CLI

To initialize a new project:

Copy
$ 
edgedb project init

If an edgedb.toml file exists in the current directory, it will initialize a new project according to the settings defined in it.

Otherwise, a new project will be initialized and an edgedb.toml file and dbschema directory will be generated. For details on using projects, see the dedicated guide.

Once initialized, you can run the CLI commands below without additional connection options. If you don’t set up a project, you’ll need to use flags to specify the target instance for each command.

Explicitly create a new EdgeDB instance my_instance:

Copy
$ 
edgedb instance create my_instance

Create a database:

Copy
$ 
edgedb database create special_db
OK: CREATE

Configure passwordless access (such as to a local development database):

Copy
$ 
> 
> 
> 
edgedb configure insert Auth \
--comment 'passwordless access' \
--priority 1 \
--method Trust
OK: CONFIGURE INSTANCE

Configure access that checks password (with a higher priority):

Copy
$ 
> 
> 
> 
edgedb configure insert Auth \
--comment 'password is required' \
--priority 0 \
--method SCRAM
OK: CONFIGURE INSTANCE

Connect to the default project database:

Copy
$ 
edgedb
EdgeDB 1.0-beta.2+ga7130d5c7.cv202104290000 (repl 1.0.0-beta.2)
Type \help for help, \quit to quit.
edgedb>

Connect to some specific database:

Copy
$ 
edgedb -d special_db
EdgeDB 1.0-beta.2+ga7130d5c7.cv202104290000 (repl 1.0.0-beta.2)
Type \help for help, \quit to quit.
special_db>
Light
Dark
System

We use ChatGPT with additional context from our documentation to answer your questions. Not all answers will be accurate. Please join our Discord if you need more help.