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
One command. Any project. The right devcontainer.
Why devcode?
If you’ve ever:
- Copied
.devcontainer/folders between projects - Avoided committing devcontainer configs to repos you don’t control
- Reconfigured VS Code containers again and again
devcode fixes this.
Define your devcontainer once. Reuse it everywhere. Keep your repos clean.
What it does
devcode is a CLI that opens any project in VS Code inside a devcontainer—instantly—using reusable templates.
# Before devcode
code ~/projects/my-app
# → configure .devcontainer manually (or copy-paste from another project)
# → reopen in container
# → remember to not commit .devcontainer to this repo
# → repeat for every project
# After devcode
devcode open py-dev ~/projects/my-app
VS Code opens. The container builds. You're ready to go.
Install
Install the dev-code package, which provides the devcode CLI.
Option 1 — Install globally (recommended)
pip install dev-code
Option 2 — Run without installing
uvx --from dev-code devcode
Optional — Add alias
alias devcode="uvx --from dev-code devcode"
Requirements
- VS Code with Dev Containers extension
- Docker
Quick start
# 1. Seed your first template (one-time)
devcode init
# 2. Open any project in a container
devcode open dev-code ~/projects/my-app
# 3. Later: reopen any project instantly
devcode ps -a -i
Select a project from the list to reopen it in VS Code.
Core concepts
Templates
Reusable devcontainer definitions stored locally—not in your repos.
Default location:
~/.local/share/dev-code/templates/
Override with:
$DEVCODE_TEMPLATE_DIR
Features
Core workflow
- One-command open — launch any project instantly
- Reusable templates — define once, use everywhere
- Works with any repo — no config changes required
Project switching (power feature)
- Reopen any project instantly — use
devcode ps -a -ito list all containers (running and stopped) and interactively reopen one - Container dashboard — inspect running environments with
devcode ps
Customization
- Custom templates
- File sync on launch — inject configs, credentials, and secrets safely
Environment support
- WSL support
- Standard devcontainer format
Commands
Pass -v / --verbose before the subcommand to enable debug output (e.g. devcode -v open ...).
| Command | Description |
|---|---|
devcode open <template> <path> |
Open a project using a template |
devcode init |
Seed the default template |
devcode new <name> [base] |
Create a new template |
devcode edit [template] |
Edit a template |
devcode list [--long] |
List templates |
devcode ps [-a] [-i] |
List containers (-a includes stopped, -i interactive mode) |
devcode completion <shell> |
Generate shell completion |
Examples
# Show running containers
devcode ps
# Show all containers (including stopped)
devcode ps -a
# Interactive project switcher
devcode ps -a -i
Select a container to reopen its project in VS Code.
Command flags
open
| Flag | Default | Description |
|---|---|---|
--dry-run |
— | Print resolved config path, URI, and copy plan without executing anything. |
--container-folder <path> |
/workspaces/<project-name> |
Override the mount path inside the container. |
--timeout <seconds> |
300 |
Seconds to wait for the container to start before aborting post-launch steps. |
new
| Flag / Arg | Default | Description |
|---|---|---|
[base] |
dev-code |
Template to copy from when creating the new template. |
--edit |
— | Open the new template in VS Code immediately after creation. |
edit
Called with no argument, opens the entire templates directory instead of a specific template.
list
| Flag | Description |
|---|---|
--long |
Show the templates directory path and the full filesystem path of each template. |
ps
After printing the list, -i prompts Open [1-N]: and reopens the selected project in VS Code.
Templates in practice
devcode init
devcode new my-python
devcode edit my-python
devcode open my-python ~/projects/app
File Copy (inject files into container)
Use the cp key under customizations.dev-code in your devcontainer.json to copy files from the host into the container on launch.
{
"customizations": {
"dev-code": {
"cp": [
{
"source": "${localEnv:HOME}/.config/myapp",
"target": "/home/vscode/.config/myapp"
}
]
}
}
}
Fields
| Field | Type | Default | Description |
|---|---|---|---|
source |
string | required | Host path. Supports ${localEnv:VAR} substitution, paths relative to .devcontainer/, and a /. suffix to copy directory contents instead of the directory itself. Entry is silently skipped if a referenced env var is unset. |
target |
string | required | Container path. Trailing / means "copy into this directory". |
override |
bool | false |
When false, skip the entry if the effective target already exists in the container. |
owner |
string | — | User for chown -R owner:group after copy. Must be paired with group. |
group |
string | — | Group for chown -R owner:group. Must be paired with owner. |
permissions |
string | — | Mode string passed to chmod -R (e.g. "600"). |
Directory contents (/. suffix)
Append /. to source to copy each child of a directory into target rather than the directory itself. target must end with /.
{
"source": "${localEnv:HOME}/.config/myapp/.",
"target": "/home/vscode/.config/myapp/",
"override": false,
"owner": "vscode",
"group": "vscode",
"permissions": "600"
}
This copies every file in ~/.config/myapp/ into /home/vscode/.config/myapp/, skipping any that already exist, then sets ownership and mode on each copied file.
Perfect for:
- Credentials
- Config files
- Local development secrets
Shell completion
Bash
eval "$(devcode completion bash)"
Zsh
eval "$(devcode completion zsh)"
Requires
devcodeto be installed (not via alias).
How it works
- Resolve a template
- Launch VS Code with a devcontainer
- Apply optional file sync rules
Contributing
git clone https://github.com/dacrystal/dev-code
devcode open dev-code ./dev-code
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.1.6.post2.tar.gz.
File metadata
- Download URL: dev_code-0.1.6.post2.tar.gz
- Upload date:
- Size: 47.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e51c19d15c5ddbecdd6e8a3cccd919265eb07df88905e2ef7fa1ed39761fc2fc
|
|
| MD5 |
8c63e8826252f09117ca3f951d4e17e8
|
|
| BLAKE2b-256 |
1259cb6a7510122a34e59ee750635bdd3aa06e19aa462afdcca7b092319a0c71
|
Provenance
The following attestation bundles were made for dev_code-0.1.6.post2.tar.gz:
Publisher:
publish.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.1.6.post2.tar.gz -
Subject digest:
e51c19d15c5ddbecdd6e8a3cccd919265eb07df88905e2ef7fa1ed39761fc2fc - Sigstore transparency entry: 1175854269
- Sigstore integration time:
-
Permalink:
dacrystal/dev-code@b8f424704f120b5dab38703d5c06270923d8e66e -
Branch / Tag:
refs/tags/v0.1.6.post2 - Owner: https://github.com/dacrystal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b8f424704f120b5dab38703d5c06270923d8e66e -
Trigger Event:
push
-
Statement type:
File details
Details for the file dev_code-0.1.6.post2-py3-none-any.whl.
File metadata
- Download URL: dev_code-0.1.6.post2-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76c505f6cd03d46ef349f7c7296f1eac946c42cdcc4436f7cc66d806c02b875b
|
|
| MD5 |
224417e071b4861d54fb350590aad3a6
|
|
| BLAKE2b-256 |
569eee311c0f178075b2e05c2c3270efa31a91759f22670f0737af86202050b1
|
Provenance
The following attestation bundles were made for dev_code-0.1.6.post2-py3-none-any.whl:
Publisher:
publish.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.1.6.post2-py3-none-any.whl -
Subject digest:
76c505f6cd03d46ef349f7c7296f1eac946c42cdcc4436f7cc66d806c02b875b - Sigstore transparency entry: 1175854296
- Sigstore integration time:
-
Permalink:
dacrystal/dev-code@b8f424704f120b5dab38703d5c06270923d8e66e -
Branch / Tag:
refs/tags/v0.1.6.post2 - Owner: https://github.com/dacrystal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b8f424704f120b5dab38703d5c06270923d8e66e -
Trigger Event:
push
-
Statement type: