Skip to main content

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

Coverage PyPI version Python 3.10+ License: MIT

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 -i to 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

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.


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)

{
  "customizations": {
    "dev-code": {
      "cp": [
        {
          "source": "${localEnv:HOME}/.config/myapp",
          "target": "/home/vscode/.config/myapp"
        }
      ]
    }
  }
}

Perfect for:

  • Credentials
  • Config files
  • Local development secrets

Shell completion

Bash

eval "$(devcode completion bash)"

Zsh

eval "$(devcode completion zsh)"

Requires devcode to 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dev_code-0.1.6.post1.tar.gz (46.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dev_code-0.1.6.post1-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file dev_code-0.1.6.post1.tar.gz.

File metadata

  • Download URL: dev_code-0.1.6.post1.tar.gz
  • Upload date:
  • Size: 46.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dev_code-0.1.6.post1.tar.gz
Algorithm Hash digest
SHA256 c40cd7c1c6f7443d692ffe7b0838770d04b8fb056ef7d399a9ee4358352f8a86
MD5 1cf0a657b333c4a2928828b376618b8d
BLAKE2b-256 8d6a94b7a9368115aadc0a7fc70152c2e9dca3fad2a565269b38eade50d523fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for dev_code-0.1.6.post1.tar.gz:

Publisher: publish.yml on dacrystal/dev-code

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dev_code-0.1.6.post1-py3-none-any.whl.

File metadata

  • Download URL: dev_code-0.1.6.post1-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dev_code-0.1.6.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 cba3dd38ce87b9d79e81c96e7d55564da4843c3d127f794f112a30204e5fe1d1
MD5 d81e1205b38b6cd68c6f25fa3cf6ade4
BLAKE2b-256 efd40b5821203e1a96d985e9d7665dcc855196336c6596eaa0def45f601694bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for dev_code-0.1.6.post1-py3-none-any.whl:

Publisher: publish.yml on dacrystal/dev-code

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page