Skip to content
gurl init

gurl init

Create a .gurl/ directory so collections and environments can live in your repository, next to the code that uses them.

Synopsis

gurl init [--project-dir <path>]

gurl init writes .gurl/ (with .gurl/.gitignore, which keeps local collection.key files out of git). After that, gurl walks up parent directories to find .gurl/; in CI, point at it with GURL_PROJECT_DIR or the global --project-dir flag.

.gurl/
  collections/
    users-api/
      collection.json
      list-users.json
      collection.key   # local only, gitignored
  environments/
    staging.json

Flags

FlagShortDefaultDescription
--project-dircurrent directoryProject root for .gurl file storage

Examples

Start a project in the current repo

gurl init

Move an existing collection into the project and commit it

gurl collection migrate "payments-api"
git add .gurl
git commit -m "add payments API collection"

Initialize another directory

gurl init --project-dir ./services/billing

Related commands