Claude Code, running in a browser tab
Anthropic's coding agent runs inside a Lifo box: the same CLI from npm, its terminal UI, its Bash tool and its file edits. Nothing is installed on the machine, and the files it works on live in the box.
$ npm i -g @anthropic-ai/claude-code@2.1.112
$ claude
> Add a /health route to the server and check that it answers.
⏺ Read(server.js)
⏺ Update(server.js)
⏺ Bash(node server.js & curl -s localhost:3000/health)
⎿ {"ok":true}
It runs on Lifo's main line and ships with the next release, so there is no live demo here yet. The picture shows what the session looks like.
The real CLI, not a port.
Lifo's Node.js layer runs the package as published. Claude Code talks to the Anthropic API from the tab with your key, and everything else happens in the box.
$ npm i -g @anthropic-ai/claude-code@2.1.112
$ export ANTHROPIC_API_KEY=sk-ant-...
$ claudeVersion 2.1.112 is Claude Code's last JavaScript release. Later versions are native binaries, which a Lifo box does not run.
Why it is its own use case. A coding agent is the hardest thing to run in a browser OS: a full-screen terminal UI, child processes, a shell tool and a lot of Node.js surface. When it runs, most smaller agents do too.
Where it fits. A try-it page for an agent product, a workshop where nobody installs anything, or a disposable workspace that is gone when the tab closes.
What runs in the box.
- 01
The terminal UI
The full-screen interface draws in Lifo's xterm.js terminal: prompts, diffs and permission questions.
- 02
The Bash tool
Commands Claude Code runs go to the box's shell, so ls, grep, npm and node act on the box's files.
- 03
File edits
Reads and edits hit the box's filesystem. Keep it in memory, persist it to IndexedDB or take a snapshot.
Status
Not in a released version yet. It works on Lifo's main line and ships with the next @lifo-sh/core release, with a playground example named claude-code.
You bring your own Anthropic API key, and requests go from your browser to the API directly. Claude Code is Anthropic's product; Lifo only provides the environment it runs in.
Other things the same box does.
> The cart total is wrong. Fix it.
⏺ bash(npm test)
⎿ 1 failed, 12 passed
⏺ bash(grep -n total src/cart.ts)
⏺ edit(src/cart.ts)
⏺ bash(npm test)
⎿ 13 passed
Bash for agents
Give the model one bash tool backed by a Lifo box. If your agent is in JavaScript you need nothing else: Lifo is an import that runs in your Node.js API routes.
$ npm install && npm run dev
➜ Local: http://localhost:5173/
Dev environments
Vite, Expo and Express run unmodified with npm install, dev servers and hot reload, next to Postgres, Supabase, Python and git.
$ browser open news.ycombinator.com
✓ Hacker News
$ browser state
[1] new [2] past
$ browser click 1
Browser-use agents
Firefox, compiled to WebAssembly, runs next to the box. An agent opens pages, reads them and clicks, all inside the tab.
$ desktop snap firefox left
$ desktop windows --json
Desktop and computer usePreview
Lifo Desktop is a full desktop in a tab. Its windows and apps are scriptable through one API and a desktop command.