Local Environment Files | Ghostable Desktop | Ghostable                              Menu

 Local Environment Files

   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.

  Keep local files ignored

 Confirm `.env` and any environment-specific plaintext files are covered by `.gitignore`. Generated `.env.example` files should contain reviewed placeholders or intentionally safe values only.

 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.

  Push can overwrite shared values

 A stale local file can replace newer shared configuration. Pull the latest Git state, compare the file, confirm the selected environment, and provide a reason that explains the batch update.

 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](https://ghostable.dev/docs/desktop/reference/project-settings) for the exact controls.

    On this page

    [ ![Ghostable](https://ghostable.dev/images/logo-dark.svg) ![Ghostable](https://ghostable.dev/images/logo-light.svg) ](https://ghostable.dev)

   Desktop     [   CLI 3.x ](https://ghostable.dev/docs/3.x) [   Desktop ](https://ghostable.dev/docs/desktop)

  CLI 3.x introduction Documentation local first no login encrypted repository plaintext hosted service

  Installation Documentation brew homebrew npm npx linux windows PATH version update

  Start a new project Getting Started setup seed dotenv owner initialize

  Adopt an existing project Getting Started existing env import authoritative source adopt

  Onboard a team member Getting Started join request approve roles offboarding pull request

  Repository and storage Core Concepts .ghostable git conflict merge worktree private identity metadata

  Environments Core Concepts protected production preview staging push sync pull replace run mask-output

  Variables and promotions Core Concepts var promote copy context annotation key

  Access and devices Core Concepts identity reader writer grantor owner revoke rotate leave delete

  Daily development workflow Workflows pull diff validate review clean daily

  Review and secret scanning Workflows scan sarif github suppress secrets drift

  Hygiene and rotation Workflows rotation stale unused suppression environment key

  Automation credentials Automation &amp; CI GHOSTABLE\_CI\_TOKEN ci deploy credential powershell revoke replace

  Continuous integration Automation &amp; CI GitHub Actions fork pull request JSON stdout stderr exit codes mask-output

  Deployments Automation &amp; CI Forge Vapor Cloud provider CLI dry-run preserve remote keys temporary files

  Validation Reference schema required nullable regex min max different\_from

  Command reference Reference --help --json NO\_COLOR flags aliases exit code automation

  Configuration Reference ghostable.yaml activity mode auditEnvironments scan ignores deployTarget dotenv syntax

  Security Reference cryptography XChaCha20 Poly1305 HKDF user presence threat model

  Backups &amp; Offline Reference recovery offline restore clone key identity

  Agent integration Reference AGENTS.md capabilities allowlist coding agent

  Troubleshooting Reference no project found revoked identity stale policy user presence invalid CI token provider CLI git conflict diagnostics

  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
