Search...
ctrl/
Light
Dark
System
Sign in

gel project init​

Setup a new project.

gel project init [options]

This command sets up a new project, creating an instance, a schema directory, and an gel.toml file. It can also be used to convert an existing directory to a project directory, connecting the existing instance to the project. Typically this tool will prompt for specific details about how the project should be setup.

Gel Cloud users may use this command to create a Cloud instance after logging in using gel cloud login.

To create a Cloud instance, your instance name should be in the format <org-name>/<instance-name>. Cloud instance names may contain alphanumeric characters and hyphens (i.e., -). You can provide this Cloud instance name through the interactive project initiation by running gel project init or by providing it via the --server-instance option.

Please be aware of the following restrictions on Gel Cloud instance names:

  • can contain only Latin alpha-numeric characters or -

  • cannot start with a dash (-) or contain double dashes (--)

  • maximum instance name length is 61 characters minus the length of your organization name (i.e., length of organization name + length of instance name must be fewer than 62 characters)

--link

Specifies whether the existing Gel server instance should be linked with the project.

This option is useful for initializing a copy of a project freshly downloaded from a repository with a pre-existing project database.

--no-migrations

Skip running migrations.

There are two main use cases for this option:

  1. With --link option to connect to a datastore with existing data.

  2. To initialize a new instance but then restore dump to it.

--non-interactive

Run in non-interactive mode (accepting all defaults).

--project-dir=project-dir

The project directory can be specified explicitly. Defaults to the current directory.

--server-instance=server-instance

Specifies the Gel server instance to be associated with the project.

--server-version=server-version

Specifies the Gel server instance to be associated with the project.

By default, when you specify a version, the CLI will use the latest release in the major version specified. This command, for example, will install the latest 6.x release:

Copy
$ 
gel project init --server-version 6.1

You may pin to a specific version by prepending the version number with an equals sign. This command will install version 6.1:

Copy
$ 
gel project init --server-version =6.1

Some shells like ZSH may require you to escape the equals sign (e.g., \=6.1) or quote the version string (e.g., "=6.1").