_ _
| | | |
__| | _____ ________ ___ ___ __| | ___
/ _` |/ _ \ \ / /______/ __/ _ \ / _` |/ _ \
| (_| | __/\ V / | (_| (_) | (_| | __/
\__,_|\___| \_/ \___\___/ \__,_|\___|
project · editor · container — simplified
Reusable Dev Containers for any project — without modifying the repository.

devcode is a CLI that opens any project in VS Code Dev Containers using reusable, local templates.
Define your environment once and reuse it across projects.
Typical Dev Container workflows involve:
.devcontainer/ directories between projectsdevcode separates environment configuration from project code:
# Install
pip install dev-code
# Create default template
devcode init
# Open a project
devcode open dev-code ~/projects/my-app
# Reopen projects later
devcode ps -a -i
Templates are reusable devcontainer configurations stored locally.
Default location:
~/.local/share/dev-code/templates/
Override search paths:
DEVCODE_TEMPLATE_PATH=/my/templates:/team/templates
-v, --verbose Enable debug output
devcode open <template> <path> [options]
Open a project using a template.
<template>
devcontainer.json, orPaths must start with ./, ../, /, or ~/.
If both a template and directory match, the template takes precedence and a warning is shown.
<path>
Project directory
| Option | Default | Description |
|---|---|---|
--dry-run |
— | Print resolved configuration and actions without executing |
--container-folder <path> |
/workspaces/<project> |
Container mount path |
--timeout <seconds> |
300 |
Time to wait for container startup |
devcode init
Creates the default template.
devcode new <name> [base]
Create a new template.
| Argument | Default | Description |
|---|---|---|
[base] |
dev-code |
Template to copy from |
Options:
--edit
Open the template in VS Code after creation.
devcode edit [template]
devcode list [--long]
| Option | Description |
|---|---|
--long |
Show full paths and grouped directories |
devcode ps [-a] [-i]
| Flag | Description |
|---|---|
-a |
Include stopped containers |
-i |
Interactive reopen mode |
Interactive mode prompts:
Open [1-N]:
Selecting a number reopens the project in VS Code.
devcode completion bash
devcode completion zsh
Enable in shell:
eval "$(devcode completion bash)"
devcode init
devcode new python-dev
devcode edit python-dev
devcode open python-dev ~/projects/my-app
~/.local/share/dev-code/templates/
DEVCODE_TEMPLATE_PATH=$HOME/my/templates:/team/shared/templates
Resolution order:
Inject files from the host into the container at startup.
{
"customizations": {
"dev-code": {
"cp": [
{
"source": "${localEnv:HOME}/.config/myapp",
"target": "/home/vscode/.config/myapp"
}
]
}
}
}
| Field | Required | Description |
|---|---|---|
source |
Yes | Host path |
target |
Yes | Container path |
override |
No | Skip if target exists (default: false) |
owner |
No | Requires group |
group |
No | Requires owner |
permissions |
No | chmod applied recursively |
${localEnv:VAR}.devcontainer/Use /. suffix:
{
"source": "${localEnv:HOME}/.config/myapp/.",
"target": "/home/vscode/.config/myapp/"
}
Copies directory contents instead of the directory itself.
target/ copies into the directory/ copies as a file or directoryoverride=false skips existing filesdevcode ps -a -i
Lists containers and allows reopening projects interactively.
-v)--dry-run)MIT