Agents & TUIs
A TUI (Terminal User Interface) framework is a software toolkit used to build interactive, visually rich, and mouse-supported applications that run entirely inside a command-line terminal.
Instead of traditional command-line interfaces CLIs or Read-Evaluate-Print-Loop REPLs like IPython that just output static text lines, a TUI framework like Charmbracelet's Bubble Tea allows developers to build responsive applications featuring menus, layouts, text forms, tables, animations, and components that look and feel like a modern web app. OpenCode, Codex CLI, Gemini CLI, Claude Code, Cursor CLI and Charm Crush, are all examples of TUIs that can be used for terminal & agentic coding.
https://github.com/anomalyco/opencode
If you want Codex in your code editor (VS Code, Cursor, Windsurf), install in your IDE.
If you want the desktop app experience, run codex app or visit the Codex App page.
If you are looking for the cloud-based agent from OpenAI, Codex Web, go to chatgpt.com/codex.
Gemini CLI is an open-source AI agent that brings the power of Gemini directly into your terminal. It provides lightweight access to Gemini, giving you the most direct path from your prompt to our model.
Learn all about Gemini CLI in our documentation.
TUI vs Agent?
The Definitions
TUI (Terminal User Interface) defines how you interact with it.
Unlike a standard CLI (Command Line Interface) that just spits out scrolling text to stdout, a TUI takes over your terminal window to create an interactive visual layout. It uses text characters to build UI elements like interactive menus, side-by-side diff panels, loading spinners, and keystroke bindings (e.g., hitting Space to peek at a task or t to toggle tracing). You stay in your shell, but it feels like an application.
Agent defines what the AI is capable of doing. A standard AI chat interface requires you to act as the middleman—you copy code from your editor, paste it to the AI, and copy the answer back. An agent operates in an autonomous or semi-autonomous loop. It has direct access to tools. When you give it a goal, it will:
- Read your file system to understand the context.
- Formulate a plan.
- Execute shell commands (like running
grep, tests, or git). - Write changes directly to your files.
- Read the errors if something fails, and iterate on the fix automatically.
How the Tools Compare
Because you are working in environments where you need to manage local configurations, edit scripts, and touch infrastructure, both of these tools are designed to live where you already work: the terminal. They just take different architectural approaches.
| Feature | Claude Code | OpenAI Codex CLI |
|---|---|---|
| Creator | Anthropic | OpenAI |
| What it is | A terminal-native agent powered by the Claude model family. | A terminal-native agent powered by OpenAI's model infrastructure. |
| Is it a TUI? | Yes. It has interactive session viewing, subagent tracing, and task monitoring right in your terminal. | Yes. It launches an interactive terminal interface for chatting, reviewing diffs, and managing approvals. |
| Is it an Agent? | Yes. It reads/writes files, executes bash scripts, and can be set to run completely autonomously. | Yes. It uses file system tools, runs parallel tool calls, and can operate in full-auto mode. |
| Architecture | Built on Node.js. | Built primarily in Rust. |
| Key Differentiator | Deeply integrated with Anthropic's tool-call protocols and subagent routing. | Heavy focus on security via Linux bubblewrap sandboxing and parallel MCP server support. |
The bottom line: When you run either Claude Code or Codex CLI, you are launching a TUI (the visual shell interface) that allows you to control and monitor an agent (the underlying AI logic editing your filesystem and running commands).
