peekme 0.4.1 → 0.4.3

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 CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.3 (2026-10-09)
4
+
5
+ - Questions inside boxes. Select words in a box and press Alt+Shift+P (Option+Shift+P on a Mac):
6
+ a box inside opens for your question, and the answer knows the boxes around it. With boxes
7
+ open and nothing selected, Alt+Shift+P asks about the words of the innermost box.
8
+ - Fixed: after a peek inside a box, a new answer for the same text (Alt+P again, or a question)
9
+ showed the old dotted lines on the new text until it finished.
10
+ - Fixed: a question typed fast and sent with Enter in the same keystroke batch was not sent.
11
+ - Fixed: a saved answer to a question, opened again, had its dotted lines in the wrong place.
12
+
13
+ ## 0.4.2 (2026-10-09)
14
+
15
+ - Ask a question about the selection: Alt+Shift+P (Option+Shift+P on a Mac) opens the box empty,
16
+ you type the question and press Enter. The answer comes from the model your chat runs on, with
17
+ the whole conversation. Set `PEEKME_CLAUDE_ASK_MODEL`, `PEEKME_CODEX_ASK_MODEL`,
18
+ `PEEKME_COPILOT_ASK_MODEL` or `PEEKME_KIRO_ASK_MODEL` for another model. With a box open,
19
+ Alt+Shift+P asks about the text that box explains.
20
+ - Kiro CLI support. `peekme install` now also sets up `kiro-cli`, and a setup from an older
21
+ peekme gets it the next time peekme starts. Everything works as in the other agents: select
22
+ text, press Alt+P (Option+P on a Mac), peek inside a peek, click underlined text for the saved
23
+ answer, also inside tmux and over SSH.
24
+ - Kiro starts inline and leaves the mouse to the terminal. After `/fullscreen` Kiro makes the
25
+ selection itself and peekme reads it, also over SSH. Underlined text can be clicked only there.
26
+ - Explanations go through `kiro-cli acp` with your Kiro login, on `claude-haiku-4.5` without
27
+ tools. About 0.01 Kiro credits each. The sessions are deleted afterwards, so they don't show up
28
+ in Kiro's session list. Set `PEEKME_KIRO_MODEL` for another model.
29
+ - The model knows the Kiro conversation, read from `~/.kiro/sessions/cli`.
30
+
3
31
  ## 0.4.1 (2026-10-07)
4
32
 
5
33
  - Mac: after `peekme install`, `claude` could stop with `error: unknown option
package/README.md CHANGED
@@ -1,8 +1,8 @@
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) or
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
 
@@ -11,7 +11,7 @@ room, like Peek in VS Code. Esc closes it and the screen is exactly as before.
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.1. Tested with Claude Code 2.1.292, Codex 0.161 and Copilot CLI 1.0.93 on Linux, also
14
+ Status: 0.4.3. 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
- and GitHub Copilot CLI work today, and more agents are planned. If one agent gets its own way to
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 `copilot` open with peekme, and you type them as
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 Copilot CLI as always. Select text with the mouse as you normally
56
- do, then press Alt+P. When the agent draws full screen (Claude Code with `"tui": "fullscreen"`,
57
- Codex since 0.157, Copilot CLI), it makes the selection itself, and peekme uses that selection.
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,33 @@ 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. Inside a box, select
87
+ words and press Alt+Shift+P to ask about them: the question opens in a box inside, and the model
88
+ also gets the answers around it. The answer is saved with the question, and a click on the
89
+ underline shows both.
90
+
75
91
  ### On a Mac
76
92
 
77
93
  Option+P works as it is, with no terminal setting, also over SSH and inside tmux. A Mac
78
94
  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. If
95
+ the shortcut. When nothing is selected, `π` is typed as usual, so you never lose the letter.
96
+ Option+Shift+P types `∏` and works the same way for questions. If
80
97
  you type Greek, `π` stays a letter. If your terminal sends Option as Meta, Option+P works too.
81
98
 
82
99
  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 selection there by itself, in
84
- Terminal press Cmd+C after you select. Over SSH only the agent's own selection can be read, so
85
- use the full screen mode there (Claude Code with `"tui": "fullscreen"`, Codex and Copilot CLI
86
- by default).
100
+ Code's classic screen, Kiro CLI before `/fullscreen`) it reads the clipboard: iTerm2 copies a
101
+ selection there by itself, in Terminal press Cmd+C after you select. Over SSH only the agent's
102
+ own selection can be read, so use the full screen mode there (Claude Code with
103
+ `"tui": "fullscreen"`, `/fullscreen` in Kiro CLI, Codex and Copilot CLI by default).
87
104
 
88
105
  Inside tmux, Codex leaves the mouse to the terminal when tmux has the mouse off, which is tmux's
89
106
  default. A selection is then your terminal's own, and over SSH peekme cannot read it. Add
@@ -110,13 +127,20 @@ No API key is needed. peekme asks the agent's own CLI, with your existing login:
110
127
  on the first explanation. Each explanation is a short session without tools, and peekme
111
128
  deletes it afterwards, so nothing appears in your session list. The model is Copilot's Auto
112
129
  unless you set one. It uses a little of your AI credits for each explanation.
130
+ - Kiro CLI: its ACP server (`kiro-cli acp`, the one Kiro's own screen and editors use), started
131
+ on the first explanation. It runs with a peekme agent that has no tools. Each explanation is
132
+ a short session, and peekme deletes it afterwards, so nothing appears in your session list.
133
+ The model is `claude-haiku-4.5` unless you set one (Auto if your plan doesn't have it). One
134
+ explanation costs about 0.01 Kiro credits.
113
135
 
114
136
  It does use your plan, a little for each explanation. Nothing starts before the first Alt+P.
115
137
 
116
138
  Only the interactive screen gets peekme: `claude`, `claude "prompt"`, `claude --resume`,
117
- `claude -c`, `codex`, `codex "prompt"`, `codex resume`, `codex fork`, and `copilot`,
118
- `copilot -i "prompt"`, `copilot --resume`. Commands like `claude -p`, `codex exec`, `copilot -p`
119
- or `copilot login`, and anything with output going to a pipe or a file, run the agent directly.
139
+ `claude -c`, `codex`, `codex "prompt"`, `codex resume`, `codex fork`, `copilot`,
140
+ `copilot -i "prompt"`, `copilot --resume`, and `kiro-cli`, `kiro-cli chat`, `kiro-cli --resume`.
141
+ Commands like `claude -p`, `codex exec`, `copilot -p`, `copilot login`,
142
+ `kiro-cli chat --no-interactive` or `kiro-cli acp`, and anything with output going to a pipe or
143
+ a file, run the agent directly.
120
144
 
121
145
  ## How it works
122
146
 
@@ -130,7 +154,7 @@ On Alt+P it takes the selection and finds it on the screen:
130
154
  release the mouse. peekme reads the text from that sequence as it passes through, and knows
131
155
  where the drag ended. This also works over SSH.
132
156
  - Codex full screen: the text Codex highlighted.
133
- - Copilot CLI: the same OSC 52 sequence as Claude Code.
157
+ - Copilot CLI, and Kiro CLI after `/fullscreen`: the same OSC 52 sequence as Claude Code.
134
158
  - Otherwise: your terminal's mouse selection (the X11 PRIMARY selection).
135
159
 
136
160
  Then it redraws only the rows next to the selection, with the box between them. Nothing is
@@ -140,7 +164,7 @@ that arrives while the box is open is kept aside.
140
164
 
141
165
  On Esc it draws those rows again from a copy taken when the box opened. After that it sends the
142
166
  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 Copilot CLI output.
167
+ this cell by cell on real Claude Code, Codex, Copilot CLI and Kiro CLI output.
144
168
 
145
169
  ### What the model gets
146
170
 
@@ -157,8 +181,9 @@ slow. So the model gets small parts, each with a size limit:
157
181
  4. The first places in the conversation where the same words were used before.
158
182
 
159
183
  The conversation comes from Claude Code's session transcript in `~/.claude/projects`, from
160
- Codex's app-server, or from Copilot CLI's session log in `~/.copilot/session-state`. peekme
161
- knows which session, because the agent registers its process id there.
184
+ Codex's app-server, from Copilot CLI's session log in `~/.copilot/session-state`, or from Kiro
185
+ CLI's session log in `~/.kiro/sessions/cli`. peekme knows which session, because the agent
186
+ registers its process id there.
162
187
 
163
188
  Usually this is 1 to 7 KB of text. When it is not enough, press Alt+P again and the model gets
164
189
  the whole conversation. A long chat can be 5 to 30 times bigger than a normal explanation, so
@@ -176,22 +201,28 @@ more.
176
201
  | `PEEKME_OWN_SERVER` | set to 1 to start peekme's own `codex app-server` instead of using the shared one |
177
202
  | `PEEKME_COPILOT_MODEL` | model for Copilot CLI explanations. Default is Copilot's Auto |
178
203
  | `PEEKME_COPILOT_BIN` | copilot binary to use for explanations. Default is `copilot` |
204
+ | `PEEKME_KIRO_MODEL` | model for Kiro CLI explanations. Default is `claude-haiku-4.5` |
205
+ | `PEEKME_KIRO_BIN` | kiro-cli binary to use for explanations. Default is `kiro-cli` |
206
+ | `PEEKME_CLAUDE_ASK_MODEL` | model for typed questions in Claude Code. Default is the chat's model |
207
+ | `PEEKME_CODEX_ASK_MODEL` | model for typed questions in Codex. Default is the thread's model |
208
+ | `PEEKME_COPILOT_ASK_MODEL` | model for typed questions in Copilot CLI. Default is the chat's model |
209
+ | `PEEKME_KIRO_ASK_MODEL` | model for typed questions in Kiro CLI. Default is the chat's model |
179
210
  | `PEEKME_SELECTION` | use this text instead of the mouse selection, for testing |
180
211
 
181
- ### How `claude`, `codex` and `copilot` get peekme
212
+ ### How `claude`, `codex`, `copilot` and `kiro-cli` get peekme
182
213
 
183
214
  ```
