envo-cli
v0.0.2
Published
Backup and restore .env files across machines with recovery-phrase authentication
Downloads
195
Maintainers
Readme
envo-cli
Backup and restore .env files across machines with recovery-phrase authentication.
Features
- 🔐 Secure Backup: Encrypt and backup all
.envfiles in your project directory tree - 🔑 Recovery Phrase Authentication: Use BIP39 recovery phrases to authenticate and restore backups
- 🚀 Easy Restoration: Restore all backed-up
.envfiles to their original locations across different machines - 📋 Project Management: List all your backed-up projects
- 🛠️ Development Mode: Built-in support for local development environments
Installation
Via npm
npm install -g envo-cliVia bun
bun install -g envo-cliQuick Start
1. Initialize
Set up Envo for the first time:
envo initThis will guide you through the setup process and create your recovery phrase. Keep this phrase safe - you'll need it to restore your backups.
2. Backup
Backup all .env files in your project directory tree:
envo backupThis will:
- Find all
.envfiles in the current directory and subdirectories - Encrypt them using your credentials
- Upload them to the Envo API
- Provide a project identifier for future restoration
3. Restore
Restore your backed-up .env files on another machine:
envo restoreThis will:
- Authenticate using your recovery phrase
- Download your backed-up projects
- Restore the
.envfiles to their original locations
4. List
See all your backed-up projects:
envo listThis will display a list of all projects you've backed up along with their metadata.
Commands
envo init
Initialize Envo for the current user.
Options:
--dev- Use local API endpoint (http://localhost:4400)
envo init
envo init --devenvo backup
Backup all .env files in the current directory tree.
Options:
--dev- Use local API endpoint (http://localhost:4400)
envo backup
envo backup --devenvo restore
Restore all .env files to their projects.
Options:
--dev- Use local API endpoint (http://localhost:4400)--force- Overwrite existing.envfiles
envo restore
envo restore --force
envo restore --dev --forceenvo list
List all backed-up projects.
Options:
--dev- Use local API endpoint (http://localhost:4400)
envo list
envo list --devSecurity
- All
.envfiles are encrypted using Argon2 before transmission - Your recovery phrase is never stored or transmitted
- Authentication is performed using BIP39 recovery phrases
- Each backup is cryptographically secured
Development
Prerequisites
- Node.js >= 18.0.0
- Bun (for development and building)
Setup
git clone <repository>
cd apps/cli
bun installDevelopment Server
Run the CLI in development mode:
bun devBuild
Build the project:
bun run buildLint
Check code quality:
bun run lintTest
Run tests:
bun testDevelopment Mode
For local development, use the --dev flag to point to your local API endpoint:
envo init --dev
envo backup --dev
envo restore --dev
envo list --devEnvironment Variables
The CLI respects the following environment variables:
ENVO_API_URL- Override the API endpoint URLENVO_DATA_DIR- Override the default data directory for storing credentials
Troubleshooting
I forgot my recovery phrase
Unfortunately, without your recovery phrase, you cannot restore backups. Always keep your recovery phrase in a secure location.
The backup failed
Make sure you:
- Have initialized Envo (
envo init) - Have an active internet connection
- Have permission to read
.envfiles in your directory - Are pointing to the correct API endpoint (use
--devif running locally)
Restore is not finding my files
Ensure:
- You're using the correct recovery phrase
- The backed-up projects were created with the same user credentials
- Your internet connection is stable
Configuration Files
The CLI stores configuration in:
- Unix/Linux/macOS:
~/.envo/ - Windows:
%APPDATA%\envo\
License
MIT
Support
For issues, questions, or suggestions, please visit the GitHub repository.
