Project · editor · container — simplified
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
dev-code
_ _
| | | |
__| | _____ ________ ___ ___ __| | ___
/ _` |/ _ \ \ / /______/ __/ _ \ / _` |/ _ \
| (_| | __/\ 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.
Why devcode?
Typical Dev Container workflows involve:
- Copying
.devcontainer/directories between projects - Recreating environments repeatedly
- Committing configuration to repositories you do not control
devcode separates environment configuration from project code:
- Templates are stored locally
- Projects remain unchanged
- Containers are launched with a single command
Quick Start
# Install
pip install dev-code
# Open a project (auto-detects template from container history, or uses default)
devcode open ~/projects/my-app
# Open with an explicit template
devcode open ~/projects/my-app dev-code
# Reopen projects later
devcode ps -a -i
Requirements
- VS Code with the Dev Containers extension
- Docker
Core Concepts
Templates
Templates are reusable devcontainer configurations stored locally.
Default location:
~/.local/share/dev-code/templates/
Override search paths via settings.json (see Configuration).
Command Reference
Global Flags
-v, --verbose Enable debug output
devcode open
devcode open <path> [template] [options]
Open a project in VS Code using a devcontainer template.
Arguments
-
<path>— Project directory (must exist) -
[template](optional)- Template name, or
- Path to a
devcontainer.json, or - Path to a directory containing it
Paths must start with
./,../,/, or~/.If both a template name and a local directory match, the template takes precedence and a warning is shown.
If omitted, devcode auto-detects the template in this order:
- Most recently running container for this project path (uses its stored config)
- Most recently stopped container for this project path
default_templatefromsettings.json(error if not set)
Options
| 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 new
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
devcode edit [template]
- With a name: opens that template
- Without arguments: opens the templates directory
devcode list
devcode list [--long]
| Option | Description |
|---|---|
--long |
Show full paths and grouped directories |
devcode ps
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
devcode completion bash
devcode completion zsh
Enable in shell:
eval "$(devcode completion bash)"
Typical Workflow
devcode new python-dev
devcode edit python-dev
devcode open ~/projects/my-app python-dev
Configuration
devcode reads settings.json from:
~/.config/dev-code/settings.json
Override the config directory:
DEVCODE_CONF_DIR=/custom/path devcode open ~/projects/my-app
The file is created automatically with defaults on first run.
settings.json
{
"template_sources": ["~/.local/share/dev-code/templates"],
"default_template": "dev-code"
}
| Key | Description |
|---|---|
template_sources |
Ordered list of template directories. First is the write target; rest are read-only. |
default_template |
Template used when devcode open is called without a template argument and no container history is found. Error if unset. |
Template System
Default Location
~/.local/share/dev-code/templates/
Configure additional paths via template_sources in settings.json.
File Injection (cp)
Inject files from the host into the container at startup.
Example
{
"customizations": {
"dev-code": {
"cp": [
{
"source": "${localEnv:HOME}/.config/myapp",
"target": "/home/vscode/.config/myapp"
}
]
}
}
}
Fields
| 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 |
Source Behavior
- Supports
${localEnv:VAR} - Supports relative paths from
.devcontainer/ - Missing environment variables cause the entry to be skipped
Copy Directory Contents
Use /. suffix:
{
"source": "${localEnv:HOME}/.config/myapp/.",
"target": "/home/vscode/.config/myapp/"
}
Copies directory contents instead of the directory itself.
Behavior Rules
target/copies into the directory- Without trailing
/copies as a file or directory override=falseskips existing files- Ownership and permissions are applied after copying
Project Switching
devcode ps -a -i
Lists containers and allows reopening projects interactively.
Advanced Options
- Multiple template directories
- Template inheritance
- Verbose debugging (
-v) - Dry runs (
--dry-run) - Custom container paths
Internal Flow
- Validate project path (must exist)
- Resolve template (explicit → container history → settings default)
- Launch VS Code Dev Container
- Apply file injection rules
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dev_code-0.2.0.tar.gz.
File metadata
- Download URL: dev_code-0.2.0.tar.gz
- Upload date:
- Size: 631.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e36af1a7bdcd20bf27ebf8165e2e693e599fc01d7e4781abe54734ab7cfaad9
|
|
| MD5 |
8c20f0a228ddd013f2c8e1eecaea9c95
|
|
| BLAKE2b-256 |
47bf19fa89787f3b3bab08c4b9478032f3994d5ac612c70311d118d5fc4fda60
|
Provenance
The following attestation bundles were made for dev_code-0.2.0.tar.gz:
Publisher:
publish-pypi.yml on dacrystal/dev-code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dev_code-0.2.0.tar.gz -
Subject digest:
4e36af1a7bdcd20bf27ebf8165e2e693e599fc01d7e4781abe54734ab7cfaad9 - Sigstore transparency entry: 1247277588
- Sigstore integration time:
-
Permalink:
dacrystal/dev-code@f4c755d34aebedf8c9541a927c78c4bab399e69d -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dacrystal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f4c755d34aebedf8c9541a927c78c4bab399e69d -
Trigger Event:
push
-
Statement type:
File details
Details for the file dev_code-0.2.0-py3-none-any.whl.
File metadata
- Download URL: dev_code-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5c0266dabf4149d47b76f007afe4e1f96b8e38439fc6efdd970e6e43822ebfb
|
|
| MD5 |
b2b33b023380c492f3323489632183c9
|
|
| BLAKE2b-256 |
fd87a1fac6643c8ea257d2fe35de9615506454e14f041f5406ade4f28f099ef5
|
Provenance
The following attestation bundles were made for dev_code-0.2.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on dacrystal/dev-code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dev_code-0.2.0-py3-none-any.whl -
Subject digest:
d5c0266dabf4149d47b76f007afe4e1f96b8e38439fc6efdd970e6e43822ebfb - Sigstore transparency entry: 1247277635
- Sigstore integration time:
-
Permalink:
dacrystal/dev-code@f4c755d34aebedf8c9541a927c78c4bab399e69d -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dacrystal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f4c755d34aebedf8c9541a927c78c4bab399e69d -
Trigger Event:
push
-
Statement type: