懐紙
KAISHI
A terminal for cherry blossom season

What is Kaishi?

Kaishi is a terminal UI for conversing with Hermes Agent—an AI agent that lives in your terminal. It speaks the Agent Communication Protocol over stdio, rendering streaming markdown as it arrives, token by token.

Built in Rust with ratatui. Syntax highlighting via syntect. No Electron, no web view, no runtime—just a 4MB binary that starts in under 50ms. Named for the paper held beneath cherry blossoms to catch what falls.

Features

Streaming

Tokens arrive over JSON-RPC and render as they land—thinking spinners, live markdown reflow, tool calls that update in place. No buffering.

Syntax Highlighting

Fenced code blocks pass through syntect with the base16-eighties.dark theme. Rust, Python, TOML, YAML—200+ grammars, zero configuration.

Session Continuity

Sessions persist across restarts. The picker shows titles, timestamps, and message counts—select one and the full history replays into view.

File Mentions

Type @ to fuzzy-search your project tree. Selected files attach as context—no copy-paste, no leaving the conversation.

Under the Hood

Kaishi spawns Hermes as a child process and speaks ACP over stdin/stdout—a JSON-RPC 2.0 wire protocol designed for agent communication. Every tool call, every thinking block, every token delta arrives as a typed event on an async channel. The TUI never blocks.

Rendering is immediate-mode via ratatui—each frame redraws from state, no retained widget tree. A dual-rate tick system drives the UI: fast ticks (50ms) for spinner animation during streaming, slow ticks (500ms) at idle. Markdown is parsed to styled spans at ingestion time and cached; the viewport only renders visible lines.

~5,300 lines of Rust. Eleven source files. Compiles to a 4MB static binary.

See it in action

kaishi
claude-sonnet-4-6 [████░░░░░░] 42% ~/hermes-tui
What's in this project?
This is a Rust TUI built with ratatui. It speaks the
ACP protocol to communicate with Hermes Agent.
┌─ search_files ──────────────────
Found 11 source files in src/
└─────────────────────────────────
──── 1.2k in · 247 out · 95% cached · 3s ────

Get Started

cargo install kaishi

Then just run kaishi in your terminal.

View on GitHub →