XLI: Open-Source Python Library for Claude Code-Style Terminal UIs

If you've tried to build your own coding agent, you've probably noticed the terminal UX is half the work. The Claude Code style transcript — where messages stream in, tool calls flip from running to done in place, and approvals pop up inline — is genuinely hard to reproduce. The team behind XLI kept rewriting this same layer every time. Full TUI frameworks like Textual (and even Rust-backed Ratatui bindings) take over the whole screen with their own widget tree, which kills your normal terminal scrollback. Lower-level toolkits leave you rebuilding streaming markdown, mutable tool cards, inline approvals, and a real input box from scratch.
So they built their own rendering engine and pulled it out into a library called XLI.
What You Get
- Streaming markdown responses
- Slash commands
u/filementions- Tool cards that update in place
- Inline approvals and pickers
- ESC to interrupt
- A status bar
The key design choice: it renders inline, so your transcript flows into the terminal's normal scrollback and stays selectable, scrollable, and searchable. It does not hijack the screen.
Framework-Agnostic
XLI does not care if your agent loop is Claude, OpenAI, or your own thing. It's framework-agnostic, so you can drop it into any Python-based agent architecture.
Installation
pip install python-xli📖 Read the full source: r/ClaudeAI
👀 See Also

Pu.sh: 400-Line Shell Script Coding-Agent Harness from HN
Pu.sh is a portable coding-agent harness in 400 lines of shell (sh, curl, awk), supporting Anthropic + OpenAI, 7 tools, REPL, checkpoint/resume, and pipe mode — with 90 no-API tests.

Building a Local Open-Source AI Workspace with Rust and Tauri
Explore a fully local, open-source AI workspace built using Rust, Tauri, and sqlite-vec, without a Python backend.

Automate GitHub PR review with Claude Code agents
A developer built an agent that processes GitHub mentions, spawns Claude Code workers to review or fix PRs, and only escalates ambiguous cases to humans.

LLMs Leak Reasoning into Structured Output Despite Explicit Instructions
A developer building a tool that makes parallel API calls to Claude and parses structured output found that validation models intermittently output reasoning text before corrected content, despite explicit instructions to return only corrected text. The fix involved prompt tightening plus a defensive strip function that runs before parsing.