global
Global configuration commands for Envi.
Subcommands
clear
Delete entire envi directory and all stored configurations.
github
GitHub integration commands for version controlling your environment store.
global clear
Delete the entire envi directory and all stored configurations.
Usage
bash
envi global clearWhat It Does
- Locates envi directory - Checks if
~/.envi/exists - Lists stored packages - Shows all stored configurations (including scoped packages)
- Shows deletion preview - Displays directory path and package count
- Prompts for confirmation - Requires explicit confirmation (default: No)
- Deletes everything - Removes entire
~/.envidirectory recursively - Shows recovery option - Mentions GitHub restore if you have version control enabled
Safety Features
- Requires explicit user confirmation
- Defaults to "No" to prevent accidental deletion
- Lists all packages that will be deleted
- Shows exact directory path being deleted
- Reminds about GitHub restore option
Example
bash
$ envi global clear
ℹ The following directory will be deleted: /Users/you/.envi
ℹ Stored configurations (5):
- @org/frontend
- @org/backend
- myapp
- test-project
- demo-app
? Delete the entire envi directory and all stored configurations? No
ℹ Operation cancelled.Confirming deletion:
bash
$ envi global clear
ℹ The following directory will be deleted: /Users/you/.envi
ℹ Stored configurations (5):
- @org/frontend
- @org/backend
- myapp
- test-project
- demo-app
? Delete the entire envi directory and all stored configurations? Yes
✔ Deleted entire envi directory
ℹ Note: If you have GitHub integration enabled, you can restore all data using 'envi global github restore'When to Use
Complete reset:
bash
# Remove all global Envi data and config from your system
envi global clearWhat Gets Deleted
The entire ~/.envi directory is removed, including:
~/.envi/store/- All stored configurations~/.envi/config.maml- Global configuration~/.envi/.git/- Git repository (if GitHub integration was enabled)~/.envi/README.md- Documentation
All stored environment configurations for all projects will be deleted.
Recovery
If you have GitHub integration enabled, you can restore everything:
bash
# Restore all configurations from GitHub
envi global github restoreThis will restore:
- All stored configurations
- Global configuration
- GitHub integration settings
global github enable
Enable GitHub version control for your envi store.
Usage
bash
envi global github enableWhat It Does
- Initializes git - Creates git repository in
~/.envi/(if needed) - Creates README - Adds documentation to the envi directory
- Checks GitHub CLI - Verifies
ghis installed and authenticated - Creates private repo - Creates
envi-storerepository on your GitHub account - Pushes to GitHub - Commits and pushes initial content
- Enables auto-commit - Future captures will auto-commit and push
Requirements
- GitHub CLI (
gh) must be installed - Must be authenticated with
gh auth login
Example
bash
$ envi global github enable
◐ Checking envi directory...
✔ Git repository initialized
◐ Checking GitHub CLI...
✔ GitHub CLI is installed
◐ Checking GitHub authentication...
✔ Authenticated as: username
◐ Creating initial commit...
✔ Initial commit created
◐ Creating private GitHub repository...
✔ Repository created and pushed: https://github.com/username/envi-store
◐ Updating configuration...
✔ GitHub version control enabled
✔ GitHub integration enabled! Future captures will be automatically committed and pushed.global github disable
Disable GitHub version control.
Usage
bash
envi global github disableWhat It Does
- Checks if GitHub integration is currently enabled
- Updates config to disable auto-commit/push
- Leaves existing GitHub repository unchanged
Example
bash
$ envi global github disable
◐ Disabling GitHub version control...
✔ GitHub version control disabled
Future captures will no longer be committed or pushed to GitHub.
Your existing GitHub repository will remain unchanged - you can delete it manually if needed.global github restore
Restore your entire envi store from GitHub.
Usage
bash
envi global github restoreWhat It Does
- Checks for repository - Verifies
username/envi-storeexists on GitHub - Warns about overwrite - If local
~/.envi/has content - Prompts for confirmation - Default: No
- Clones repository - Downloads entire envi store from GitHub
- Enables integration - Sets config to auto-commit future captures
Safety Features
- Checks if local envi directory has content
- Warns about overwriting local files
- Requires explicit confirmation (default: No)
- Shows which repository will be cloned
Example
bash
$ envi global github restore
◐ Checking GitHub CLI...
✔ GitHub CLI is installed
◐ Checking GitHub authentication...
✔ Authenticated as: username
◐ Checking for envi-store repository...
✔ Repository found
⚠ Your local ~/.envi directory contains existing files and configuration.
⚠ Restoring from GitHub will overwrite all local files with the repository contents.
? Overwrite local envi directory with GitHub repository? No
ℹ Operation cancelled.Use Cases
New Machine:
bash
# On new computer, restore all your env configs
envi global github restoreConfiguration
Global configuration is stored in ~/.envi/config.maml:
maml
{
use_version_control: "github"
}Values:
false- No version control (default)"github"- GitHub integration enabled