Star

peekme for Claude Code

Explain any words in a Claude Code answer

Select words in Claude Code's output and press Alt+P (Option+P on a Mac). A short explanation opens right under them, and Claude's screen stays as it was. Press Alt+Shift+P to type your own question about them.

Claude Code: peek at "HOT updates", then ask "What value should I set it to?" about "fillfactor" in a box inside the box. A click on the underline opens the saved answer.

Install

npm i -g peekme
peekme install

Open a new terminal and run claude as always. peekme is now in front of it.

How it works in Claude Code

Run claude as always. Select text with the mouse and press Alt+P.

In Claude Code, Alt+P opens the model picker. With peekme it explains the selection instead. /model still opens the model picker.

Which model explains

No API key is needed. A peek runs claude -p with your own Claude login, on Haiku, without tools and without saving the session, so nothing appears in /resume. After the first explanation one claude -p waits in the background for the next one, so it starts in about half a second. It takes about 210 MB of memory.

A typed question (Alt+Shift+P) goes to the model your chat runs on, with the whole conversation. To change either model:

export PEEKME_CLAUDE_MODEL=sonnet        # peeks, default haiku
export PEEKME_CLAUDE_ASK_MODEL=opus      # questions, default the chat's model

peekme knows the conversation from Claude Code's session transcript in ~/.claude/projects. It finds the right session from the process id Claude registers there.

peekme and /btw

Claude Code's own /btw answers a typed side question in an overlay, from the conversation, without adding it to the history. It is good for a question about the work. peekme is for the words in front of you: you select them instead of typing them, the answer opens right under them, a box can open inside a box, and the answer stays on the screen as an underline. Use both. A closer comparison

What gets peekme

claude, claude "prompt", claude --resume and claude -c open with peekme. claude -p and anything with output going to a pipe or a file run Claude directly. command claude starts plain Claude Code once.

Tested with Claude Code 2.1.292 on Linux, also inside tmux and over SSH.

peekme also works in Codex CLI, GitHub Copilot CLI, Kiro CLI, with the same keys.