peekme 0.2.2 → 0.3.0

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,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0 (2026-09-28)
4
+
5
+ - peekme works with GitHub Copilot CLI too. Type `copilot` as always, select text, press Alt+P.
6
+ Run `peekme install` once more so that `copilot` gets peekme.
7
+ - Copilot explanations come from Copilot CLI's own headless server with your Copilot login.
8
+ Each one is a short session without tools, and peekme deletes it afterwards, so it does not
9
+ show in your session list. The context comes from the running session's log.
10
+ - peekme reads Copilot's selection from the OSC 52 copy it sends when you release the mouse,
11
+ also over SSH and in tmux. Copilot's input line stays live under the box.
12
+
13
+ ## 0.2.3 (2026-09-28)
14
+
15
+ - Option+P works on a Mac also over SSH and inside tmux. 0.2.2 found out from the environment
16
+ that the keyboard is a Mac's, and over SSH or in tmux it could not. Now `π` explains whenever
17
+ something is selected, and is typed as usual when nothing is.
18
+ - Alt+P arrives correctly when tmux sends keys in its extended format (`extended-keys`).
19
+ - Selecting only empty space no longer opens a box.
20
+
3
21
  ## 0.2.2 (2026-09-28)
4
22
 
5
23
  - Option+P works on a Mac as it is. Mac terminals send Option+P as `π`, and peekme now takes
package/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # peekme
2
2
 
3
- Peek me. Pick me. Select text in [Codex CLI](https://github.com/openai/codex) or
4
- [Claude Code](https://github.com/anthropics/claude-code) output, press **Alt+P** (**Option+P** on a Mac), and a short
3
+ Peek me. Pick me. Select text in [Codex CLI](https://github.com/openai/codex),
4
+ [Claude Code](https://github.com/anthropics/claude-code) or
5
+ [GitHub Copilot CLI](https://github.com/github/copilot-cli) output, press **Alt+P** (**Option+P** on a Mac), and a short
5
6
  explanation opens right next to that text, inside the terminal. The other lines move to make
6
7
  room, like Peek in VS Code. Esc closes it and the screen is exactly as before.
7
8
 
@@ -10,11 +11,12 @@ room, like Peek in VS Code. Esc closes it and the screen is exactly as before.
10
11
  The explanation comes from a small, fast model and it knows the conversation. If you select
11
12
  "its split panes" in an answer that recommends Kitty, it tells you it is about Kitty.
12
13
 
13
- Status: 0.2.2. Tested on Linux with X11 and bash, with Codex 0.157 and Claude Code 2.1.283.
14
+ Status: 0.3.0. Tested on Linux with X11 and bash, with Codex 0.157, Claude Code 2.1.283 and
15
+ Copilot CLI 1.0.89.
14
16
 
15
17
  ## Install
16
18
 
17
- You need Codex CLI or Claude Code (logged in). Both is fine too. Then install peekme in one of
19
+ You need Codex CLI, Claude Code or GitHub Copilot CLI (logged in). More than one is fine too. Then install peekme in one of
18
20
  these ways and run `peekme install`:
19
21
 
20
22
  ```
@@ -37,8 +39,8 @@ curl --proto '=https' --tlsv1.2 -LsSf https://github.com/GregoryBolshakov/peekme
37
39
 
38
40
  Ready binaries are there too, for Linux and macOS on x86_64 and ARM. macOS is not tested yet.
39
41
 
40
- After this, `codex` and `claude` open with peekme in every new terminal. You keep typing
41
- `codex` or `claude`, and your aliases and scripts that call them keep working. `peekme install`
42
+ After this, `codex`, `claude` and `copilot` open with peekme in every new terminal. You keep
43
+ typing them as always, and your aliases and scripts that call them keep working. `peekme install`
42
44
  adds a short, marked block to your `~/.bashrc` or `~/.zshrc` (for fish, a file in
43
45
  `~/.config/fish/conf.d`). If you install one of the agents later, it gets peekme too.
44
46
 
@@ -47,17 +49,19 @@ peekme doctor # check the setup, and see what is in the way if something is
47
49
  peekme uninstall # remove the block, your files are as before
48
50
  command codex # run plain Codex once
49
51
  command claude # run plain Claude Code once
52
+ command copilot # run plain Copilot CLI once
50
53
  ```
51
54
 
52
55
  The first time you run `peekme` on its own, it asks if it should do `peekme install` for you.
53
56
 
54
- Upgrading from 0.1: run `peekme install` once more, so that `claude` gets peekme too.
57
+ Upgrading from an older peekme: run `peekme install` once more, so that `claude` and `copilot`
58
+ get peekme too.
55
59
 
56
60
  ## Use
57
61
 
58
- Start Codex or Claude Code as always. Select text with the mouse as you normally do, then press
59
- Alt+P. When the agent draws full screen (Codex since 0.157, Claude Code with
60
- `"tui": "fullscreen"`), it makes the selection itself, and peekme uses that selection.
62
+ Start Codex, Claude Code or Copilot CLI as always. Select text with the mouse as you normally
63
+ do, then press Alt+P. When the agent draws full screen (Codex since 0.157, Copilot CLI, Claude
64
+ Code with `"tui": "fullscreen"`), it makes the selection itself, and peekme uses that selection.
61
65
 
62
66
  | Key | When | What it does |
63
67
  |---|---|---|
@@ -70,14 +74,16 @@ Alt+P. When the agent draws full screen (Codex since 0.157, Claude Code with
70
74
 
71
75
  ### On a Mac
72
76
 
73
- Option+P works as it is, with no terminal setting. A Mac terminal sends Option+P as the
74
- character `π`, and peekme takes that as the shortcut, the same way Claude Code does. So while
75
- peekme runs, Option+P does not type `π`. Pasting `π` still works. If your terminal is set to use
76
- Option as Meta, Option+P works too.
77
+ Option+P works as it is, with no terminal setting, also over SSH and inside tmux. A Mac
78
+ 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
80
+ you type Greek, `π` stays a letter. If your terminal sends Option as Meta, Option+P works too.
77
81
 
78
82
  When the agent draws full screen, peekme gets the selection from the agent. Otherwise (Claude
79
83
  Code's classic screen) it reads the clipboard: iTerm2 copies a selection there by itself, in
80
- Terminal press Cmd+C after you select.
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 (Codex and Copilot CLI use it by default, Claude Code with
86
+ `"tui": "fullscreen"`).
81
87
 
82
88
  In Claude Code, Alt+P opens the model picker. With peekme it explains the selection instead.
83
89
  `/model` still opens the model picker.
@@ -90,13 +96,17 @@ No API key is needed. peekme asks the agent's own CLI, with your existing login:
90
96
  - Claude Code: `claude -p` on Haiku, without tools and without saving the session, so nothing
91
97
  appears in `/resume`. After the first explanation one `claude -p` waits in the background for
92
98
  the next one, so it starts in about half a second. It takes about 210 MB.
99
+ - Copilot CLI: its headless server (`copilot --headless`, the one the Copilot SDK uses), started
100
+ on the first explanation. Each explanation is a short session without tools, and peekme
101
+ deletes it afterwards, so nothing appears in your session list. The model is Copilot's Auto
102
+ unless you set one. It uses a little of your AI credits for each explanation.
93
103
 
94
104
  It does use your plan, a little for each explanation. Nothing starts before the first Alt+P.
95
105
 
96
106
  Only the interactive screen gets peekme: `codex`, `codex "prompt"`, `codex resume`,
97
- `codex fork`, and `claude`, `claude "prompt"`, `claude --resume`, `claude -c`. Commands like
98
- `codex exec`, `codex mcp`, `claude -p` or `claude mcp`, and anything with output going to a pipe
99
- or a file, run the agent directly.
107
+ `codex fork`, `claude`, `claude "prompt"`, `claude --resume`, `claude -c`, and `copilot`,
108
+ `copilot -i "prompt"`, `copilot --resume`. Commands like `codex exec`, `claude -p`, `copilot -p`
109
+ or `copilot login`, and anything with output going to a pipe or a file, run the agent directly.
100
110
 
101
111
  ## How it works
102
112
 
@@ -107,8 +117,8 @@ what is on your screen.
107
117
  On Alt+P it takes the selection and finds it on the screen:
108
118
 
109
119
  - Codex full screen: the text Codex highlighted.
110
- - Claude Code full screen: Claude copies the selection with an OSC 52 escape sequence when you
111
- release the mouse. peekme reads the text from that sequence as it passes through, and knows
120
+ - Claude Code and Copilot CLI full screen: the agent copies the selection with an OSC 52 escape
121
+ sequence when you release the mouse. peekme reads the text from that sequence as it passes through, and knows
112
122
  where the drag ended. This also works over SSH.
113
123
  - Otherwise: your terminal's mouse selection (the X11 PRIMARY selection).
114
124
 
@@ -119,7 +129,7 @@ that arrives while the box is open is kept aside.
119
129
 
120
130
  On Esc it draws those rows again from a copy taken when the box opened. After that it sends the
121
131
  kept output, so the terminal ends in the same state as if the box never existed. Tests check
122
- this cell by cell on real Codex and Claude Code output.
132
+ this cell by cell on real Codex, Claude Code and Copilot CLI output.
123
133
 
124
134
  ### What the model gets
125
135
 
@@ -135,8 +145,9 @@ slow. So the model gets small parts, each with a size limit:
135
145
  3. Your request that this text answers, and one line for each of your earlier requests.
136
146
  4. The first places in the conversation where the same words were used before.
137
147
 
138
- The conversation comes from Codex's app-server, or from Claude Code's session transcript in
139
- `~/.claude/projects` (peekme knows which one, because Claude registers its process id).
148
+ The conversation comes from Codex's app-server, from Claude Code's session transcript in
149
+ `~/.claude/projects`, or from Copilot CLI's session log in `~/.copilot/session-state`. peekme
150
+ knows which session, because the agent registers its process id there.
140
151
 
141
152
  Usually this is 1 to 7 KB of text. When it is not enough, press Alt+P again and the model gets
142
153
  the whole conversation. A long chat can be 5 to 30 times bigger than a normal explanation, so
@@ -152,21 +163,23 @@ more.
152
163
  | `PEEKME_OWN_SERVER` | set to 1 to start peekme's own `codex app-server` instead of using the shared one |
153
164
  | `PEEKME_CLAUDE_MODEL` | model for Claude Code explanations. Default is `haiku` |
154
165
  | `PEEKME_CLAUDE_BIN` | claude binary to use for explanations. Default is `claude` |
166
+ | `PEEKME_COPILOT_MODEL` | model for Copilot CLI explanations. Default is Copilot's Auto |
167
+ | `PEEKME_COPILOT_BIN` | copilot binary to use for explanations. Default is `copilot` |
155
168
  | `PEEKME_SELECTION` | use this text instead of the mouse selection, for testing |
156
169
 
157
- ### How `codex` and `claude` get peekme
170
+ ### How `codex`, `claude` and `copilot` get peekme
158
171
 
159
172
  `peekme install` does two things:
160
173
 
161
- 1. It defines shell functions `codex` and `claude` in your shell setup. A function wins over
174
+ 1. It defines shell functions `codex`, `claude` and `copilot` in your shell setup. A function wins over
162
175
  anything on PATH, so it keeps working when nvm, mise, Homebrew or an agent's installer
163
- change PATH later. Aliases that call `codex` or `claude` go through it too.
164
- 2. It puts `codex` and `claude` links to peekme in `~/.local/share/peekme/bin` at the front of
176
+ change PATH later. Aliases that call them go through it too.
177
+ 2. It puts `codex`, `claude` and `copilot` links to peekme in `~/.local/share/peekme/bin` at the front of
165
178
  PATH, so scripts that run them also get peekme. If some tool puts its own directory in front
166
179
  of it later, only scripts lose peekme, and `peekme doctor` tells you which directory it is.
167
180
 
168
181
  Both find the real agent on PATH themselves, so updating the agent changes nothing. If you
169
- remove peekme, the functions fall back to plain `codex` and `claude`.
182
+ remove peekme, the functions fall back to the plain agents.
170
183
 
171
184
  To use peekme with another program, run `peekme -- COMMAND`.
172
185
 
@@ -190,19 +203,21 @@ To use peekme with another program, run `peekme -- COMMAND`.
190
203
  cargo test
191
204
  cargo clippy --all-targets
192
205
  cargo run --example vtdump -- capture.bin 120 40 [offset]
193
- cargo run --example peek_text -- "<screen text>" "<selection>" [--deep] [--claude [--pid PID]]
206
+ cargo run --example peek_text -- "<screen text>" "<selection>" [--deep] [--claude|--copilot] [--pid PID]
194
207
  python3 spikes/capture.py out.bin 120 40 "<script>" -- peekme claude
195
208
  python3 spikes/flicker_test.py
196
209
  python3 spikes/explain_probe.py
210
+ python3 spikes/copilot_probe.py info
197
211
  ```
198
212
 
199
213
  `vtdump` replays a captured byte stream and prints the screen. `peek_text` runs one explanation
200
214
  without a terminal and prints the exact prompt. `capture.py` runs a command in a pseudo-terminal,
201
215
  sends keys and mouse events from a script and saves everything it prints. `flicker_test.py`
202
216
  shows if your terminal flickers when a program switches screens. `explain_probe.py` makes one
203
- explanation request to `codex app-server` and prints timings.
217
+ explanation request to `codex app-server` and prints timings. `copilot_probe.py` does the same
218
+ with Copilot CLI's headless server.
204
219
 
205
- Each agent has its own folder in `src/` (`codex/`, `claude/`): how its selection is read, where
220
+ Each agent has its own folder in `src/` (`codex/`, `claude/`, `copilot/`): how its selection is read, where
206
221
  its conversation comes from, and which model explains. The rest is shared.
207
222
 
208
223
  ## License
@@ -19,7 +19,7 @@
19
19
  "hasInstallScript": true,
20
20
  "license": "MIT OR Apache-2.0",
21
21
  "name": "peekme",
22
- "version": "0.2.2"
22
+ "version": "0.3.0"
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.2.2"
51
+ "version": "0.3.0"
52
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "artifactDownloadUrls": [
3
- "https://github.com/GregoryBolshakov/peekme/releases/download/v0.2.2"
3
+ "https://github.com/GregoryBolshakov/peekme/releases/download/v0.3.0"
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 Codex CLI or Claude Code output and get a short explanation right under it, inside the terminal",
12
+ "description": "Select text in Codex CLI, Claude Code or GitHub Copilot CLI output and get a short explanation right under it, inside the terminal",
13
13
  "devDependencies": {
14
14
  "prettier": "^3.8.3"
15
15
  },
@@ -26,9 +26,9 @@
26
26
  "command-line-utilities",
27
27
  "codex",
28
28
  "claude",
29
+ "copilot",
29
30
  "terminal",
30
- "cli",
31
- "explain"
31
+ "cli"
32
32
  ],
33
33
  "license": "MIT OR Apache-2.0",
34
34
  "name": "peekme",
@@ -69,7 +69,7 @@
69
69
  "zipExt": ".tar.xz"
70
70
  }
71
71
  },
72
- "version": "0.2.2",
72
+ "version": "0.3.0",
73
73
  "volta": {
74
74
  "node": "18.14.1",
75
75
  "npm": "9.5.0"