Using the CLI
To initialize a new project:
$
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
:
$
edgedb instance create my_instance
Create a branch:
$
edgedb branch create feature
OK: CREATE
Configure passwordless access (such as to a local development database):
$ > > >
edgedb configure insert Auth \
--comment 'passwordless access' \
--priority 1 \
--method Trust
OK: CONFIGURE INSTANCE
Configure access that checks password (with a higher priority):
$ > > >
edgedb configure insert Auth \
--comment 'password is required' \
--priority 0 \
--method SCRAM
OK: CONFIGURE INSTANCE
Connect to the default project branch:
$
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 branch:
$
edgedb -b feature
EdgeDB 1.0-beta.2+ga7130d5c7.cv202104290000 (repl 1.0.0-beta.2) Type \help for help, \quit to quit. special_db>