184
215
  peekme doctor # check the setup, and see what is in the way if something is
185
216
  peekme uninstall # remove it, your files are as before
186
- command claude # run plain Claude Code once (same for codex, copilot)
217
+ command claude # run plain Claude Code once (same for codex, copilot, kiro-cli)
187
218
  ```
188
219
 
189
220
  `peekme install` does two things:
190
221
 
191
- 1. It defines shell functions `claude`, `codex` and `copilot` in your shell setup. A function wins over
222
+ 1. It defines shell functions `claude`, `codex`, `copilot` and `kiro-cli` in your shell setup. A function wins over
192
223
  anything on PATH, so it keeps working when nvm, mise, Homebrew or an agent's installer
193
224
  change PATH later. Aliases that call them go through it too.
194
- 2. It puts `claude`, `codex` and `copilot` links to peekme in `~/.local/share/peekme/bin` at the front of
225
+ 2. It puts `claude`, `codex`, `copilot` and `kiro-cli` links to peekme in `~/.local/share/peekme/bin` at the front of
195
226
  PATH, so scripts that run them also get peekme. If some tool puts its own directory in front
196
227
  of it later, only scripts lose peekme, and `peekme doctor` tells you which directory it is.
197
228
 
@@ -199,7 +230,7 @@ Both find the real agent on PATH themselves, so updating the agent changes nothi
199
230
  remove peekme, the functions fall back to the plain agents.
200
231
 
201
232
  The block in `~/.bashrc` or `~/.zshrc` (for fish, a file in `~/.config/fish/conf.d`) is short
202
- and marked. It covers all three agents, so an agent you install later gets peekme too. When a new
233
+ and marked. It covers all four agents, so an agent you install later gets peekme too. When a new
203
234
  peekme version knows more agents, it adds them to your setup the next time it starts and says
204
235
  so once.
205
236
 
@@ -217,6 +248,9 @@ To use peekme with another program, run `peekme -- COMMAND`.
217
248
  selection from the agent. Otherwise peekme needs the terminal's selection, which it reads on
218
249
  Linux with X11 only. On Wayland it works through XWayland, and on macOS it reads the
219
250
  clipboard (see [On a Mac](#on-a-mac)).
251
+ - A click on underlined text works only when the agent takes the mouse (full screen mode). On
252
+ Claude Code's classic screen and Kiro CLI before `/fullscreen` the click goes to your
253
+ terminal.
220
254
  - Claude Code full screen: if `copyOnSelect` is off, Claude does not report the selection. Then
221
255
  only a Shift+drag selection works (read from X11 PRIMARY).
222
256
  - An explanation takes about 1 to 2 seconds to start arriving.
@@ -227,11 +261,12 @@ To use peekme with another program, run `peekme -- COMMAND`.
227
261
  cargo test
228
262
  cargo clippy --all-targets
229
263
  cargo run --example vtdump -- capture.bin 120 40 [offset]
230
- cargo run --example peek_text -- "<screen text>" "<selection>" [--deep] [--claude|--copilot] [--pid PID]
264
+ cargo run --example peek_text -- "<screen text>" "<selection>" [--deep] [--ask QUESTION] [--inside ANSWER WORDS] [--claude|--copilot|--kiro] [--pid PID]
231
265
  python3 spikes/capture.py out.bin 120 40 "<script>" -- peekme claude
232
266
  python3 spikes/flicker_test.py
233
267
  python3 spikes/explain_probe.py
234
268
  python3 spikes/copilot_probe.py info
269
+ python3 spikes/kiro_probe.py [MODEL] [PROMPT]
235
270
  ```
