> _**CLI skill (basic)** · ~21,762 tokens · hoody-sdk v1.0.0-beta.17_ # CLI mode — `hoody` command **Online? Use HTTP, not this CLI** (`SKILL-HTTP.md`): in a web chat (ChatGPT, claude.ai, …) or a throwaway sandbox that is not a Hoody container or the user's own computer, `hoody` is not installed, a login made there does not last, and it is not the user's machine. Check `command -v hoody`; if it is missing, use HTTP rather than installing it. Covers a mapped subset of the SDK / HTTP surface (somewhat fewer CLI operations than SDK methods) — not a 1:1 mirror. Command names sometimes differ from SDK accessors (e.g. `hoody files get` for the SDK's `files.get`), a few kits carry commands of their own shape (`pipe`, `tunnel`), and SDK-only helpers (`listAll` / `listIterator`) have no CLI form. For the exact command for a given operation, consult the `SKILL-CLI/.md` per-namespace pages. ## What is Hoody Hoody is a remote-first computing platform: every workflow — coding, browsing, scheduling, agent runtimes, file storage, GUI desktops, HTTP services, scripts, databases, displays — runs in account-owned cloud containers reachable by URL, with zero local setup. **Thesis: everything remote, no friction.** A container is a **full Linux box (systemd + root, just like a VM — not a Docker-style minimal sandbox)** you can spin up, fill, and use from anywhere; ports are auto-published on `https://...containers.hoody.com`; GUIs render to browser tabs; one-shot scripts mount as HTTP endpoints; databases, terminals, file watchers, full XFCE/MATE desktops, and SSH are first-class kits. Standard distro tooling works as expected — `apt install nginx && systemctl enable --now nginx`, `journalctl`, `crontab`, etc. The CLI / SDK / HTTP surfaces are three skins on the same control + container plane — drive whichever fits your runtime. **Prefer a GUI?** The **Hoody Agent** browser GUI runs at `https://{P}-{C}-agent-1.{N}.containers.hoody.com` — file browser, code editor, agent sessions, PR review, MCP, memory, image-gen, web search, all in a browser tab. It's the human-facing surface over the same `agent` kit these skills drive programmatically (same `-agent-1` host — the HTTP API lives under its `/api/v1/agent/` path). **Every kit URL is also iframable** (`code`, `files`, `terminal`, `display`, `desktop`, `notes`, `agent`, …) — you can compose a full HTML "operating system" out of kit iframes with no native code. Use whichever surface fits the moment. **Need a custom API, script-as-service, or multi-step workflow?** Default to `exec`. Drop a `.ts` / `.js` (or shell-out via Bun) into the scripts dir and it auto-mounts as an HTTP endpoint — no framework, no deploy, schema-validated, logged, metric-instrumented, alias-able to a public hostname. Each script is a micro-service, kept warm by the kit; **multi-step workflows** (call agent A → check with agent B → trigger action C) are just one script orchestrating the steps. (Not a sandbox for untrusted code — see `exec` namespace.) **Need a GET-only URL for something that's actually a POST/PUT?** Use `curl` — `hoody curl run --url --method POST [...]` drives the curl kit; over HTTP the kit can turn any REST call into a single GET-able link for browser-only callers, restricted webhooks, agents with web-fetch-only access (the CLI and SDK send the POST form). See `curl` namespace. **Stuck, or unsure how to do something?** Ask Hoody's public docs assistant — an unauthenticated MCP endpoint at `https://chatbot.hoody.com/mcp` (one tool, `search_hoody_docs`; or the `POST /api/chat` SSE fallback) answers any "how do I…" with cited doc URLs. Use it for discovery when you're not sure which namespace fits. ## When to choose CLI Agents that need a single-binary surface: `-o table|json` dense; pipe `jq`; streams via `-o ndjson`. ## Getting a `hoody` CLI ### Already installed? ```bash hoody --version # if this works, skip to "Login" ``` ### Zero-install — public SSH bridge `ssh hoody.com` opens an in-memory shell with the CLI already on `$PATH` — nothing to install, runs anywhere `ssh` works (CI, locked-down boxes, etc.). Two modes: ```bash ssh hoody.com # interactive — prompts for username + password ssh @hoody.com # scripted — token-as-username, no prompt ``` Inside the SSH session: `hoody --help`, `hoody login`, `hoody projects list`, etc. — exactly the same binary as a local install. Sessions are RAM-only (no disk record); short-lived connection metadata is kept solely for anti-DDoS. ### One-shot run via npx (no install) ```bash npx hoody-sdk # also: bunx, pnpm dlx, yarn dlx ``` ### Install — Linux / macOS ```bash curl -fsSL https://install.hoody.com | sh ``` ### Install — Windows (PowerShell) ```powershell iwr https://install.hoody.com/install.ps1 -UseB | iex ``` ### Other install paths - `https://cli.hoody.com/` — landing with all install variants + source build. - `https://install.hoody.com/` — pre-signed binaries (Linux/macOS/Windows, x64/arm64). - `https://sdk.hoody.com/` — TypeScript/JS SDK, when you'd rather script than CLI. After install: `hoody update` reports whether a newer release exists. With a configured update domain the manifest is minisign-verified; with none (the npm and install-script default) the version comes from npm/GitHub and no signature is checked. ## Login ```bash hoody login --web --no-browser # browser sign-in: prints a link + code for the user, polls, saves the session ``` Browser sign-in is the default when a person is present: give the user the printed link and code; they sign in and approve on Hoody's page, and the CLI saves the session. If your shell tool shows output only after a command exits, run it in the background and read the link from its output. Never ask for the user's password in chat. The password flags below are for a user who signs in from their own terminal: ```bash hoody login --username alex --password "$HOODY_PASSWORD" ``` - `--username` (`-u`) is the primary login flag; the CLI accepts `--email` as an alternative for email-based login. The server enforces the alphanumeric/underscore/hyphen pattern, so a malformed value fails at the request. - `--password` takes an optional value: a bare `-p` prompts for it securely. In a terminal, `hoody login` with no flags opens a menu (password, browser, or token). Without a terminal (a script, `-o json`, `--non-interactive`) it needs an identifier AND a password, supplied through flags, `--password-stdin` or environment variables: a missing identifier comes from `HOODY_USERNAME`/`HOODY_USER` (a value containing `@` is sent as `email`), a missing password from `HOODY_PASSWORD`/`HOODY_PASS`. Without both it stops with `Missing credentials.`. Token cached at `~/.hoody/config.json`. - Base URL: the CLI targets `https://api.hoody.com` by default. Override it with `--base-url ` (CLI flag is kebab-case), the `HOODY_BASE_URL` environment variable, or `hoody config set baseUrl ` (config key is camelCase); `hoody config get --resolved` prints the effective settings. ## Config and profiles `hoody config set|get ` writes `~/.hoody/config.json`. `--profile ` switches account; each has own token, base-url, default container. ## Auth modes Priority: `--token`/`-t` > `HOODY_TOKEN` > stored session. Kit-service routing uses the per-container capability URL. ## Container scope — `--container`/`-c` (REQUIRED for kit commands) Every command that targets a container kit (`hoody browser|code|cron|curl|daemon|display|exec|files|notes|notifications|pipe|db|kv|terminal|tunnel|watch …`; `db` (short form `sql`) is the sqlite kit's SQL group, and `kv` is its key-value group; `logs` is a kit URL slug only and has no CLI command group; tail logs via `proxy logs` / `exec logs` / `daemon programs logs`) needs a container id. (`hoody agent` IS a kit command group whose *bare* form opens the in-container Agent TUI; `hoody agent prompt …` and the generated `agent sessions|models|…` subcommands live under it.) Resolution order: 1. `--container ` / `-c ` (global flag, before the subcommand) 2. `HOODY_CONTAINER` env var 3. Per-profile sticky default via `hoody local defaults set container ` (recommended; `local defaults` covers the curated user-facing keys `container`/`realm`/`output`/`noColor`/`quiet`). `hoody config set container ` writes the same setting. A container id is the 24-hex id from `hoody containers list` (the CLI rejects anything else). ```bash CONTAINER_ID=$(hoody containers list -o json | jq -r '.containers[0].id') hoody --container "$CONTAINER_ID" files get /home/user # inline HOODY_CONTAINER="$CONTAINER_ID" hoody files get /home/user # env hoody local defaults set container "$CONTAINER_ID" # sticky; then plain `hoody files get /home/user` ``` Account-level commands (`hoody login`, `hoody projects`, `hoody wallet`, `hoody auth`, `hoody vault`, `hoody containers list`, etc.) hit the control-plane API and ignore `--container`. Control-plane commands that act on ONE container read it from `--container` and require it, e.g. `hoody containers env …`, `hoody snapshots …`, `hoody firewall …`, `hoody network …`, `hoody storage …`. Check `--help` for a `Requires: --container` line. ## Output formats `--output`/`-o`. Default `table` (requests), `ndjson` (streams). | Fmt | For | |---|---| |`table`|default| |`json`|`jq`| |`yaml`|structured| |`wide`|extra cols| |`raw`|unwrapped body| |`ndjson`|streams (auto SSE)| |`pretty`|stream variant| ## Convenience aliases - `chat`, `login`, `signup`, `logout`, `config`, `local`, `update` - `shell` (the one-shot command is positional: `hoody shell -- uname -a`; there is no `--command` flag) - `open` (kit UI); `screenshot` (kit capture); `desktop open`; `kits list` ## Index of common ops § Core operations covers: login/2FA, projects, containers, exec, files, screenshots, sqlite, watch, snapshots, vault, wallet. Per-namespace deep dives: `SKILL-CLI/.md`. URL routing → § Proxy URLs. Auth → § Auth model. --- # Proxy URLs — capability-based per-container routing ## What it is `https://{projectId}-{containerId}-{kit_slug}-{n}.{node}.containers.hoody.com` - Proxy terminates TLS on `*.containers.hoody.com`, parses the hostname segments (project, container, kit, index) and routes to that kit. - Hoody API: global `https://api.hoody.com`. - Aliases (`my-api.{N}.containers.hoody.com`) are shortcuts; canonical URL is authoritative. ## Components | Segment | Meaning | |---|---| | `projectId` | 24-char hex. | | `containerId` | 24-char hex. Bearer credential. | | `kit_slug` | Kit id (see Kit slug table); some namespaces differ from their slug (e.g. `notifications` → `n`, `proxyLogs` → `logs`). | | `n` | 1-based instance index; single-instance kits use `1`. | | `node` | Bare server hostname (use the `server_name` field from container responses). | | Suffix | `.containers.hoody.com` | ## Every kit URL is iframable — compose a UI out of kits Each kit URL serves a regular HTML/JS page (or HTTP/WS API) — drop it into an ` ``` You can compose a **full HTML "operating system" out of Hoody kit iframes** — no native code, no installer, just URLs. Hoody itself does this: `os.hoody.com` is essentially a kit-iframe shell. ### Collaborative embeds — work from inside the chat Most modern collaboration tools accept iframes (or unfurl URLs into rich previews that render iframes), so a Hoody kit URL drops straight into: | Platform | Embed surface | Outcome | |---|---|---| | **Slack** | Canvas embed, custom unfurls, Slack apps | Drop a `terminal-1` URL into a channel canvas → live shell that everyone in the channel can see + drive. Pair with a Cline `?extension=…` `code-1` URL for "agent-in-the-channel" support. | | **Notion** | `/embed` block (paste URL → Embed) | Wiki page that contains the live editor / agent / file browser as part of the doc. | | **ClickUp** | Embed view in any list / dashboard | Project board with the relevant repo's `files-1` and `code-1` panes alongside tickets. | | **Matrix / Element** | `m.html` event, custom widgets | Same as Slack — live terminal / agent in a room. | | **Microsoft Teams / Zoom** | Apps that accept URL iframes | Shared workbench during calls. | | **Discord** | Activity URLs, link previews | Drop the URL; viewers click into the live surface. | | **Confluence / Jira** | "Smart Link" / iframe macro | Runbook page with the live tool baked in. | | **Plain HTML** | `