gitmyhub

zehn

Zig ★ 19 updated 20d ago

Fuzzy-find any prompt across claude, codex, pi & opencode histories, then resume that session. Fast Zig TUI.

A fast command-line tool that searches across all your past Claude Code, Codex, pi, and opencode conversations at once, letting you find and jump back into any previous AI coding session in under a second.

Zigsetup: moderatecomplexity 2/5

zehn is a small command-line tool that searches across all your past AI coding assistant conversations at once and lets you jump back into any of them. It works with four tools: Claude Code, Codex, pi, and opencode. If you have been switching between those assistants over days or weeks, finding a specific thing you asked for earlier means digging through separate history files in different formats. zehn reads all of them and presents the combined history in a single searchable list.

The name comes from the Persian and Arabic word for "the mind" and is pronounced like "zen." The tool is written in Zig, a compiled systems programming language, which is what allows it to read and parse around 1,300 sessions in roughly 0.2 seconds on the author's machine.

Using it is simple: run the command, start typing a few letters from the prompt you remember, use the arrow keys to move through results, and press Enter. zehn then changes into the project directory where that session lived and runs the appropriate resume command for whichever assistant owns it. If the project folder no longer exists, it falls back to your current directory. Each assistant's results appear in a distinct color so you can tell at a glance where a result came from.

Beyond basic search, the tool has a few extra features. You can mark prompts as favorites so they float to the top of future searches. You can copy a prompt to the clipboard or send it to a different assistant than the one it originally came from, which lets you reuse a question you wrote in one tool with a different AI. There are also filter flags to show results from only one assistant, or to print output without the interactive interface.

Installation uses a one-line curl command that downloads, builds, and installs the binary automatically. Zig 0.16 or newer is required. The license allows free noncommercial use; commercial use requires a separate agreement.

Where it fits