Version: 1.0.1
DC Generator is an interactive command-line tool that simplifies the creation of DevContainer configurations for your projects. With a beautiful terminal UI powered by Charm libraries, it guides you through the process of setting up development containers with predefined templates for popular programming languages and frameworks.
Whether you're working with Node.js, Go, Python, PHP, Rust, .NET, or need a custom setup, DC Generator makes it easy to create a properly configured devcontainer.json file with just a few interactive prompts.
- 🎨 Beautiful Interactive UI - Powered by Charm's Huh and Lipgloss libraries
- 🚀 Predefined Templates - Support for popular languages and frameworks
- ⚙️ Customizable Configuration - Full control over ports, commands, settings, and features
- 📁 Smart Defaults - Auto-populated configurations based on selected templates
- 🔧 Custom Images - Support for custom Docker images
- 📋 Configuration Preview - Review your settings before generation
- 💾 Automatic Directory Creation - Creates
.devcontainerfolder automatically
-
Clone the repository:
git clone https://github.com/Zarox28/dc-generator.git cd dc-generator -
Build the binary:
go build -o build/dc-generator
-
(Optional) Install globally:
sudo cp build/dc-generator /usr/local/bin/
-
Navigate to your project directory:
cd your-project-directory -
Run DC Generator:
dc-generator
-
Follow the interactive prompts:
- Enter your project name (defaults to current directory name)
- Select a base image from the predefined list or choose custom
- Configure ports, post-create commands, settings, and features
- Review your configuration
- Confirm to generate the
devcontainer.jsonfile
-
The tool will create a
.devcontainer/devcontainer.jsonfile in your project root.
The tool guides you through a step-by-step process:
1. Project Name Configuration
2. Base Image Selection
3. Options
4. Post-Create Command Setup
5. VS Code Settings Configuration
6. DevContainer Features Selection
7. Configuration Summary & Confirmation
DC Generator comes with predefined configurations for:
| Language/Framework | Image | Default Port | Features |
|---|---|---|---|
| Bun | oven/bun:latest |
3000 | Git, Common Utils |
| Node.js | mcr.microsoft.com/devcontainers/javascript-node:latest |
3000 | Git, Common Utils |
| PHP 8.2 | mcr.microsoft.com/devcontainers/php:8.2 |
8000 | Composer, Node.js, Git |
| Go | mcr.microsoft.com/devcontainers/go:latest |
8080 | Git, Common Utils |
| Rust | mcr.microsoft.com/devcontainers/rust:latest |
8000 | Git, Common Utils |
| Python 3.12 | mcr.microsoft.com/devcontainers/python:latest |
8000 | Git, Common Utils |
| .NET 8 | mcr.microsoft.com/devcontainers/dotnet:8.0 |
5000 | .NET SDK, Git, Common Utils |
| Custom | User-defined | User-defined | User-defined |
Specify which ports to forward from the container to your host machine. Use comma-separated values for multiple ports (e.g., 3000,8080,9000).
Command that runs after the container is created. Common examples:
npm install(Node.js)pip install -r requirements.txt(Python)composer install(PHP)go mod download(Go)
VS Code settings in JSON format. Example:
{
"terminal.integrated.shell.linux": "/bin/bash",
"editor.formatOnSave": true
}DevContainer features to include. Example:
{
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/common-utils:2": {}
}This project is licensed under the AGPLv3 License - see the LICENSE file for details.






