Skip to content

Latest commit

 

History

History
72 lines (53 loc) · 2.46 KB

File metadata and controls

72 lines (53 loc) · 2.46 KB

Matilda Code CLI — Dev Container Feature

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.

Example Usage

Minimal

{
  "image": "mcr.microsoft.com/devcontainers/base:debian",
  "features": {
    "ghcr.io/maincodehq/devcontainer-features/matilda-code:1": {}
  }
}

With options

{
  "image": "mcr.microsoft.com/devcontainers/base:debian",
  "features": {
    "ghcr.io/maincodehq/devcontainer-features/matilda-code:1": {
      "version": "0.20.8",
      "nodeVersion": "22"
    }
  }
}

Combined with the official Node feature

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": {}
  }
}

Options

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).

What it does

  1. Checks whether node >= 22 is already on the PATH.
  2. If not (and nodeVersion is not none), installs Node.js — either system-wide from the official binary tarball (when running as root, typical during container build) or via nvm for the remote user.
  3. Runs npm install -g @maincode-ai/matilda-code@<version>.
  4. Verifies matilda --version succeeds.

After the container is built, run matilda to start an interactive session or matilda --help to see all commands.

Authentication

Matilda Code requires an API key or OAuth token. Run the following inside the container:

matilda auth

Or set the MAINCODE_API_KEY environment variable in containerEnv / remoteEnv.