Workflows
Daily Development
Use a predictable, review-first loop for loading configuration, changing values, validating the result, and committing encrypted state.
Start from current state
Pull the branch before materializing values so local work uses the latest encrypted records and grants:
$ git pull --ff-only
$ ghostable status
$ ghostable env diff --env default --file .env
If the diff is intentional local work, keep it. Otherwise, pull the shared environment into the file before starting.
Run the application
Prefer process injection when the application does not require a physical .env file:
$ ghostable env run --env default -- php artisan serve
$ ghostable env run --env default --mask-output -- npm test
Use env pull when framework tooling specifically reads a file.
Change configuration
Edit the local env file with normal developer tools, then inspect the redacted diff before storing it:
$ ghostable env diff --env default --file .env
$ ghostable env push --env default --file .env --reason "Configure local mail testing"
For one key, use var push --file. Use env sync only when keys absent from the file should be deleted.
Validate and review
$ ghostable validate --env default
$ ghostable review
$ ghostable hygiene report --env default
Validation checks declared schema rules. Review checks changed-code ENV usage and hard-coded secrets. Hygiene checks operational age and rotation state.
Commit the change
$ git diff -- .ghostable
$ git add .ghostable && git commit -m "Configure local mail testing"
Commit the application code and its Ghostable state together when they are part of the same change.
Clean plaintext files
At the end of sensitive work, preview and remove project-root env files:
$ ghostable env clean --dry-run
$ ghostable env clean
Cleanup removes .env, .env.*, and Ghostable backup files from the project root. It keeps .env.example unless --include-example is explicitly passed.