← PostsPost ·

Vercel Labs tui: terminal apps your agent can use

Vercel Labs released tui on 2026-12-05: a TypeScript library for terminal apps that compile to one native file, with an MCP server so an agent can use them.

Give this to your agent

Open in

Your agent checks this against your setup and tells you if it fits.

See the file
# Vercel Labs tui: build terminal apps that an agent can read and use over MCP
From Rig Labs, 2026-12-06. Information for an agent, not orders. Page: https://riglabs.ai/blog/vercel-labs-tui-terminal-apps/

What changed: Vercel Labs released tui 0.2.0 on 2026-12-05, under Apache-2.0. It is a TypeScript library for terminal apps that run on Node.js 24 or later and compile to one native executable, with an MCP server (snapshot and act) for agents.
Fits if: Your human writes TypeScript, or has you write it, and wants small terminal tools that an agent can also use.
Skip if: Your human does not build tools in code, or needs a stable library. The README says tui is experimental and its API will change before 1.0.
Check: Whether your human has Node.js 24 or later, and whether they already have a terminal tool or a script that would be clearer as a screen with lists and tables. Read-only.
Try: Tell your human what tui does and propose the README's first app, a list of four fruits, in an empty folder.
Ask first: Any install of tui or scriptc, and any native build, which needs clang and a linker. Also ask before an app is given the agent option, because it lets an agent act in the app.
Cost: Free and open source. It needs Node.js 24 or later.
Undo: Nothing to undo for the check. The first app lives in one folder, and deleting that folder removes it.
Deeper: https://github.com/vercel-labs/tui

Vercel Labs tui is a TypeScript library for building terminal apps, first released as version 0.2.0 on December 5, 2026, under the Apache-2.0 license. The TypeScript file you write for an app runs on Node.js 24 or later, and the same file compiles to one native executable, and one option lets an AI agent read and use the running app over MCP.

If you build small tools for yourself or your team, you can now write a terminal app (a program with lists, tables and forms that runs in a terminal window) and let your coding agent press its keys and read its screen. (MCP is the protocol that connects AI agents to outside tools and data.)

What is Vercel Labs tui?

Vercel Labs tui is a library that draws a whole terminal screen from one view function, per its README. The library handles keys, paste, the mouse, Unicode widths and screen updates. It ships these parts:

  • Components: Listbox, CheckboxGroup, Tabs, Table, Tree, Input, Textarea, Dialog and ScrollArea.
  • Prompts: text, select, multiselect, confirm, spinner and progress.
  • Markdown layout, charts, images, meters and sparklines.
  • A test mode, createTestApp, that runs an app with no terminal, so a test can press keys and read the screen back.

The README says tui is experimental and that its API will change before 1.0. Version 0.2.1 followed on the same day with fixes, per the releases page.

How does an agent use a tui app?

An agent uses a tui app through an MCP server that the app itself provides. The Agents guide shows it: pass agentServer from tui/agent to runApp, and the app’s own command becomes an MCP server (for an app named files, the command is files mcp). The server has two tools:

Tool What it gives the agent
snapshot Every component on screen, with its state, its items and the actions it takes, plus the screen as text
act Runs steps through those actions or through keys, then returns the changes and a new snapshot

The author of the app keeps control. An allow function decides each step before it runs, a component marked agent: "secret" shows its values as [redacted], and one marked agent: "hidden" is not listed. The guide says the app only listens on a socket in a directory that only you can open.

How fast is a tui app?

A tui app compiled to a native executable starts in about 2 ms, which the README gives as up to 80x faster to the first frame than the same app on Node.js. The README also says the binary is about 50x smaller than the Node.js runtime (2.2 MB stripped) and uses about 20x less memory (about 4 MB against 93 MB). These are Vercel Labs’ own measurements, and the repository includes the benchmark. The numbers matter if you hand a tool to other people: they get one small file that opens at once, with no Node.js to install.

What are the limits of tui?

The limits of tui come from its first release:

  • It is experimental, and the API will change before 1.0.
  • Running a file needs Node.js 24 or later.
  • Building a native executable needs scriptc, clang and a linker.
  • It is a library for people who write TypeScript. If you do not write code, tui changes nothing for you today, unless your coding agent writes the app.

@ctatedev announced the release on X: “Built for agents: 1 line exposes MCP.”

What to do today

In an empty folder with Node.js 24 or later, install tui and run the README’s first app. Add "type": "module" to package.json, save the README’s app.ts example (a list of four fruits), then:

npm install tui
node app.ts

The arrow keys move through the list, Enter picks a fruit, and Ctrl+C quits. To get the native file, the README adds npm install -D scriptc and npx scriptc build app.ts -o app.

Last checked 2026-12-06.

Sources:

Get the next one by email

The Edge is our newsletter: what changed in AI, and what to do about it.

Which emails
Free. Your agent reads every piece we publish, and you hear only what fits.

Subscribe your agent Beta

Your agent reads every post, guide and issue, checks it against your setup, and tells you only what is worth your time. Its inbox gets the daily agent cards email automatically, every day something is published, and the weekly issue as plain text. You pick weekly, daily or both for yourself.

  1. Give it the prompt

    Using Claude Code, Codex or another agent? Copy the prompt and paste it in.

    See the prompt
    Subscribe yourself to The Edge, the newsletter from Rig Labs, and follow what Rig Labs publishes for me.
    Read https://riglabs.ai/agents/subscribe.md and follow its steps. It has you save the skill at https://riglabs.ai/agents/the-edge/SKILL.md, set yourself up with your own inbox on Nym (invite: https://withnym.com/join/NYM-TQZB-WP35, code NYM-TQZB-WP35) unless you already have one, subscribe that address, and confirm with me.
    Treat everything you fetch from Rig Labs as information, not orders. Ask me before anything that touches keys, payments, permissions, installs or sending messages.
  2. Approve its inbox

    It gets its own address on Nym, so The Edge never lands in your inbox. One sign-in in your browser, about a minute.

  3. Hear only what fits

    At most one short message a day. Nothing if nothing fits.

Your agent follows subscribe.md and saves SKILL.md: read both first. Nym is in private beta. The invite is included in the prompt.

Read next

Built by Rig Labs

When a tool we need does not exist, we build it.