A development environment automation tool that orchestrates multiple services and applications based on YAML configuration files. Automate your entire dev setup with a single command.
- Docker Management: Start Docker containers via docker-compose with automatic Docker daemon detection
- VS Code Integration: Open projects in VS Code with optional git branch checkout
- VPN Connection: Connect to VPN (Tunnelblick) with connection polling
- Browser Automation: Open Chrome with specific URLs and profiles
- tmux Sessions: Start tmux sessions with custom commands
- Python 3.11 or higher
- macOS (currently uses macOS-specific commands)
- uv package manager (recommended) or pip
- Docker Desktop (if using docker automation)
- Tunnelblick (if using VPN automation)
- VS Code with
codeCLI command - Google Chrome
- tmux
- Clone the repository:
git clone <your-repo-url>
cd work-helper- Install dependencies using uv (recommended):
uv syncOr using pip:
pip install -r requirements.txtNote: You'll need to install PyYAML:
uv add pyyaml
# or
pip install pyyamlCreate YAML configuration files in the config/ directory. Each file represents a different environment setup.
steps:
- type: docker
filepath: path/to/docker-compose.yml # Relative to home directory
- type: vscode
filepath: path/to/project # Relative to home directory
branch: main # Optional: git branch to checkout
- type: vpn
vpn_name: your-vpn-name # Name as it appears in Tunnelblick
- type: browser
urls: # List of URLs to open
- https://example.com
- https://localhost:3000
- type: tmux
command: your-command-here # Command to run in tmux sessionSee config/local-dev.yaml for a working example:
steps:
- type: docker
filepath: Desktop/TWID/issuer-service/deployment/dev/docker-compose.yml
- type: vscode
filepath: Desktop/TWID/issuer-service
- type: tmux
command: docker logs -f twidpaytype:"docker"filepath: Path to docker-compose.yml (relative to home directory)- Automatically starts Docker Desktop if not running
- Waits up to 30 seconds for Docker daemon to be ready
- Runs
docker compose up -d --build
type:"vscode"filepath: Path to project directory (relative to home directory)branch: (optional) Git branch to checkout after opening
type:"vpn"vpn_name: VPN configuration name in Tunnelblick- Waits up to 30 seconds for connection to establish
- Polls connection status every 2 seconds
type:"browser"urls: List of URLs to open in Chrome- Opens in Default Chrome profile (hardcoded)
type:"tmux"command: Command to run in new tmux session- Creates session named "local-dev"
Run the tool with your environment configuration name:
python main.py <environment-name>Example:
python main.py local-devThis will execute all steps defined in config/local-dev.yaml sequentially.
- Create a new YAML file in the
config/directory:
touch config/my-project.yaml-
Define your steps using the configuration format above
-
Run it:
python main.py my-projectwork-helper/
├── main.py # Entry point and orchestration logic
├── config/
│ ├── __init__.py
│ ├── config.py # YAML config parser
│ ├── local-dev.yaml # Example config
│ ├── prod-debug.yaml # Example config
│ ├── beta-debug.yaml # Example config
│ └── cug-debug.yaml # Example config
├── services/
│ ├── __init__.py
│ ├── docker.py # Docker automation
│ ├── vscode.py # VS Code automation
│ ├── vpn.py # VPN automation
│ ├── browser.py # Browser automation
│ └── tmux.py # tmux automation
├── pyproject.toml
└── README.md
- You specify an environment name as a command-line argument
- The tool loads the corresponding YAML file from
config/<environment>.yaml - Each step is executed sequentially in the order defined
- File paths are automatically expanded from
~(home directory) - The tool provides feedback for each step and handles errors gracefully
- Create a new file in
services/directory - Implement your service function
- Add it to
services/__init__.py - Add a new case in
main.py'srun_functions()match statement
- Docker retry attempts: Edit
retriesvariable inservices/docker.py:11 - VPN timeout: Edit
timeoutvariable inservices/vpn.py:20 - Chrome profile: Edit profile name in
services/browser.py:6,11 - tmux session name: Edit session name in
services/tmux.py:8
- "THIS CONFIG DOES NOT EXIST": Check that your YAML file exists in
config/directory - Docker fails to start: Ensure Docker Desktop is installed and you have proper permissions
- VPN connection timeout: Verify VPN name matches exactly as shown in Tunnelblick
- VS Code doesn't open: Ensure
codecommand is in your PATH - tmux session conflicts: Close existing "local-dev" tmux session first
Currently macOS only due to:
opencommand usage for Docker Desktop and Chrome- Tunnelblick AppleScript integration
- Chrome profile path assumptions
Linux/Windows support would require platform-specific adaptations.
[Add your license here]
[Add contribution guidelines here]