> _**CLI skill · `code` namespace** · ~5,336 tokens · hoody-sdk v1.0.0-beta.17_ # `code` — VS Code in the browser, per container ## Purpose **This is the VS Code IDE running in a browser tab — not a programmatic API.** Open `https://{P}-{C}-code-1.{N}.containers.hoody.com/` and you get the full editor: file tree, diff view, debugger, terminals, extensions marketplace, all backed by the container's filesystem. The `code-N` URL is served by an **orchestrator** that starts one isolated editor instance per index and returns a page that embeds it. The index is the hostname: `code-1` is instance 1, `code-2` is instance 2, each with its own settings, state and running process. On a `code-N` host the platform's edge fills in the two parameters the entry page needs. It sets the instance selector `id` from the hostname, overwriting anything the caller sent, and it sets `folder` to the container's default workspace when the request names none. Add `?folder=` to open a different folder. Talking to a bare kit server with no edge in front of it, a client must send both `folder` and `id` itself: with neither the entry path returns the kit specification, with only one it returns `400`. The methods in this namespace read the service's state (health, running instances, versions), stop editor instances, stage extensions and confirm what an instance has installed, and build embed URLs. Day-to-day use is "open the URL". Like every Hoody kit URL, `code` is **iframable**: drop the `code-N` URL into an ` ``` To keep the `containerId` out of the iframe `src`, create a proxy alias on the `code` service with the landing query as its `target_path`, and use the URL the call returns. Leave `id` out of the target: the alias's `index` picks the instance, and a target query naming `id` is refused with `404 ALIAS_TARGET_QUERY_FORCED_KEY`. The `folder` (and `extension`) in the target is a landing preference only: the editor opens there, but it does not confine the session, and anyone using the editor can open any other folder the container user can read. ```bash hoody proxy aliases create --container-id "$C" --program code --index 1 --alias agent \ --target-path '/?extension=saoudrizwan.claude-dev&folder=/home/user/myrepo' ``` Gate the alias with `hoody containers proxy *` before sharing it (see the `api` namespace). The same iframe pattern works for **every** Hoody kit (`files`, `terminal`, `display`, `desktop`, `browser`, `notes`, `agent`, …). ## Reference ### `hoody code` (8) — VS Code server | Command | Aliases | Category | Summary | SDK Link | Example | |---------|---------|----------|---------|----------|---------| | `hoody code embed` | | read | Build an iframeable URL for a VS Code extension (extension-only mode) | `embeds.code.extension` | `hoody code embed rooveterinaryinc.roo-cline --folder /home/user/project` | | `hoody code extensions install` | | write | Stage a VS Code extension (.vsix) from a URL; it is installed at the instance's next start | `code.extensions.install` | `hoody code extensions install --url https://example.com/publisher.name-1.2.3.vsix --allow-downgrade` | | `hoody code extensions list` | | read | List staged extensions and the extensions the instance reports as installed | `code.extensions.list` | `hoody code extensions list` | | `hoody code health` | | read | Service health check | `code.kit.getHealth` | `hoody code health` | | `hoody code open` | | action | Open the Code kit editor on a folder in your browser | | `hoody code open --folder /home/user/project` | | `hoody code status` | | read | Orchestrator configuration and running editor instances | `code.kit.getStatus` | `hoody code status` | | `hoody code stop` | | action | Stop an editor instance; its settings, extensions and workspace state are kept | `code.stop` | `hoody code stop 1` | | `hoody code version` | | read | Versions of the running orchestrator and its packaged editor | `code.kit.getVersion` | `hoody code version` |