A CLI tool for rapidly creating and managing containerized development environments with Docker.
MyEnv streamlines the process of setting up development environments by automating Docker container creation, proxy network configuration, and project setup. Currently supports PHP projects.
- Interactive Setup - Guided project creation with language and framework selection
- Automated Container Management - Docker Compose integration with health checks
- Proxy Network Management - Automatic proxy server configuration with localhost subdomains (e.g.,
project.localhost) - Editor Integration - Automatic project opening in development container (supports VS Code, Cursor, devcontainer CLI)
- Project Templates - Pre-configured development stacks
- Modular Architecture - Add additional services and modules to existing projects
brew install takashiraki/tap/myenvBefore creating your first project, run the setup command:
myenv setupThis creates the necessary configuration files in ~/.config/myenv/ and sets up the required Docker networks.
For a quicker setup that only creates configuration files (without network setup):
myenv setup --quickUse quick setup when you want to configure MyEnv first and create networks later when running myenv init.
myenv initYou can also specify the language and framework using flags:
myenv init -l PHP
myenv init -l PHP -f LaravelThis will:
- Prompt for language selection (if not specified)
- Prompt for framework selection (if not specified)
- Ask for container name and proxy domain configuration
- Clone the appropriate Docker template
- Generate environment configuration files
- Build and start the containers with proxy network
- Create a new project
- Optionally open the project in your preferred editor (VS Code, Cursor, or devcontainer CLI)
Add additional modules or services to your existing development environment:
myenv add
myenv add -m <module-name>Start up an existing project's containers:
myenv upThis command is useful when you want to restart a previously created project without recreating it.
myenv setup- Initial setup with full configuration and network creation (required before first use)myenv setup --quick- Quick setup with configuration only (networks created on firstmyenv init)myenv init- Create a new development environment (interactive)myenv init -l PHP- Create a PHP project directlymyenv init -l PHP -f Laravel- Create a Laravel project directlymyenv up- Start an existing project's containersmyenv add- Add modules to existing environment (interactive)myenv add -m <module>- Add specific module directlymyenv --help- Show available commands and optionsmyenv --versionormyenv -v- Show version information
- Docker and Docker Compose
- Go 1.21 or later (for development)
- Git
git clone https://github.com/takashiraki/myenv.git
cd myenv
go mod tidy
go run main.go- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.