Skip to content

๐Ÿš€ CLI tool for creating containerized development environments with automated Docker setup and VS Code integration

License

Notifications You must be signed in to change notification settings

takashiraki/myenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

56 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

myenv

A CLI tool for rapidly creating and managing containerized development environments with Docker.

Overview

MyEnv streamlines the process of setting up development environments by automating Docker container creation, proxy network configuration, and project setup. Currently supports PHP projects.

Features

  • 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)
  • VS Code Integration - Automatic project opening in development container
  • Project Templates - Pre-configured development stacks
  • Modular Architecture - Add additional services and modules to existing projects

Installation

brew install takashiraki/tap/myenv

Usage

Initial Setup

Before creating your first project, run the setup command:

myenv setup

This creates the necessary configuration files in ~/.config/myenv/.

Create a New Project

myenv init

You can also specify the language and framework using flags:

myenv init -l PHP
myenv init -l PHP -f Laravel

This will:

  1. Prompt for language selection (if not specified)
  2. Prompt for framework selection (if not specified)
  3. Ask for container name and proxy domain configuration
  4. Clone the appropriate Docker template
  5. Generate environment configuration files
  6. Build and start the containers with proxy network
  7. Create a new project
  8. Optionally open the project in VS Code

Add Modules to Existing Projects

Add additional modules or services to your existing development environment:

myenv add
myenv add -m <module-name>

Available Commands

  • myenv setup - Initial setup (required before first use)
  • myenv init - Create a new development environment
  • myenv init -l PHP - Create a PHP project directly
  • myenv init -l PHP -f Laravel - Create a Laravel project directly
  • myenv add - Add modules to existing environment
  • myenv add -m <module> - Add specific module
  • myenv --help - Show available commands and options
  • myenv --version or myenv -v - Show version information

Requirements

  • Docker and Docker Compose
  • Go 1.21 or later (for development)
  • Git

Development

git clone https://github.com/takashiraki/myenv.git
cd myenv
go mod tidy
go run main.go

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

๐Ÿš€ CLI tool for creating containerized development environments with automated Docker setup and VS Code integration

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages