Metadata-Version: 2.3
Name: devcontainer-context-menu
Version: 0.1.4
Summary: Open folders in VS Code devcontainers from Nautilus and the CLI
Keywords: devcontainer,vscode,docker,nautilus
Author: Stephen Mott
Author-email: Stephen Mott <stephen@mott.email>
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Utilities
Requires-Dist: typer>=0.12
Requires-Python: >=3.10
Project-URL: Homepage, https://github.com/SrzStephen/devcontainer-context-menu
Project-URL: Repository, https://github.com/SrzStephen/devcontainer-context-menu
Project-URL: Issues, https://github.com/SrzStephen/devcontainer-context-menu/issues
Description-Content-Type: text/markdown

# DevContainer Context Menu

Open any folder as a VS Code (or compatible fork) Devcontainer — from a context menu or the terminal.

## Support
- Windows via a Rust based COM extension
- Linux (Nautilus) via a python based nautilus extension
- Command line via a `python uvx tool`, run uvx code-devcontainer <path>.

## Changing editor
All version of the extension take the first binary called `code` on your `PATH`.

If you want to change to another VS Code fork such as `VSCodium` then make sure to add it to your `PATH`.

## Required folder structure

The **Open in Devcontainer** entry appears only for folders that contain a
devcontainer config — either by selecting a single directory or right-clicking
the background of an open folder. Place the config in either of these locations:

```
my-project/
├── .devcontainer/
│   └── devcontainer.json   # preferred
└── ...

# or, at the project root:

my-project/
├── devcontainer.json       # fallback
└── ...
```

The config is resolved in this order:
1. `.devcontainer/devcontainer.json`
2. `devcontainer.json`

If neither file exists, VS Code still opens the folder in Dev Containers mode and
prompts you to create a configuration.

`workspaceFolder` is read from the config when present; otherwise the container
defaults to `/workspaces/<folder-name>`.

A minimal `devcontainer.json`:

```jsonc
{
  "image": "mcr.microsoft.com/devcontainers/base:ubuntu"
}
```

## CLI

```sh
dcode              # opens the current directory
dcode ~/my-project # opens the specified directory
```

## Linux — Nautilus context menu

Install the `.deb` from the [latest GitHub release](../../releases/latest):

```sh
sudo dpkg -i code-devcontainer_*_all.deb
```

Then restart Nautilus:

```sh
nautilus -q
```

Right-click any folder (or the background of an open folder) that contains a
devcontainer config and choose **Open in Devcontainer**. The entry only appears
for folders that have a config.

## Windows — Explorer context menu

Download `code-devcontainer-setup.exe` from the [latest GitHub release](../../releases/latest)
and run it. No admin rights required.

Right-click any folder (or the background of an open folder) that contains a
devcontainer config and choose **Open in Devcontainer**. The entry only appears
for folders that have a config. Uninstall from **Settings → Apps** ("Open in
Devcontainer").

## Development

```sh
uv sync
just test        # run tests with coverage
just lint        # ruff check + format
just typecheck   # ty check
```

## Release

Trigger the **Release** workflow in GitHub Actions and choose `patch`, `minor`, or `major`.
This bumps the version, publishes to PyPI, builds a `.deb` and Windows installer, and creates a GitHub release with all assets attached.
