
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
A Ruby CLI tool for safely managing and versioning your .env
files. Envsafe provides backup, restore, and history management capabilities to prevent accidental loss of environment variables.
.env
files.envsafe
to your .gitignore
Add this line to your application's Gemfile:
gem 'envsafe'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install envsafe
# Create a backup with automatic timestamp
$ envsafe backup
# Create a tagged backup for easy identification
$ envsafe backup --tag "before-production-deploy"
$ envsafe backup -t "pre-feature-update"
# Show all backups
$ envsafe list
# Limit the number of backups shown
$ envsafe list 5
# Restore by tag
$ envsafe restore --tag "before-production-deploy"
$ envsafe restore -t "pre-feature-update"
# Restore by stack index (use 'list' command to see indices)
$ envsafe restore --sindex 0
$ envsafe restore -i 2
# Undo the last write operation to .env
$ envsafe undo
# Show contents by tag
$ envsafe show --tag "production-config"
$ envsafe show -t "staging-setup"
# Show contents by stack index
$ envsafe show --sindex 0
$ envsafe show -i 1
# Delete by tag
$ envsafe delete --tag "old-config"
$ envsafe delete -t "temporary-backup"
# Delete by stack index
$ envsafe delete --sindex 3
$ envsafe delete -i 0
# Delete all backups
$ envsafe clear
# Add .envsafe directory to .gitignore
$ envsafe ignore
Command | Description | Options |
---|---|---|
backup | Create a backup of current .env file | -t, --tag TAG - Optional tag for the backup |
list [LIMIT] | List all backups, optionally limit results | LIMIT - Number of backups to show |
restore | Restore a specific backup to .env | -t, --tag TAG - Restore by tag-i, --sindex INDEX - Restore by stack index |
undo | Undo last write operation to .env | None |
show | Show contents of a backup file | -t, --tag TAG - Show by tag-i, --sindex INDEX - Show by stack index |
delete | Delete a specific backup | -t, --tag TAG - Delete by tag-i, --sindex INDEX - Delete by stack index |
clear | Delete all backups | None |
ignore | Add .envsafe to .gitignore | None |
# Before making changes
$ envsafe backup -t "stable-config"
# Make your changes to .env
$ vim .env
# If something goes wrong, quickly undo
$ envsafe undo
# Or restore the tagged backup
$ envsafe restore -t "stable-config"
# Backup before deployment
$ envsafe backup -t "pre-deploy-$(date +%Y%m%d)"
# Deploy and update environment variables
# ... deployment process ...
# If rollback needed
$ envsafe restore -t "pre-deploy-20240108"
# Setup git ignore for the team
$ envsafe ignore
# Create backups with descriptive tags
$ envsafe backup -t "feature-auth-setup"
$ envsafe backup -t "database-migration-config"
# Share backup strategies in documentation
$ envsafe list
Envsafe stores backups in a .envsafe
directory in your project root:
your-project/
āāā .env
āāā .envsafe/
ā āāā backup-001.env
ā āāā backup-002.env
ā āāā metadata.json
āāā .gitignore
envsafe clear
envsafe ignore
to prevent committing backup filesBug reports and pull requests are welcome on GitHub at https://github.com/kaisersakhi/envsafe.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that envsafe demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Ā It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.