Local Environment Files

Workflows

Local Environment Files

Compare encrypted shared state with local files, pull or push deliberate changes, and keep plaintext outside Git.

Two different stores

Shared Ghostable environments are encrypted repository state. A local .env file is plaintext on one machine. Desktop connects these stores through explicit actions; it does not make a local file safe to commit.

Compare environments

Use Compare Environments to inspect key and value differences before copying state. A comparison is read-only: it helps you identify missing, changed, or extra keys without mutating either side.

Compare first when promoting configuration between development, staging, and production. Environment types and access policy still apply to the destination.

Pull a local file

Pull Local File writes the selected shared environment into a plaintext file inside the repository. Choose the target path carefully and preview the operation when offered.

  1. Select the source shared environment.
  2. Open environment actions and choose Pull Local File.
  3. Confirm the path and review the planned keys.
  4. Write the file, then verify permissions and Git ignore status.

Pull only when a framework or tool actually requires a file. Prefer direct process injection through the CLI when no file is necessary.

Push a local file

Push Local File reads a plaintext file and updates the selected encrypted environment. It can change multiple values at once, so compare and inspect the destination before confirming.

Synchronize a file

Sync Local File reconciles the configured local file and shared environment according to the action's preview. Treat sync as a write operation, not background magic: inspect additions, updates, removals, and commented keys before continuing.

When the local and shared versions both changed, stop and decide which value is authoritative. Desktop cannot infer team intent from two valid values.

Example and cleanup tools

Project Settings can generate .env.example from an environment in dry-run or replace mode. Review which values are kept and which are blanked before replacing an existing file.

Cleanup tools can preview local environment files that match the project's conventions and remove them after confirmation. Dry-run first, and only include .env.example when you deliberately want it considered. See Project Settings for the exact controls.

CLI 3.x introduction Documentation
Installation Documentation
Start a new project Getting Started
Adopt an existing project Getting Started
Onboard a team member Getting Started
Repository and storage Core Concepts
Environments Core Concepts
Variables and promotions Core Concepts
Access and devices Core Concepts
Daily development workflow Workflows
Review and secret scanning Workflows
Hygiene and rotation Workflows
Automation credentials Automation & CI
Continuous integration Automation & CI
Deployments Automation & CI
Validation Reference
Command reference Reference
Configuration Reference
Security Reference
Backups & Offline Reference
Agent integration Reference
Troubleshooting Reference
Ghostable Desktop overview Desktop
Installation Desktop
Projects and setup Desktop
Interface tour Desktop
Environments and variables Desktop
Local environment files Desktop
Validation and review Desktop
Activity Desktop
Access and automation Desktop
Project settings Desktop
Application settings Desktop
Licensing and updates Desktop
Security and storage Desktop
Troubleshooting Desktop
No results found