@blackycoderx4/devc
v0.10.0
Published
CLI for generating devcontainers
Maintainers
Readme
devc
CLI tool for generating ready-to-use development containers.
Overview
devc is a command-line interface that generates development container configurations for various technologies. It downloads templates from the devcontainers repository and sets them up in your project.
Features
- 🚀 Instant dev environment setup
- 📦 Multiple technology templates (including nested categories like
android/kotlin-native) - 🔄 Auto-updates for templates
- 💾 Offline support with local cache
- ⚙️ Git configuration support
- 🎯 Interactive mode with guided prompts
- 🎛️ Interactive version selector — customize tool versions (Android API, Kotlin, NDK, Node, etc.) with arrow-key selection
- 🔗 Smart version suggestions — Build Tools auto-suggests the matching version when you pick an Android API Level
Installation
npm (Recommended — works on all platforms)
npm i @blackycoderx4/devcRequires Node.js 14+. The package automatically downloads the correct native binary for your platform (Windows, Linux, or macOS).
Quick Install (Linux / macOS)
curl -fsSL https://raw.githubusercontent.com/SamitoX4/devc/main/docs/install.sh | bashWindows
If you have Node.js installed, use the npm method above.
Alternatively:
- WSL2: Run the Linux installer inside your WSL2 distribution.
- Manual: Download the latest
.zipfor Windows from the Releases page, extract it, and adddevc.exeto your PATH.
From Source
git clone https://github.com/SamitoX4/devc.git
cd devc/cli
cargo build --releaseOn Linux/macOS copy the binary to your PATH:
cp target/release/devc ~/.local/bin/On Windows the binary will be at target\release\devc.exe.
Usage
Interactive Mode (Recommended)
Just run:
devc genThe CLI will guide you through:
Select a template (arrow keys) — supports nested templates like
android/kotlin-nativeProject name (default: current directory)
Git User Name
Git User Email
Customize versions (optional) — if the template supports parameterized versions, you can pick from a curated list:
KOTLIN_VERSION: 2.0.0 2.0.10 > 2.0.21 2.1.0 ANDROID_API_LEVEL: 33 34 35 > 36 BUILD_TOOLS_VERSION: 33.0.0 34.0.0 35.0.0 > 36.0.0 ← auto-suggested from API Level 36
With Flags
Skip prompts by passing flags:
# Specify template and project name
devc gen --template nodejs --name my-project
# Nested templates (Android stack)
devc gen --template android/kotlin-native --name my-native-app
devc gen --template android/flutter --name my-flutter-app
devc gen --template android/ndk --name my-ndk-project
# With Git configuration
devc gen --template android/react-native --name my-app --git-name "John Doe" --git-email "[email protected]"
# All options
devc gen -t java -n my-java-app --git-name "John Doe" --git-email "[email protected]"Configure Git
# Interactive (prompts for name and email)
devc config
# With flags
devc config --git-name "Your Name" --git-email "[email protected]"
# Show current configuration
devc config --showList Available Templates
devc listUpdate Templates
devc updateAvailable Templates
General
| Template | Description |
|----------|-------------|
| nodejs | Node.js with TypeScript, npm/pnpm |
| java | Java 17 + Maven |
| laravel | PHP 8.3 + Composer |
| rust | Rust (stable) + Cargo |
| go | Go 1.22 |
| python | Python 3.12 + pip |
Android Stack
| Template | Description | Customizable Versions |
|----------|-------------|----------------------|
| android/java | Java 17 + Android SDK | API Level, Build Tools, NDK, CMD Line Tools |
| android/kotlin-native | Kotlin/Native + Android SDK | Kotlin, API Level, Build Tools, NDK, CMD Line Tools |
| android/ndk | Android NDK + CMake | API Level, Build Tools, NDK, CMake, CMD Line Tools |
| android/react-native | Node.js + React Native + Android SDK | Node version, API Level, Build Tools, NDK, CMD Line Tools |
| android/flutter | Flutter + Android SDK | Flutter branch, API Level, Build Tools, NDK, CMD Line Tools |
Commands
devc gen [options] Generate a devcontainer (interactive if no options)
devc list [options] List available templates
devc update [options] Update templates from repository
devc config [options] Configure Git user settings
Options:
-t, --template <name> Template name (e.g., nodejs, android/kotlin-native)
-n, --name <name> Project name
--git-name <name> Git user name
--git-email <email> Git user email
--verbose Verbose outputHow It Works
- First Run: Downloads templates to
~/.devc/cache/ - Template Discovery: Automatically finds all valid templates, including nested ones like
android/kotlin-native - Interactive Mode: Guides you through setup with prompts, including an optional version picker for parameterized templates
- Flag Mode: Skip prompts by passing options
- Git Configuration: Saved to
~/.devc/config.jsonfor future use - Each Execution: Checks for updates in the background
- Offline Mode: Uses cached templates when offline
Project Structure
devc/
├── .github/ # GitHub Actions workflows
│ └── workflows/
│ └── release.yml
├── cli/ # Rust CLI source code
│ ├── src/
│ │ ├── commands/ # CLI commands (gen, list, update, config)
│ │ └── utils/ # Cache, fetcher, copier, merger
│ └── Cargo.toml
├── npm/ # npm wrapper package
│ ├── bin/
│ ├── install.js
│ ├── platform.js
│ └── package.json
├── docs/ # GitHub Pages (landing + install)
│ ├── index.html
│ └── install.sh
└── scripts/ # Build scripts
└── build-release.shCreating a Release
Releases are built automatically with GitHub Actions. Simply push a version tag:
git tag v0.3.0
git push origin v0.3.0GitHub Actions will compile binaries for Linux, macOS (Intel & Apple Silicon), and Windows, package them with templates, and publish them to the Releases page.
Manual Release (local)
If you prefer to build locally:
cd scripts
chmod +x build-release.sh
./build-release.shAfter the package is created, upload it manually to GitHub Releases.
Configuration
The CLI stores configuration in:
~/.devc/
├── cache/
│ └── templates/ # Downloaded templates
└── config.json # CLI configuration (Git user, etc.)config.json Example
{
"templates_version": "1.0.0",
"last_check": "2026-03-31",
"git": {
"name": "Your Name",
"email": "[email protected]"
}
}License
MIT