236
271
 
237
272
  `vtdump` replays a captured byte stream and prints the screen. `peek_text` runs one explanation
@@ -239,9 +274,9 @@ without a terminal and prints the exact prompt. `capture.py` runs a command in a
239
274
  sends keys and mouse events from a script and saves everything it prints. `flicker_test.py`
240
275
  shows if your terminal flickers when a program switches screens. `explain_probe.py` makes one
241
276
  explanation request to `codex app-server` and prints timings. `copilot_probe.py` does the same
242
- with Copilot CLI's headless server.
277
+ with Copilot CLI's headless server, `kiro_probe.py` with Kiro CLI's ACP server.
243
278
 
244
- Each agent has its own folder in `src/` (`claude/`, `codex/`, `copilot/`): how its selection is read, where
279
+ Each agent has its own folder in `src/` (`claude/`, `codex/`, `copilot/`, `kiro/`): how its selection is read, where
245
280
  its conversation comes from, and which model explains. The rest is shared.
246
281
 
247
282
  ## License
@@ -19,7 +19,7 @@
19
19
  "hasInstallScript": true,
20
20
  "license": "MIT OR Apache-2.0",
21
21
  "name": "peekme",
22
- "version": "0.4.1"
22
+ "version": "0.4.3"
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.1"
51
+ "version": "0.4.3"
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.1"
3
+ "https://github.com/GregoryBolshakov/peekme/releases/download/v0.4.3"
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 or GitHub Copilot CLI output and get a short explanation right under it, inside the terminal",
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
- "terminal",
32
- "tui"
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.1",
73
+ "version": "0.4.3",
74
74
  "volta": {
75
75
  "node": "18.14.1",
76
76
  "npm": "9.5.0"