Environments

Environments are at the heart of how you manage and share configuration in Ghostable.

Each project can have as many environments as you need. While “production” and “staging” are common defaults, you’re free to create environments for feature testing, client-specific setups, or anything else your workflow requires.

Environments store your .env variables and control how they’re organized, accessed, and shared. You can safely push, pull, or request environment data using the Ghostable CLI — all tied to a specific environment within a project.

Think of environments as named contexts for your configuration — flexible, secure, and built for collaboration.

Pushing Variables

To upload your local .env file to Ghostable, use the push command:

ghostable env:push

You’ll be prompted to select the project and environment you want to push to. This securely uploads your .env contents to Ghostable so they can be shared or backed up.

Note: Ghostable only pushes keys that exist in your local .env file. It does not overwrite remote keys unless they are present in your file.


Pulling Variables

To fetch a remote environment and write it to your local .env file, use the pull command:

ghostable env:pull

You’ll choose the project and environment you want to pull from. The CLI will download the latest variables and update your local .env file.

Important: Your local .env file will be overwritten. If you have changes you want to preserve, commit or back them up before pulling.