Download the PHP package metacomet-technologies/env-sync without Composer
On this page you can find all versions of the php package metacomet-technologies/env-sync. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download metacomet-technologies/env-sync
More information about metacomet-technologies/env-sync
Files in metacomet-technologies/env-sync
Package env-sync
Short Description This package provides Artisan commands for syncing your .env files to your preferred secrets manager for ease of storage and use.
License MIT
Homepage https://github.com/metacomet-technologies/env-sync
Informations about the package env-sync
Laravel Environment Sync
A Laravel package for secure synchronization of environment variables across development machines using 1Password and AWS Secrets Manager, with support for additional secret managers on the roadmap.
Features
- 🔐 1Password Integration: Full support for secure environment synchronization
- ☁️ AWS Secrets Manager: Store and retrieve environment files from AWS
- 🔄 Bidirectional Sync: Push to and pull from your secret manager
- 📁 Multi-Environment: Support for local, staging, production, etc.
- 🎯 Smart Detection: Auto-detects repository and environment names
- 💾 Automatic Backups: Creates backups before overwriting files
- 🏷️ Consistent Naming: Uses Git repository info for consistent naming
- ♻️ Laravel Integration: Seamless integration with Laravel projects
- 🚀 Extensible: Architecture ready for additional providers
Installation
You can install the package via composer:
You can publish the config file with:
Supported Providers
✅ 1Password (Available)
Full integration with complete support for vaults, automatic title generation, and base64 encoding.
Prerequisites:
✅ AWS Secrets Manager (Available)
Store and retrieve environment files securely in AWS Secrets Manager with full support for regions, profiles, and IAM roles.
Prerequisites:
🚧 Roadmap
The following providers are planned for future releases:
Bitwarden (Coming Soon)
- Open-source password manager
- Self-hosted instance support
- Organization vault support
Other Planned Providers
- HashiCorp Vault
- Azure Key Vault
- Google Secret Manager
Usage
Push Environment to Secret Manager
Pull Environment from Secret Manager
Interactive Sync Mode
Interactive mode provides:
- Status checking
- Push/Pull operations
- File comparison
- List all environments
- Visual diff display
Configuration
Edit config/env-sync.php:
Environment File Mapping
| Environment | File Path |
|---|---|
local |
.env |
staging |
.env.staging |
production |
.env.production |
testing |
.env.testing |
Naming Conventions
Items are automatically named based on your Git repository:
- Format:
{organization}/{repository}/{environment}/.env - Examples:
metacomet/my-app/local/.envmetacomet/my-app/production/.env
Security
- ✅ Files are encrypted at rest by each provider
- ✅ Base64 encoding prevents data corruption (1Password)
- ✅ Authentication required for all operations
- ✅ Automatic backups before overwriting
- ✅ No sensitive data in command history
- ✅ Provider-specific security features respected
Current Provider Features
1Password
- ✅ Full vault support
- ✅ Automatic title generation based on Git info
- ✅ Base64 encoding for data integrity
- ✅ Interactive sync mode
- ✅ Multi-environment support
- ✅ Automatic backups
- ✅ File comparison and diff display
AWS Secrets Manager
- ✅ Multi-region support
- ✅ AWS profile and credential support
- ✅ IAM role integration
- ✅ Automatic secret naming based on Git info
- ✅ Base64 encoding for data integrity
- ✅ Secret tagging for organization
- ✅ Soft delete with recovery window
- ✅ Interactive sync mode
- ✅ Multi-environment support
- ✅ Automatic backups
Workflow Examples
Initial Setup
Team Member Setup
After Making Changes
Migrating from Previous Version
If you were using the Laravel-specific 1Password commands from a previous implementation, the commands remain the same:
| Old Command | New Command |
|---|---|
php artisan env:push |
php artisan env:push |
php artisan env:pull |
php artisan env:pull |
php artisan env:sync |
php artisan env:sync |
The package defaults to 1Password, maintaining full backward compatibility. To use AWS Secrets Manager, set:
Or specify in commands:
Troubleshooting
1Password CLI Not Available
Authentication Issues
Files Are Identical
Use --force flag to overwrite anyway:
All versions of env-sync with dependencies
illuminate/contracts Version ^11.0||^12.0||^13.0
laravel/prompts Version ^0.3.6
spatie/laravel-package-tools Version ^1.16
symfony/process Version ^6.0||^7.0||^8.0