Development Environment Manager for Linux - Backup, sync and restore your dev environment in minutes
Project description
๐ DevEnv Manager
Save, sync and restore complete development environments in minutes
๐ฏ What Is It?
DevEnv Manager is a CLI tool that solves one of developers' biggest problems: reconfiguring development environments from scratch.
Instead of spending days installing packages, configuring dotfiles and extensions every time you:
- ๐ป Buy a new laptop
- ๐ Format your system
- ๐ฅ Need to standardize the team
- ๐ Want to sync home/work
You simply restore everything automatically!
๐ DevEnv Manager vs Other Tools
| DevEnv Manager | Git/GitHub | Docker | Dotfiles Repos | |
|---|---|---|---|---|
| What it manages | ๐ฅ๏ธ Complete environment | ๐ Source code | ๐ฆ Isolated containers | ๐ Config files only |
| Installs packages | โ 271 APT packages | โ | โ | โ |
| Configures system | โ Dotfiles + extensions | โ | โ | โ Configs only |
| Synchronization | โ Bidirectional Git | โ Code only | โ | โ Configs only |
| Use case | ๐ ๏ธ Complete personal setup | ๐ Code projects | ๐ App deployment | โ๏ธ Basic configs |
DevEnv Manager vs devenv.sh
| DevEnv Manager | devenv.sh | |
|---|---|---|
| Approach | ๐ธ Capture existing environment | ๐ Declare from scratch |
| Technology | ๐ Python + Linux tools | โ๏ธ Nix ecosystem |
| Complexity | ๐ข Simple - one command | ๐ด Complex - requires Nix |
| Installation | pip install devenv-manager |
Nix + configuration |
| Command | devm capture, devm restore |
devenv shell |
| Target audience | ๐จโ๐ป Beginner/intermediate devs | ๐งโโ๏ธ Advanced Nix users |
| Use case | ๐ Backup/sync existing environments | ๐๏ธ Reproducible environments |
| Learning curve | 5 minutes | Weeks (Nix) |
Practical Example:
โ Current Situation (2 days of work):
# New/formatted laptop:
sudo apt update && sudo apt install git curl vim... # 271+ packages manually
code --install-extension ms-python.python... # 15+ VS Code extensions
cp dotfiles/.bashrc ~/.bashrc # Configure terminal
git config --global user.name... # Git configs
# ... hundreds of manual steps
โ With DevEnv Manager (30 minutes):
pip install devenv-manager
devm restore "my-complete-environment"
# โ Go grab a coffee - everything automated!
๐ Installation
Method 1: Direct Installation (Recommended)
pip install devenv-manager
Method 2: Manual Installation
# Clone the repository
git clone https://github.com/bernardoamorimalvarenga/devenv-manager.git
cd devenv-manager
# Create virtual environment
python -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -e .
# Test installation
devm --help
System Requirements:
- ๐ง Linux (Ubuntu 20.04+, Debian 10+, Arch, Fedora)
- ๐ Python 3.8+
- ๐ sudo (for package installation)
- ๐ฆ git (for synchronization)
๐ Complete Usage Guide
1. Initial Setup
# Initialize DevEnv Manager
devm init
# โ
Output:
# ๐ DevEnv Manager initialized successfully!
# Config stored in: /home/user/.devenv
2. Capture Your Current Environment
# Capture everything that's installed and configured
devm capture "my-setup-$(date +%Y%m%d)"
# โ
Example output:
# ๐ธ Capturing environment: my-setup-20241201
# โ Detecting system configuration...
#
# โโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโ
# โ Component โ Count โ
# โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
# โ APT Packages โ 271 โ
# โ Snap Packages โ 26 โ
# โ Flatpak Packages โ 3 โ
# โ PIP Packages โ 45 โ
# โ Dotfiles โ 8 โ
# โ VS Code Extensions โ 23 โ
# โโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโ
# โ Environment 'my-setup-20241201' captured successfully!
3. List Saved Environments
# List all captured environments
devm list
# โ
Example output:
# โโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโ
# โ Name โ Created โ File โ
# โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
# โ my-setup-20241201 โ 2024-12-01 14:30โ my-setup-20241201.json โ
# โ work-environment โ 2024-11-28 09:15โ work-environment.json โ
# โ complete-setup โ 2024-11-25 16:45โ complete-setup.json โ
# โโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโ
4. View Environment Details
# See what a specific environment contains
devm show "my-setup-20241201"
# โ
Example output:
# ๐ Environment Details: my-setup-20241201
#
# โโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# โ Property โ Value โ
# โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
# โ Os โ Linux โ
# โ Kernel โ 5.15.0-91-generic โ
# โ Architecture โ x86_64 โ
# โ Python Version โ 3.12.3 โ
# โ Shell โ /bin/bash โ
# โโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
#
# โโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโ
# โ Type โ Count โ
# โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
# โ APT โ 271 โ
# โ SNAP โ 26 โ
# โ FLATPAK โ 3 โ
# โ PIP โ 45 โ
# โโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโ
5. Restore an Environment
Safe Preview (Dry Run):
# See what will be done WITHOUT applying changes
devm restore "my-setup-20241201" --dry-run
# โ
Example output:
# ๐ DRY RUN MODE - No changes will be made
# ๐ฆ Restoring packages...
# Would install 45 new APT packages
# Would install: git vim curl nodejs python3-pip code...
# ๐ Would restore 8 dotfiles
# ๐ Would install 12 new VS Code extensions
# โ Dry run completed successfully!
Actual Restoration:
# Restore the environment (WILL INSTALL PACKAGES)
devm restore "my-setup-20241201"
# โ
Interactive process:
# ๐ Restoring environment: my-setup-20241201
#
# โโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโ
# โ Type โ Count โ
# โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
# โ APT โ 45 โ
# โ SNAP โ 8 โ
# โ PIP โ 12 โ
# โโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโ
#
# โ ๏ธ This will install 65 packages and may modify your system.
# Do you want to continue? [y/N]: y
#
# ๐ฆ Installing APT packages...
# โ APT packages installed successfully
# ๐ Restoring dotfiles...
# Backed up existing .bashrc to .bashrc.devenv-backup
# โ Restored .bashrc
# โ Restored .vimrc
# ๐ Installing VS Code extensions...
# โ VS Code extensions installed successfully
# โ Environment restored successfully!
๐ Git Synchronization (Multi-machine)
Initial Setup (One time)
# Configure synchronization with private repository
devm sync setup git@github.com:your-username/devenv-private.git
# โ
Output:
# ๐ง Setting up git sync with git@github.com:your-username/devenv-private.git
#
# โญโ Sync Ready โโฎ
# โ Git sync setup complete! โ
# โ โ
# โ Repository: git@github.com:your-username/devenv-private.git โ
# โ Branch: main โ
# โ โ
# โ Use 'devm sync push' to upload environments โ
# โ Use 'devm sync pull' to download environments โ
# โฐโโโโโโโโโโโโโโโฏ
Pushing Environments
# Push all environments to repository
devm sync push
# Push only a specific environment
devm sync push -e "my-setup-20241201"
# Push multiple environments
devm sync push -e "environment1" -e "environment2"
# โ
Example output:
# ๐ค Pushing specific environments: my-setup-20241201
# โ Successfully pushed 1 specific environments
Pulling Environments
# Download environments from repository
devm sync pull
# โ
Example output:
# ๐ฅ Pulling environments from remote...
# โ Imported work-environment
# โ Imported home-setup
# โ Successfully imported 2 environments
Sync Status
# View sync status
devm sync status
# โ
Example output:
# โโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# โ Property โ Value โ
# โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
# โ Status โ โ Enabled โ
# โ Remote URL โ git@github.com:your-username/devenv-private.git โ
# โ Branch โ main โ
# โ Uncommitted Changes โ No โ
# โ Last Commit โ abc123 - Sync 2 environments โ
# โโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ผ Practical Use Cases
๐ Case 1: New Laptop
# On old machine:
devm capture "my-complete-setup"
devm sync push
# On new machine:
pip install devenv-manager
devm init
devm sync setup git@github.com:your-username/devenv-private.git
devm sync pull
devm restore "my-complete-setup"
# โ 30 minutes later: identical environment!
๐ฅ Case 2: Team Onboarding
# Company setup (done once by tech lead):
devm capture "company-dev-env-2024"
devm sync push
# New developer:
devm sync pull
devm restore "company-dev-env-2024"
# ๐ Standardized environment automatically!
๐ Case 3: Home/Work Sync
# At work:
devm capture "work-setup"
devm sync push
# At home:
devm sync pull
devm restore "work-setup"
# ๐ Same environment at home!
๐ Case 4: Backup/Disaster Recovery
# Regular backup:
devm capture "backup-$(date +%Y%m%d)"
devm sync push
# After problem/formatting:
devm sync pull
devm list # See available backups
devm restore "backup-20241201"
# ๐ก๏ธ Environment restored!
๐ Available Commands
Basic Commands:
devm init # Initialize DevEnv Manager
devm capture "name" # Capture current environment
devm list # List saved environments
devm show "name" # Show environment details
devm restore "name" # Restore environment
devm delete "name" # Delete environment
devm status # Current system status
Sync Commands:
devm sync setup <repo-url> # Configure Git synchronization
devm sync push # Push all environments
devm sync push -e "name" # Push specific environment
devm sync pull # Download environments from repository
devm sync status # Synchronization status
Utility Commands:
devm export "name" file.json # Export to file
devm import-env file.json # Import from file
devm diff "env1" "env2" # Compare environments
devm clean # Clean old backups
Useful Options:
devm restore "name" --dry-run # Preview without applying changes
devm restore "name" --force # Skip confirmations
devm delete "name" --force # Delete without confirmation
๐ฏ What Gets Captured
๐ฆ System Packages:
- APT packages (manually installed only)
- Snap packages
- Flatpak packages
- PIP packages (global)
โ๏ธ Configurations:
- Important dotfiles:
.bashrc,.bash_profile,.zshrc,.profile - Tool configs:
.vimrc,.gitconfig - SSH config:
.ssh/config(optional, disabled by default)
๐ Extensions and Tools:
- VS Code: All installed extensions
- System info: OS, kernel, architecture, Python version
Example Snapshot (JSON):
{
"metadata": {
"name": "my-setup-20241201",
"created_at": "2024-12-01T14:30:00",
"version": "0.1.0"
},
"system_info": {
"os": "Linux",
"kernel": "5.15.0-91-generic",
"architecture": "x86_64",
"python_version": "3.12.3"
},
"packages": {
"apt": ["git", "vim", "curl", "nodejs", "python3-pip"],
"snap": ["code", "discord", "telegram-desktop"],
"pip": ["requests", "flask", "django"]
},
"dotfiles": {
".bashrc": "# Content of .bashrc...",
".vimrc": "# Vim configurations..."
},
"vscode_extensions": [
"ms-python.python",
"ms-vscode.vscode-json"
]
}
๐ Security
โ Secure Settings:
- SSH keys not captured by default
- Automatic backups of existing files before replacing
- Dry-run mode for safe preview
- Confirmations before important changes
- Private repositories recommended for sync
โ ๏ธ Important Precautions:
- Use private repositories for sensitive data
- Review snapshots before sharing
- Dotfiles may contain personal information
- Always test with --dry-run first
๐ก๏ธ Best Practices:
# โ
Use private repository
devm sync setup git@github.com:your-username/devenv-PRIVATE.git
# โ
Always preview first
devm restore "environment" --dry-run
# โ
Manual backup before major changes
cp ~/.bashrc ~/.bashrc.backup-$(date +%s)
# โ
Review what will be installed
devm show "environment"
๐ Performance
Typical Times:
- Capture: ~30 seconds (271 packages + configs)
- Restore APT: ~15 minutes (271 packages)
- Restore Snap: ~5 minutes (26 packages)
- Dotfiles: ~1 second
- VS Code extensions: ~2 minutes
Sizes:
- Snapshot JSON: ~16KB per environment
- Sync repository: ~1MB (10 environments)
๐ Troubleshooting
Common Issues:
"Permission denied" during restore:
# Make sure you have sudo
sudo echo "test"
# Execute with confirmation
devm restore "environment" --force
"Git sync failed":
# Check if repository is private and you have access
git clone git@github.com:your-username/devenv-private.git
# Reconfigure if necessary
devm sync setup git@github.com:your-username/devenv-private.git
"VS Code extensions failed":
# Make sure VS Code is installed
code --version
# Install manually if necessary
devm show "environment" # See extensions list
Logs and Debug:
# View detailed status
devm status
# Check config files
ls -la ~/.devenv/
# Preview before applying
devm restore "environment" --dry-run
๐ค Contributing
Contributions are welcome!
How to Contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-feature) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/new-feature) - Open a Pull Request
Areas That Need Help:
- Support for other distros (CentOS, OpenSUSE)
- Additional package managers (brew, chocolatey)
- Automated testing
- Documentation
- Graphical interface
๐บ๏ธ Roadmap
v0.2.0 - Security (Next 4 weeks)
- Snapshot encryption
- Safe packages list (whitelist)
- Sensitive data filtering
- Integrity verification
v0.3.0 - Multi-OS (8 weeks)
- Windows support (WSL)
- macOS support
- Homebrew support
- Chocolatey support
v1.0.0 - GUI and Cloud (12 weeks)
- Graphical interface (PyQt6)
- Cloud storage (Google Drive, Dropbox)
- Community templates
- Pro version with advanced features
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐จโ๐ป Author
Bernardo Amorim Alvarenga
- GitHub: @bernardoamorimalvarenga
- Email: amorimbernardogame@gmail.com
๐ Acknowledgments
- Click - Fantastic CLI framework
- Rich - Beautiful and colorful interface
- Git - Robust sync system
- Python Community - Amazing tools
โญ Like the Project?
If DevEnv Manager helped you, consider:
- โญ Star the GitHub repository
- ๐ Report bugs or suggest improvements
- ๐ข Share with other developers
- ๐ค Contribute with code or documentation
๐ Stop manually configuring environments - automate with DevEnv Manager! ๐
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file devenv_manager-0.1.3.tar.gz.
File metadata
- Download URL: devenv_manager-0.1.3.tar.gz
- Upload date:
- Size: 27.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c731db380394c8a4f121d783d6daa672b663a4cdd0728452717c4a21f274f56
|
|
| MD5 |
6e396de787791b72cffa2237a8f6c784
|
|
| BLAKE2b-256 |
248d8f026801d35980a3adb1d2560c5581e300e4be33ad0476200e89353f5b4a
|
File details
Details for the file devenv_manager-0.1.3-py3-none-any.whl.
File metadata
- Download URL: devenv_manager-0.1.3-py3-none-any.whl
- Upload date:
- Size: 22.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cd9fd66436f89730ffc9b28e736c5e907facedd23e4cb15c22dc1c3d7c5f2f0
|
|
| MD5 |
f0f48a1e6a7b92cb5f4cbeff2b3b097a
|
|
| BLAKE2b-256 |
781fccf088a245a85d50d726f9bf231e97f05490780120ad038143a0bcc7c7cb
|