DEV Community

shutx
shutx

Posted on

I built devcx to stop typing --config for Dev Containers

I often work in repositories with multiple Dev Container configurations.

The usual command gets repetitive pretty quickly:

devcontainer up \
--workspace-folder . \
--config .devcontainer/ansible/devcontainer.json

So I built devcx, a small wrapper around the Dev Container CLI.

It discovers devcontainer.json files in your workspace, lets you pick one once, caches the choice per workspace, and then wraps devcontainer up / devcontainer exec with the right --workspace-folder and --config arguments.

After selecting a config, you can run:

devcx up
devcx exec bash
devcx select
devcx which

There is also a dry-run mode if you want to see the underlying command:

devcx up --dry-run

It is written in Rust, distributed as a single binary, and released under Apache-2.0.

GitHub:
https://github.com/shutx-net/devcx

I would be interested to hear whether others use multiple Dev Container configs in one repository, or if there is a better workflow I missed.

Top comments (0)