Installs the Matilda Code CLI (@maincode-ai/matilda-code) — Maincode's Australian-made AI coding agent for the terminal — into a dev container.
The feature provisions Node.js >= 22 automatically (via nvm) when the base image does not already provide a compatible version, then installs the CLI globally so both the matilda and matilda-code commands are available on the PATH.
{
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"ghcr.io/maincodehq/devcontainer-features/matilda-code:1": {
"version": "0.20.8",
"nodeVersion": "22"
}
}
}When ghcr.io/devcontainers/features/node is present (declared in installsAfter), the Matilda Code feature will detect the existing Node and skip its own provisioning:
{
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"ghcr.io/devcontainers/features/node:1": { "version": "22" },
"ghcr.io/maincodehq/devcontainer-features/matilda-code:1": {}
}
}| Option | Default | Description |
|---|---|---|
version |
latest |
Version of the @maincode-ai/matilda-code npm package. Accepts a semver version (e.g. 0.20.8), a dist-tag, or latest. |
nodeVersion |
22 |
Node.js major version to install when the base image does not provide Node >= 22. Set to none to skip provisioning (the base image must then provide Node >= 22). |
- Checks whether
node >= 22is already on the PATH. - If not (and
nodeVersionis notnone), installs Node.js — either system-wide from the official binary tarball (when running as root, typical during container build) or vianvmfor the remote user. - Runs
npm install -g @maincode-ai/matilda-code@<version>. - Verifies
matilda --versionsucceeds.
After the container is built, run matilda to start an interactive session or matilda --help to see all commands.
Matilda Code requires an API key or OAuth token. Run the following inside the container:
matilda authOr set the MAINCODE_API_KEY environment variable in containerEnv / remoteEnv.
{ "image": "mcr.microsoft.com/devcontainers/base:debian", "features": { "ghcr.io/maincodehq/devcontainer-features/matilda-code:1": {} } }