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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dev_code-0.1.4.tar.gz
  • Upload date:
  • Size: 41.4 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.4.tar.gz
Algorithm Hash digest
SHA256 c602dd27f624e490107c3846f1f0a74865ccebeb4b25ad4d7783a7d2d3a0f6ee
MD5 083e3419ad0a8eb4c9aaf745c10a837a
BLAKE2b-256 2e92469804ed9a3a929c875337f31c085b13a0fecd7504bdcf2ec3d29b3c07b2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dev_code-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 35115e18aafd353a4fd84af7c2691acf22adc02316eeba50eb008a429c213ca3
MD5 e8180adcba9124fd160ca8308358d545
BLAKE2b-256 b1bdffdcab1fc93ac61113d54e27932b2cef108b2af719c28625b0e41a2132d9

See more details on using hashes here.

Provenance

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