# Uncage > Uncage lets a website drive Claude Code (and Codex) on its users’ own computers. The website mounts `@uncage/hub` in its Node backend; each user connects their computer with two commands (`curl … | bash`, `uncage setup `); a background agent dials out to the hub; the website renders ``. Runs execute locally under the user’s own Claude Code login, with approval cards, streaming, Stop and reload-safe history. Claude Code calls the website’s own tools (`defineTool`) as the signed-in user and reads the website’s skills. Local Mode (`uncage serve` + a same-origin proxy) is the second path, for apps that run on the same machine as the agent. Every page is plain markdown at the URLs below. All pages in one file: https://uncage.vercel.app/docs/llms-full.txt. A ready-made skill for coding agents ("Integrate Uncage into a website"): https://uncage.vercel.app/docs/skills/uncage/SKILL.md. Packages: `@uncage/hub` (website backend, Connected Mode), `@uncage/react-ui` (``, ``, ``), `@uncage/react` (headless hooks), `@uncage/client` (browser transport), `@uncage/cli` (`uncage` command for end users and Local Mode), `@uncage/server` (Local Mode daemon and proxy), `@uncage/protocol` (wire types and error codes). macOS only for the agent side; Node.js 22 or newer. ## Overview - [Uncage](https://uncage.vercel.app/docs/index.md): Let your website drive Claude Code on your users’ own computers. The work happens on their machine; the conversation, the approvals and the results stay on your site. ## Start here - [How it works](https://uncage.vercel.app/docs/start/how-it-works.md): The pieces of Connected Mode (browser, website with the hub, the user's computer with the agent), how computers connect (WebSocket or HTTP streaming), what happens when a user connects, sends a task, and Claude Code calls one of your tools, and what happens when something fails. - [Choose a deployment mode](https://uncage.vercel.app/docs/start/choose-deployment-mode.md): Traditional mode (a long-running Node process, zero dependencies, WebSocket) or FaaS mode (Vercel, Cloudflare Workers and other Fetch platforms, Postgres, HTTP streaming)? A comparison of dependencies, latency, cost and platforms, a decision flow, and when to switch. - [Quickstart: Connected Mode](https://uncage.vercel.app/docs/start/quickstart-connected.md): Add Uncage to a Next.js app so signed-in users can connect their own computer and drive their own Claude Code from your site, with one site tool. About 15 minutes. - [Quickstart: Local Mode](https://uncage.vercel.app/docs/start/quickstart-local.md): Run Claude Code on the machine that runs your app, behind a local daemon (uncage serve) and a same-origin proxy, with the ready-made chat UI. About 5 minutes. - [Try the demo](https://uncage.vercel.app/docs/start/try-the-demo.md): Connect your own computer (macOS, Linux or Windows) to a live Uncage site with one command, ask for a landing page, and watch your own Claude Code build it and publish it through the site's tools, with approval cards in the browser. - [Install on your computer](https://uncage.vercel.app/docs/start/install-on-your-computer.md): The one command a website shows to connect your computer, on macOS, Linux and Windows. What it checks and installs, which Node.js version managers it uses, the background service, flags, non-interactive runs, manual install and uninstall. - [For coding agents](https://uncage.vercel.app/docs/start/for-coding-agents.md): How Claude Code, Codex and other coding agents should read this site, the skill to install, and ready-to-paste prompts for integrating Uncage. ## Deploy - [Node (traditional mode)](https://uncage.vercel.app/docs/deploy/node.md): Deploy the hub in a long-running Node.js process with zero external dependencies (PGlite + WebSocket), behind a reverse proxy, with a complete server, environment variables, deploy steps, a verification checklist and an FAQ. - [Next.js on Vercel (FaaS mode)](https://uncage.vercel.app/docs/deploy/vercel.md): Run the hub in a Next.js App Router route handler on Vercel with Postgres only — toNextHandlers with waitUntil after, maxDuration, the maintenance cron, Neon and pooled URLs — with complete files, environment variables, deploy steps, a verification checklist and an FAQ. - [Cloudflare Workers (FaaS mode)](https://uncage.vercel.app/docs/deploy/cloudflare-workers.md): Run the hub in a native Cloudflare Worker with Postgres through Hyperdrive — one hub per request with fetchOnce, ctx.waitUntil, cf-connecting-ip, nodejs_compat for pg, a Cron Trigger for maintenance — with complete files, environment, deploy steps, a verification checklist and an FAQ. - [Other Fetch platforms (FaaS mode)](https://uncage.vercel.app/docs/deploy/other-fetch-platforms.md): Run the hub on any platform that speaks Fetch Request/Response — Netlify Functions, Deno, Bun, other serverless hosts — with hub.fetch and Postgres; what the platform must support, complete files, environment variables, deploy steps, a verification checklist and an FAQ. ## Concepts - [Concepts](https://uncage.vercel.app/docs/concepts.md): The ideas behind Uncage, one section each: website and hub, machine and agent, session, run, events, approvals and permission modes, site tools, skills, manifest, file channel, storage, cluster, and the trust model. - [Trust model](https://uncage.vercel.app/docs/concepts/trust-model.md): What a website using Uncage can and cannot do on a user's computer, what the user controls locally, and which guarantees are built in and cannot be switched off. - [Glossary](https://uncage.vercel.app/docs/reference/glossary.md): One-line definitions of every Uncage term (agent, computer, hub, deployment mode, transport, site tool, skill, manifest, file channel, site storage, cluster, permission mode, Local and Connected Mode), with the exact API names and the Chinese UI words. ## Guides - [Mount the hub](https://uncage.vercel.app/docs/guides/mount-the-hub.md): Complete Node servers that mount @uncage/hub in Express, Fastify, Hono, a Next.js custom server or plain node:http (traditional mode), the hub as a Fetch handler for serverless platforms, every createHub option, and proxies. - [Auth and device approval](https://uncage.vercel.app/docs/guides/auth-and-device-approval.md): Connect the hub to your sign-in with getUser, and build the /device approval page safely (signed-in only, frame-ancestors 'none', CSRF-protected POST), in Next.js or any Node server. - [React Native apps](https://uncage.vercel.app/docs/guides/react-native.md): Use @uncage/client and @uncage/react in an Expo / React Native app: streaming with expo/fetch, bearer-token headers, a storage adapter for the open session, photo uploads, resuming after the app was in the background, and approving a new computer from a phone. - [Authenticate apps](https://uncage.vercel.app/docs/guides/authenticate-apps.md): How a mobile app or other native client signs in to your hub: your getUser reads an Authorization bearer token that you issue, apps send no cookies and no Origin, and a website request from a foreign Origin is still refused. - [Push notifications](https://uncage.vercel.app/docs/guides/push-notifications.md): Notify users when their computer needs them: the hub's onAttention hook (approval requested, run completed or failed), at-most-once delivery with stale-event suppression, the ready expoPushNotifier for Expo Push, registering device tokens, and how to test. - [Browser extensions](https://uncage.vercel.app/docs/guides/browser-extension.md): Put the agent in a Chrome Manifest V3 side panel: AgentChat against your hub with the site's cookies, trustedOrigins for chrome-extension:// (exact origins only), stable extension ids, cookie and SameSite caveats, and bearer tokens as the alternative. - [One agent, every site](https://uncage.vercel.app/docs/guides/one-click-connect.md): Connect a computer that already runs Uncage to another Uncage site in one click: the uncage:// link handler, uncage connect, the native confirmation with site identity checks (domain, IDN, IP, first time, look-alike), the local dashboard, and the phishing threat model. - [Define tools](https://uncage.vercel.app/docs/guides/define-tools.md): Give Claude Code your website's capabilities with defineTool, run them as the signed-in user, ask for confirmation, return results, read files from the user's computer with ctx.files, and test handlers. - [Write skills](https://uncage.vercel.app/docs/guides/write-skills.md): Give Claude Code your website's rules, formats and templates as skills (SkillSpec), how they reach the user's computer, how to write ones the model actually follows, and their limits. - [Choose tools and skills per run](https://uncage.vercel.app/docs/guides/select-manifest.md): Use selectManifest to decide, for each run, which of your site tools and skills Claude Code gets, based on the user, the prompt or the session. - [Site storage](https://uncage.vercel.app/docs/guides/site-storage.md): Keep a replica of every conversation on your website with sessionStorage 'site', so history stays readable while the user's computer is off, and read the replica and the tool-call audit from your own code. - [Multi-node (Postgres, Redis)](https://uncage.vercel.app/docs/guides/multi-node.md): Run the hub on two or more nodes behind a load balancer with postgresHubStore and redisCluster or postgresCluster, why FaaS mode is multi-instance by nature, what crosses between nodes and what is guaranteed, load balancer settings, and how to try it locally. - [Custom UI with hooks](https://uncage.vercel.app/docs/guides/custom-ui.md): Customize AgentChat (locale, theme, components, CSS variables) or build your own chat and connect-your-computer flow from the headless @uncage/react hooks, in Connected and Local Mode. - [Local policy and the user's computer](https://uncage.vercel.app/docs/guides/local-policy.md): What the end user controls on their own computer: ~/.uncage/agent.yaml and localPolicy (allowBypass, allowedPermissionModes), the activity log, folders, the background agent, disconnecting websites, and local extensions. - [Use any ACP agent](https://uncage.vercel.app/docs/guides/use-any-acp-agent.md): Offer Gemini CLI, OpenCode, Claude Code’s ACP adapter or any other Agent Client Protocol agent next to Claude Code and Codex: runtimes.acp in ~/.uncage/agent.yaml, presets, the ACP registry, what differs from the native runtimes, troubleshooting and a checklist. - [Contributing, CI and releases](https://uncage.vercel.app/docs/guides/ci-and-releases.md): How to build and test the Uncage monorepo, what CI runs, how releases are published to npm with Changesets and trusted publishing, and how this help site is checked and deployed. ## Reference - [CLI reference](https://uncage.vercel.app/docs/reference/cli.md): Every uncage command and flag, for Connected Mode (setup, connect, dashboard, agent install / uninstall / status, sites, runtimes, activity) and Local Mode (serve, doctor), uncage --version, the one-command installers, and the environment variables they read. - [Local Mode in depth](https://uncage.vercel.app/docs/reference/local-mode.md): The composer controls, attachments, bypass permissions, configuration (uncage.config.yaml), the proxy's host and origin checks, and the security model of the Local Mode daemon. - [HTTP API](https://uncage.vercel.app/docs/reference/http-api.md): Every route of the hub's browser API, device endpoints, installers, maintenance endpoint and the agent transports (WebSocket and HTTP streaming with NDJSON, cursor and ack, idempotent ids, 1 MB bodies), how they map to the Local Mode daemon's /v1 API, SSE, and error responses. - [Error codes](https://uncage.vercel.app/docs/reference/errors.md): Every Uncage error code with its HTTP status, whether it is retryable, what it means, and what to do, including the Connected Mode codes (machine_offline, tool_failed, upgrade_required / 426, rate_limited) and the details.reason values (interrupted, link_closed, link_replaced, not_in_manifest, …). - [Security](https://uncage.vercel.app/docs/reference/security.md): The security properties of Connected Mode (transport, machine tokens, device login, isolation between users, tool execution, file channel, limits) and Local Mode, and a checklist for website developers. - [Troubleshooting](https://uncage.vercel.app/docs/reference/troubleshooting.md): Fixes for common problems installing on the computer (command not found, a removed Node.js, Linux lingering and no systemd, Windows execution policy, unzip), in Connected Mode (computer not connecting, offline, agent update needed, setup errors, tools not called, 504s and timeouts on serverless, cut connections, poolers, WebSocket behind proxies) and Local Mode (daemon not reachable, forbidden_origin, ports, sign-in). - [Migrate from 0.2](https://uncage.vercel.app/docs/reference/migrate-from-0-2.md): Every breaking change in Uncage 0.3 with before/after code — @uncage/hub is Web-standard, Node parts move to @uncage/hub/node, store is required, hub.fetch and attachWebSocket replace hub.handler and hub.attach, agents must be 0.3 or newer — plus the new options and HubStore additions. - [Changelog](https://uncage.vercel.app/docs/reference/changelog.md): What changed in each Uncage release: 0.4 (React Native apps, browser extensions, one agent for every site), 0.3 (the hub runs anywhere, any ACP agent, macOS / Linux / Windows), 0.2 (Connected Mode) and 0.1. The authoritative changelog is CHANGELOG.md in the repository and on each npm package. ## Optional - [简体中文 (zh-CN) overview](https://uncage.vercel.app/docs/zh-cn.md): Chinese versions of the overview, quickstarts and concepts live under /zh-cn/. - [日本語 (ja) overview](https://uncage.vercel.app/docs/ja.md): Japanese versions of the overview, quickstarts and concepts live under /ja/. - [API: @uncage/agent](https://uncage.vercel.app/docs/api/agent.md): Generated TypeScript API reference. - [API: @uncage/client](https://uncage.vercel.app/docs/api/client.md): Generated TypeScript API reference. - [API: @uncage/core](https://uncage.vercel.app/docs/api/core.md): Generated TypeScript API reference. - [API: @uncage/hub](https://uncage.vercel.app/docs/api/hub.md): Generated TypeScript API reference. - [API: @uncage/protocol](https://uncage.vercel.app/docs/api/protocol.md): Generated TypeScript API reference. - [API: @uncage/react](https://uncage.vercel.app/docs/api/react.md): Generated TypeScript API reference. - [API: @uncage/react-ui](https://uncage.vercel.app/docs/api/react-ui.md): Generated TypeScript API reference. - [API: @uncage/server](https://uncage.vercel.app/docs/api/server.md): Generated TypeScript API reference.