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.1.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.1-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dev_code-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 7363d1c8a28e10caffa3c5bc60b65c65e1a7cc36be3ef3b0d3d70980bc26690c
MD5 dfe8ab3eb788c31375a8c9676d35462a
BLAKE2b-256 4907452b2d3053734300057343f8e2f5798f643f115764211b39a536cd4d4829

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dev_code-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3309b4de31037480582a19dc0dcc93da7b6ef4b6ac23720b94381b3b4fe0e476
MD5 131d659630a06ce363d8742d7b765133
BLAKE2b-256 9089bff18d18c0669bdf491701d3501e2c70134d58478f2f2538857fb9fd6a65

See more details on using hashes here.

Provenance

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