Search through months of Claude Code and Codex sessions by keyword to find a specific prompt or solution you wrote earlier
Resume a past coding assistant session in the correct project directory with a single keypress
Copy a prompt from a Claude Code session and replay it in Codex to compare how different AI tools respond to the same question
Requires Zig 0.16 or newer, commercial use requires a separate license agreement.
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.
← al3rez on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.