peekme 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +64 -33
- package/npm-shrinkwrap.json +2 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.2 (2026-10-09)
|
|
4
|
+
|
|
5
|
+
- Ask a question about the selection: Alt+Shift+P (Option+Shift+P on a Mac) opens the box empty,
|
|
6
|
+
you type the question and press Enter. The answer comes from the model your chat runs on, with
|
|
7
|
+
the whole conversation. Set `PEEKME_CLAUDE_ASK_MODEL`, `PEEKME_CODEX_ASK_MODEL`,
|
|
8
|
+
`PEEKME_COPILOT_ASK_MODEL` or `PEEKME_KIRO_ASK_MODEL` for another model. With a box open,
|
|
9
|
+
Alt+Shift+P asks about the text that box explains.
|
|
10
|
+
- Kiro CLI support. `peekme install` now also sets up `kiro-cli`, and a setup from an older
|
|
11
|
+
peekme gets it the next time peekme starts. Everything works as in the other agents: select
|
|
12
|
+
text, press Alt+P (Option+P on a Mac), peek inside a peek, click underlined text for the saved
|
|
13
|
+
answer, also inside tmux and over SSH.
|
|
14
|
+
- Kiro starts inline and leaves the mouse to the terminal. After `/fullscreen` Kiro makes the
|
|
15
|
+
selection itself and peekme reads it, also over SSH. Underlined text can be clicked only there.
|
|
16
|
+
- Explanations go through `kiro-cli acp` with your Kiro login, on `claude-haiku-4.5` without
|
|
17
|
+
tools. About 0.01 Kiro credits each. The sessions are deleted afterwards, so they don't show up
|
|
18
|
+
in Kiro's session list. Set `PEEKME_KIRO_MODEL` for another model.
|
|
19
|
+
- The model knows the Kiro conversation, read from `~/.kiro/sessions/cli`.
|
|
20
|
+
|
|
21
|
+
## 0.4.1 (2026-10-07)
|
|
22
|
+
|
|
23
|
+
- Mac: after `peekme install`, `claude` could stop with `error: unknown option
|
|
24
|
+
'--internal-jobctl-helper'` and Claude Code never opened. `codex` and `copilot` had the same
|
|
25
|
+
problem. On macOS peekme's helper process started under the name of the agent link, and
|
|
26
|
+
peekme passed its own flag on to the agent. Now the helper is found first. The same happened
|
|
27
|
+
on any system where `claude` was a copy of peekme instead of a link.
|
|
28
|
+
- Tests no longer depend on running inside tmux or over SSH.
|
|
29
|
+
|
|
3
30
|
## 0.4.0 (2026-10-06)
|
|
4
31
|
|
|
5
32
|
Everything from the 0.4.0 betas below, now in the normal install (`npm i -g peekme`, Homebrew,
|
package/README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# peekme
|
|
2
2
|
|
|
3
3
|
Pick me. Select text in [Claude Code](https://github.com/anthropics/claude-code),
|
|
4
|
-
[Codex CLI](https://github.com/openai/codex)
|
|
5
|
-
[GitHub Copilot CLI](https://github.com/github/copilot-cli) output, press **Alt+P** (**Option+P** on a Mac), and a short
|
|
4
|
+
[Codex CLI](https://github.com/openai/codex),
|
|
5
|
+
[GitHub Copilot CLI](https://github.com/github/copilot-cli) or [Kiro CLI](https://kiro.dev/cli/) output, press **Alt+P** (**Option+P** on a Mac), and a short
|
|
6
6
|
explanation opens right next to that text, inside the terminal. The other lines move to make
|
|
7
7
|
room, like Peek in VS Code. Esc closes it and the screen is exactly as before.
|
|
8
8
|
|
|
9
|
-

|
|
10
10
|
|
|
11
11
|
The explanation comes from a small, fast model and it knows the conversation. If you select
|
|
12
12
|
"its split panes" in an answer that recommends Kitty, it tells you it is about Kitty.
|
|
13
13
|
|
|
14
|
-
Status: 0.4.
|
|
14
|
+
Status: 0.4.2. Tested with Claude Code 2.1.292, Codex 0.161, Copilot CLI 1.0.93 and Kiro CLI 2.28 on Linux, also
|
|
15
15
|
inside tmux and over SSH. On macOS it is tested in Terminal and iTerm2 with a stand-in agent, and
|
|
16
16
|
in Terminal with the real Codex, also inside tmux and over SSH.
|
|
17
17
|
|
|
@@ -19,8 +19,8 @@ in Terminal with the real Codex, also inside tmux and over SSH.
|
|
|
19
19
|
|
|
20
20
|
Many developers have more than one agent CLI and switch between them during the day. peekme
|
|
21
21
|
works the same way in each of them. You install it once, and the key and the box are the same
|
|
22
|
-
everywhere. Claude Code, Codex CLI
|
|
23
|
-
|
|
22
|
+
everywhere. Claude Code, Codex CLI,
|
|
23
|
+
GitHub Copilot CLI and Kiro CLI work today, and more agents are planned. If one agent gets its own way to
|
|
24
24
|
explain a selection some day, it will work in that agent only. peekme keeps working in all of
|
|
25
25
|
them.
|
|
26
26
|
|
|
@@ -39,8 +39,8 @@ npm i -g peekme
|
|
|
39
39
|
peekme install
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
Open a new terminal. Now `claude`, `codex` and `
|
|
43
|
-
always. That's all.
|
|
42
|
+
Open a new terminal. Now `claude`, `codex`, `copilot` and `kiro-cli` open with peekme, and you
|
|
43
|
+
type them as always. That's all.
|
|
44
44
|
|
|
45
45
|
peekme has no account of its own. The explanation uses the login of the agent you are in.
|
|
46
46
|
|
|
@@ -52,9 +52,10 @@ Don't have npm? Use one of these instead of the first line:
|
|
|
52
52
|
|
|
53
53
|
## Use
|
|
54
54
|
|
|
55
|
-
Start Claude Code, Codex or
|
|
56
|
-
do, then press Alt+P. When the agent draws full screen (Claude Code with
|
|
57
|
-
Codex since 0.157, Copilot CLI
|
|
55
|
+
Start Claude Code, Codex, Copilot CLI or Kiro CLI as always. Select text with the mouse as you
|
|
56
|
+
normally do, then press Alt+P. When the agent draws full screen (Claude Code with
|
|
57
|
+
`"tui": "fullscreen"`, Codex since 0.157, Copilot CLI, Kiro CLI after `/fullscreen`), it makes
|
|
58
|
+
the selection itself, and peekme uses that selection.
|
|
58
59
|
|
|
59
60
|
| Key | When | What it does |
|
|
60
61
|
|---|---|---|
|
|
@@ -65,6 +66,7 @@ Codex since 0.157, Copilot CLI), it makes the selection itself, and peekme uses
|
|
|
65
66
|
| typing | box is open | goes to the agent's input line, the box stays open |
|
|
66
67
|
| Enter | box is open | sends your message and closes the box |
|
|
67
68
|
| Alt+P on text in the box | box is open | opens a new box inside it, under that line |
|
|
69
|
+
| Alt+Shift+P (Mac: Option+Shift+P) | any time | type a question about the selected text first, Enter sends it |
|
|
68
70
|
| click on underlined text | any time | shows the answer from before, with no new request |
|
|
69
71
|
|
|
70
72
|
Text you already asked about gets a dotted underline, so you can see what you peeked before.
|
|
@@ -72,18 +74,31 @@ A click on it opens the saved answer again, a second click closes it. Inside a b
|
|
|
72
74
|
words and press Alt+P again, and go several levels deep while the window is wide enough. The
|
|
73
75
|
wheel scrolls the box under the pointer, Esc closes the innermost box.
|
|
74
76
|
|
|
77
|
+
### Ask a question
|
|
78
|
+
|
|
79
|
+
Sometimes a short explanation is not what you need. Select the text and press Alt+Shift+P
|
|
80
|
+
(Option+Shift+P on a Mac) instead. The box opens empty and you type your question, for example
|
|
81
|
+
"why not use a mutex here?". Enter sends it, Esc cancels. While you type, the keys stay in the
|
|
82
|
+
box and don't go to the agent.
|
|
83
|
+
|
|
84
|
+
The question goes to the model your chat runs on, not the small one, together with the whole
|
|
85
|
+
conversation (Codex gets a copy of the thread). So it takes longer and costs more than a normal
|
|
86
|
+
peek. With a box open, Alt+Shift+P asks about the text that box explains. The answer is saved
|
|
87
|
+
with the question, and a click on the underline shows both.
|
|
88
|
+
|
|
75
89
|
### On a Mac
|
|
76
90
|
|
|
77
91
|
Option+P works as it is, with no terminal setting, also over SSH and inside tmux. A Mac
|
|
78
92
|
terminal sends Option+P as the character `π`. When something is selected, peekme takes `π` as
|
|
79
|
-
the shortcut. When nothing is selected, `π` is typed as usual, so you never lose the letter.
|
|
93
|
+
the shortcut. When nothing is selected, `π` is typed as usual, so you never lose the letter.
|
|
94
|
+
Option+Shift+P types `∏` and works the same way for questions. If
|
|
80
95
|
you type Greek, `π` stays a letter. If your terminal sends Option as Meta, Option+P works too.
|
|
81
96
|
|
|
82
97
|
When the agent draws full screen, peekme gets the selection from the agent. Otherwise (Claude
|
|
83
|
-
Code's classic screen) it reads the clipboard: iTerm2 copies a
|
|
84
|
-
Terminal press Cmd+C after you select. Over SSH only the agent's
|
|
85
|
-
use the full screen mode there (Claude Code with
|
|
86
|
-
by default).
|
|
98
|
+
Code's classic screen, Kiro CLI before `/fullscreen`) it reads the clipboard: iTerm2 copies a
|
|
99
|
+
selection there by itself, in Terminal press Cmd+C after you select. Over SSH only the agent's
|
|
100
|
+
own selection can be read, so use the full screen mode there (Claude Code with
|
|
101
|
+
`"tui": "fullscreen"`, `/fullscreen` in Kiro CLI, Codex and Copilot CLI by default).
|
|
87
102
|
|
|
88
103
|
Inside tmux, Codex leaves the mouse to the terminal when tmux has the mouse off, which is tmux's
|
|
89
104
|
default. A selection is then your terminal's own, and over SSH peekme cannot read it. Add
|
|
@@ -110,13 +125,20 @@ No API key is needed. peekme asks the agent's own CLI, with your existing login:
|
|
|
110
125
|
on the first explanation. Each explanation is a short session without tools, and peekme
|
|
111
126
|
deletes it afterwards, so nothing appears in your session list. The model is Copilot's Auto
|
|
112
127
|
unless you set one. It uses a little of your AI credits for each explanation.
|
|
128
|
+
- Kiro CLI: its ACP server (`kiro-cli acp`, the one Kiro's own screen and editors use), started
|
|
129
|
+
on the first explanation. It runs with a peekme agent that has no tools. Each explanation is
|
|
130
|
+
a short session, and peekme deletes it afterwards, so nothing appears in your session list.
|
|
131
|
+
The model is `claude-haiku-4.5` unless you set one (Auto if your plan doesn't have it). One
|
|
132
|
+
explanation costs about 0.01 Kiro credits.
|
|
113
133
|
|
|
114
134
|
It does use your plan, a little for each explanation. Nothing starts before the first Alt+P.
|
|
115
135
|
|
|
116
136
|
Only the interactive screen gets peekme: `claude`, `claude "prompt"`, `claude --resume`,
|
|
117
|
-
`claude -c`, `codex`, `codex "prompt"`, `codex resume`, `codex fork`,
|
|
118
|
-
`copilot -i "prompt"`, `copilot --resume
|
|
119
|
-
|
|
137
|
+
`claude -c`, `codex`, `codex "prompt"`, `codex resume`, `codex fork`, `copilot`,
|
|
138
|
+
`copilot -i "prompt"`, `copilot --resume`, and `kiro-cli`, `kiro-cli chat`, `kiro-cli --resume`.
|
|
139
|
+
Commands like `claude -p`, `codex exec`, `copilot -p`, `copilot login`,
|
|
140
|
+
`kiro-cli chat --no-interactive` or `kiro-cli acp`, and anything with output going to a pipe or
|
|
141
|
+
a file, run the agent directly.
|
|
120
142
|
|
|
121
143
|
## How it works
|
|
122
144
|
|
|
@@ -130,7 +152,7 @@ On Alt+P it takes the selection and finds it on the screen:
|
|
|
130
152
|
release the mouse. peekme reads the text from that sequence as it passes through, and knows
|
|
131
153
|
where the drag ended. This also works over SSH.
|
|
132
154
|
- Codex full screen: the text Codex highlighted.
|
|
133
|
-
- Copilot CLI
|
|
155
|
+
- Copilot CLI, and Kiro CLI after `/fullscreen`: the same OSC 52 sequence as Claude Code.
|
|
134
156
|
- Otherwise: your terminal's mouse selection (the X11 PRIMARY selection).
|
|
135
157
|
|
|
136
158
|
Then it redraws only the rows next to the selection, with the box between them. Nothing is
|
|
@@ -140,7 +162,7 @@ that arrives while the box is open is kept aside.
|
|
|
140
162
|
|
|
141
163
|
On Esc it draws those rows again from a copy taken when the box opened. After that it sends the
|
|
142
164
|
kept output, so the terminal ends in the same state as if the box never existed. Tests check
|
|
143
|
-
this cell by cell on real Claude Code, Codex and
|
|
165
|
+
this cell by cell on real Claude Code, Codex, Copilot CLI and Kiro CLI output.
|
|
144
166
|
|
|
145
167
|
### What the model gets
|
|
146
168
|
|
|
@@ -157,8 +179,9 @@ slow. So the model gets small parts, each with a size limit:
|
|
|
157
179
|
4. The first places in the conversation where the same words were used before.
|
|
158
180
|
|
|
159
181
|
The conversation comes from Claude Code's session transcript in `~/.claude/projects`, from
|
|
160
|
-
Codex's app-server,
|
|
161
|
-
knows which session, because the agent
|
|
182
|
+
Codex's app-server, from Copilot CLI's session log in `~/.copilot/session-state`, or from Kiro
|
|
183
|
+
CLI's session log in `~/.kiro/sessions/cli`. peekme knows which session, because the agent
|
|
184
|
+
registers its process id there.
|
|
162
185
|
|
|
163
186
|
Usually this is 1 to 7 KB of text. When it is not enough, press Alt+P again and the model gets
|
|
164
187
|
the whole conversation. A long chat can be 5 to 30 times bigger than a normal explanation, so
|
|
@@ -176,22 +199,28 @@ more.
|
|
|
176
199
|
| `PEEKME_OWN_SERVER` | set to 1 to start peekme's own `codex app-server` instead of using the shared one |
|
|
177
200
|
| `PEEKME_COPILOT_MODEL` | model for Copilot CLI explanations. Default is Copilot's Auto |
|
|
178
201
|
| `PEEKME_COPILOT_BIN` | copilot binary to use for explanations. Default is `copilot` |
|
|
202
|
+
| `PEEKME_KIRO_MODEL` | model for Kiro CLI explanations. Default is `claude-haiku-4.5` |
|
|
203
|
+
| `PEEKME_KIRO_BIN` | kiro-cli binary to use for explanations. Default is `kiro-cli` |
|
|
204
|
+
| `PEEKME_CLAUDE_ASK_MODEL` | model for typed questions in Claude Code. Default is the chat's model |
|
|
205
|
+
| `PEEKME_CODEX_ASK_MODEL` | model for typed questions in Codex. Default is the thread's model |
|
|
206
|
+
| `PEEKME_COPILOT_ASK_MODEL` | model for typed questions in Copilot CLI. Default is the chat's model |
|
|
207
|
+
| `PEEKME_KIRO_ASK_MODEL` | model for typed questions in Kiro CLI. Default is the chat's model |
|
|
179
208
|
| `PEEKME_SELECTION` | use this text instead of the mouse selection, for testing |
|
|
180
209
|
|
|
181
|
-
### How `claude`, `codex` and `
|
|
210
|
+
### How `claude`, `codex`, `copilot` and `kiro-cli` get peekme
|
|
182
211
|
|
|
183
212
|
```
|
|
184
213
|
peekme doctor # check the setup, and see what is in the way if something is
|
|
185
214
|
peekme uninstall # remove it, your files are as before
|
|
186
|
-
command claude # run plain Claude Code once (same for codex, copilot)
|
|
215
|
+
command claude # run plain Claude Code once (same for codex, copilot, kiro-cli)
|
|
187
216
|
```
|
|
188
217
|
|
|
189
218
|
`peekme install` does two things:
|
|
190
219
|
|
|
191
|
-
1. It defines shell functions `claude`, `codex` and `
|
|
220
|
+
1. It defines shell functions `claude`, `codex`, `copilot` and `kiro-cli` in your shell setup. A function wins over
|
|
192
221
|
anything on PATH, so it keeps working when nvm, mise, Homebrew or an agent's installer
|
|
193
222
|
change PATH later. Aliases that call them go through it too.
|
|
194
|
-
2. It puts `claude`, `codex` and `
|
|
223
|
+
2. It puts `claude`, `codex`, `copilot` and `kiro-cli` links to peekme in `~/.local/share/peekme/bin` at the front of
|
|
195
224
|
PATH, so scripts that run them also get peekme. If some tool puts its own directory in front
|
|
196
225
|
of it later, only scripts lose peekme, and `peekme doctor` tells you which directory it is.
|
|
197
226
|
|
|
@@ -199,7 +228,7 @@ Both find the real agent on PATH themselves, so updating the agent changes nothi
|
|
|
199
228
|
remove peekme, the functions fall back to the plain agents.
|
|
200
229
|
|
|
201
230
|
The block in `~/.bashrc` or `~/.zshrc` (for fish, a file in `~/.config/fish/conf.d`) is short
|
|
202
|
-
and marked. It covers all
|
|
231
|
+
and marked. It covers all four agents, so an agent you install later gets peekme too. When a new
|
|
203
232
|
peekme version knows more agents, it adds them to your setup the next time it starts and says
|
|
204
233
|
so once.
|
|
205
234
|
|
|
@@ -217,11 +246,12 @@ To use peekme with another program, run `peekme -- COMMAND`.
|
|
|
217
246
|
selection from the agent. Otherwise peekme needs the terminal's selection, which it reads on
|
|
218
247
|
Linux with X11 only. On Wayland it works through XWayland, and on macOS it reads the
|
|
219
248
|
clipboard (see [On a Mac](#on-a-mac)).
|
|
249
|
+
- A click on underlined text works only when the agent takes the mouse (full screen mode). On
|
|
250
|
+
Claude Code's classic screen and Kiro CLI before `/fullscreen` the click goes to your
|
|
251
|
+
terminal.
|
|
220
252
|
- Claude Code full screen: if `copyOnSelect` is off, Claude does not report the selection. Then
|
|
221
253
|
only a Shift+drag selection works (read from X11 PRIMARY).
|
|
222
254
|
- An explanation takes about 1 to 2 seconds to start arriving.
|
|
223
|
-
- `peekme install` is tested with bash. zsh uses the same block and should work the same way,
|
|
224
|
-
but it is not tested yet. The fish setup is not tested either.
|
|
225
255
|
|
|
226
256
|
## Development
|
|
227
257
|
|
|
@@ -229,11 +259,12 @@ To use peekme with another program, run `peekme -- COMMAND`.
|
|
|
229
259
|
cargo test
|
|
230
260
|
cargo clippy --all-targets
|
|
231
261
|
cargo run --example vtdump -- capture.bin 120 40 [offset]
|
|
232
|
-
cargo run --example peek_text -- "<screen text>" "<selection>" [--deep] [--claude|--copilot] [--pid PID]
|
|
262
|
+
cargo run --example peek_text -- "<screen text>" "<selection>" [--deep] [--ask QUESTION] [--claude|--copilot|--kiro] [--pid PID]
|
|
233
263
|
python3 spikes/capture.py out.bin 120 40 "<script>" -- peekme claude
|
|
234
264
|
python3 spikes/flicker_test.py
|
|
235
265
|
python3 spikes/explain_probe.py
|
|
236
266
|
python3 spikes/copilot_probe.py info
|
|
267
|
+
python3 spikes/kiro_probe.py [MODEL] [PROMPT]
|
|
237
268
|
```
|
|
238
269
|
|
|
239
270
|
`vtdump` replays a captured byte stream and prints the screen. `peek_text` runs one explanation
|
|
@@ -241,9 +272,9 @@ without a terminal and prints the exact prompt. `capture.py` runs a command in a
|
|
|
241
272
|
sends keys and mouse events from a script and saves everything it prints. `flicker_test.py`
|
|
242
273
|
shows if your terminal flickers when a program switches screens. `explain_probe.py` makes one
|
|
243
274
|
explanation request to `codex app-server` and prints timings. `copilot_probe.py` does the same
|
|
244
|
-
with Copilot CLI's headless server.
|
|
275
|
+
with Copilot CLI's headless server, `kiro_probe.py` with Kiro CLI's ACP server.
|
|
245
276
|
|
|
246
|
-
Each agent has its own folder in `src/` (`claude/`, `codex/`, `copilot/`): how its selection is read, where
|
|
277
|
+
Each agent has its own folder in `src/` (`claude/`, `codex/`, `copilot/`, `kiro/`): how its selection is read, where
|
|
247
278
|
its conversation comes from, and which model explains. The rest is shared.
|
|
248
279
|
|
|
249
280
|
## License
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"hasInstallScript": true,
|
|
20
20
|
"license": "MIT OR Apache-2.0",
|
|
21
21
|
"name": "peekme",
|
|
22
|
-
"version": "0.4.
|
|
22
|
+
"version": "0.4.2"
|
|
23
23
|
},
|
|
24
24
|
"node_modules/detect-libc": {
|
|
25
25
|
"engines": {
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"requires": true,
|
|
51
|
-
"version": "0.4.
|
|
51
|
+
"version": "0.4.2"
|
|
52
52
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"artifactDownloadUrls": [
|
|
3
|
-
"https://github.com/GregoryBolshakov/peekme/releases/download/v0.4.
|
|
3
|
+
"https://github.com/GregoryBolshakov/peekme/releases/download/v0.4.2"
|
|
4
4
|
],
|
|
5
5
|
"author": "Gregory Bolshakov",
|
|
6
6
|
"bin": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"detect-libc": "^2.1.2"
|
|
11
11
|
},
|
|
12
|
-
"description": "Select text in Claude Code, Codex CLI
|
|
12
|
+
"description": "Select text in Claude Code, Codex CLI, GitHub Copilot CLI or Kiro CLI output and get a short explanation right under it, inside the terminal",
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"prettier": "^3.8.3"
|
|
15
15
|
},
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"claude-code",
|
|
29
29
|
"codex",
|
|
30
30
|
"copilot",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
31
|
+
"kiro",
|
|
32
|
+
"terminal"
|
|
33
33
|
],
|
|
34
34
|
"license": "MIT OR Apache-2.0",
|
|
35
35
|
"name": "peekme",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"zipExt": ".tar.xz"
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
|
-
"version": "0.4.
|
|
73
|
+
"version": "0.4.2",
|
|
74
74
|
"volta": {
|
|
75
75
|
"node": "18.14.1",
|
|
76
76
|
"npm": "9.5.0"
|