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.

dev-code is a CLI that opens any project in VS Code inside a devcontainer — instantly, using reusable templates you define once. No more hunting config files. No more copy-pasting devcontainer.json.


Install

pip install dev-code

Or run without installing via uvx:

uvx dev-code

Tip: Add an alias for the fastest workflow:

alias dev-code="uvx dev-code"

Requires: VS Code with the Dev Containers extension + Docker


Quick-start

# 1. Seed your first template
dev-code init

# 2. Open any project in a devcontainer
dev-code open dev-code ~/projects/my-app

# That's it. VS Code opens, container spins up.

Features

  • One-command opendev-code open <template> <path> launches VS Code in a devcontainer instantly
  • Reusable templates — define your devcontainer once, reuse it across every project
  • Built-in template — ships with the dev-code template out of the box
  • Custom templates — create and manage your own with dev-code new
  • File sync on launch — copy credentials, configs, and secrets into the container via a dev-code customization block in devcontainer.json
  • WSL support — works natively on Windows Subsystem for Linux
  • Container dashboard — see all running devcontainers with dev-code ps
  • Works with existing config — no new format, just standard devcontainer.json

Commands

Command Description
dev-code init Seed the built-in dev-code template into your template directory
dev-code open <template> <path> Open a project in VS Code using a devcontainer template
dev-code new <name> [base] Create a new template (optionally based on an existing one)
dev-code edit [template] Open a template for editing in VS Code
dev-code list [--long] List available templates
dev-code ps Show running devcontainers

Options

Flag Command Description
--dry-run open Print the devcontainer URI and copy plan without executing
--container-folder open Override the in-container workspace path
--timeout open Seconds to wait for container to start (default: 300)
--edit new Open the new template for editing immediately after creation
--long list Show full paths alongside template names
-v, --verbose all Enable debug logging

Templates

Templates are directories containing a .devcontainer/devcontainer.json file. They live in ~/.local/share/dev-code/templates/ by default (XDG-compliant), or wherever $DEVCODE_TEMPLATE_DIR points.

Get started

dev-code init                  # copies the built-in dev-code template
dev-code new my-python         # creates a new template from the default base
dev-code new my-node dev-code  # creates a new template based on dev-code
dev-code edit my-python        # open the template in VS Code to customise it

File sync — copy files into the container on launch

Add a customizations.dev-code.cp section to your devcontainer.json to copy files from your host into the running container:

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

Supports owner, group, permissions, and Override fields per entry. Use source/. to copy the contents of a directory.


Contributing

Contributions are welcome! To get started:

git clone https://github.com/dacrystal/dev-code
dev-code open dev-code ./dev-code

The repo includes a dev-code devcontainer — open it with itself.

Please open an issue before submitting large changes.


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.3.tar.gz (41.3 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.3-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file dev_code-0.1.3.tar.gz.

File metadata

  • Download URL: dev_code-0.1.3.tar.gz
  • Upload date:
  • Size: 41.3 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.3.tar.gz
Algorithm Hash digest
SHA256 200ad368bbd22721817e458a09025ac6f16954ad5661715e56f9bd3372d87ee6
MD5 1e29ae5bc7aca727c03df1ff9809cf2f
BLAKE2b-256 dcf407796a0f6e35e77b3a294cb0a9cb7fbbb388782c915a02ad6abd56309131

See more details on using hashes here.

Provenance

The following attestation bundles were made for dev_code-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: dev_code-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.4 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4f9cdc1ddd73710db87feb5a02c8e60241b804165674f40271c921c3b670c554
MD5 c7c4f8c36937d68a04a686144406899e
BLAKE2b-256 4eaa7317298ee408aa095aee793caa9f7acbcb82e128616862b7ea4e01fc9405

See more details on using hashes here.

Provenance

The following attestation bundles were made for dev_code-0.1.3-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