peekme 0.2.3 → 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,15 @@
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
+
3
13
  ## 0.2.3 (2026-09-28)
4
14
 
5
15
  - Option+P works on a Mac also over SSH and inside tmux. 0.2.2 found out from the environment
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.3. 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
  |---|---|---|
@@ -78,7 +82,8 @@ you type Greek, `π` stays a letter. If your terminal sends Option as Meta, Opti
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
84
  Terminal press Cmd+C after you select. Over SSH only the agent's own selection can be read, so
81
- use the full screen mode there (Codex uses it by default, Claude Code with `"tui": "fullscreen"`).
85
+ use the full screen mode there (Codex and Copilot CLI use it by default, Claude Code with
86
+ `"tui": "fullscreen"`).
82
87
 
83
88
  In Claude Code, Alt+P opens the model picker. With peekme it explains the selection instead.
84
89
  `/model` still opens the model picker.
@@ -91,13 +96,17 @@ No API key is needed. peekme asks the agent's own CLI, with your existing login:
91
96
  - Claude Code: `claude -p` on Haiku, without tools and without saving the session, so nothing
92
97
  appears in `/resume`. After the first explanation one `claude -p` waits in the background for
93
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.
94
103
 
95
104
  It does use your plan, a little for each explanation. Nothing starts before the first Alt+P.
96
105
 
97
106
  Only the interactive screen gets peekme: `codex`, `codex "prompt"`, `codex resume`,
98
- `codex fork`, and `claude`, `claude "prompt"`, `claude --resume`, `claude -c`. Commands like
99
- `codex exec`, `codex mcp`, `claude -p` or `claude mcp`, and anything with output going to a pipe
100
- 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.
101
110
 
102
111
  ## How it works
103
112
 
@@ -108,8 +117,8 @@ what is on your screen.
108
117
  On Alt+P it takes the selection and finds it on the screen:
109
118
 
110
119
  - Codex full screen: the text Codex highlighted.
111
- - Claude Code full screen: Claude copies the selection with an OSC 52 escape sequence when you
112
- 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
113
122
  where the drag ended. This also works over SSH.
114
123
  - Otherwise: your terminal's mouse selection (the X11 PRIMARY selection).
115
124
 
@@ -120,7 +129,7 @@ that arrives while the box is open is kept aside.
120
129
 
121
130
  On Esc it draws those rows again from a copy taken when the box opened. After that it sends the
122
131
  kept output, so the terminal ends in the same state as if the box never existed. Tests check
123
- 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.
124
133
 
125
134
  ### What the model gets
126
135
 
@@ -136,8 +145,9 @@ slow. So the model gets small parts, each with a size limit:
136
145
  3. Your request that this text answers, and one line for each of your earlier requests.
137
146
  4. The first places in the conversation where the same words were used before.
138
147
 
139
- The conversation comes from Codex's app-server, or from Claude Code's session transcript in
140
- `~/.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.
141
151
 
142
152
  Usually this is 1 to 7 KB of text. When it is not enough, press Alt+P again and the model gets
143
153
  the whole conversation. A long chat can be 5 to 30 times bigger than a normal explanation, so
@@ -153,21 +163,23 @@ more.
153
163
  | `PEEKME_OWN_SERVER` | set to 1 to start peekme's own `codex app-server` instead of using the shared one |
154
164
  | `PEEKME_CLAUDE_MODEL` | model for Claude Code explanations. Default is `haiku` |
155
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` |
156
168
  | `PEEKME_SELECTION` | use this text instead of the mouse selection, for testing |
157
169
 
158
- ### How `codex` and `claude` get peekme
170
+ ### How `codex`, `claude` and `copilot` get peekme
159
171
 
160
172
  `peekme install` does two things:
161
173
 
162
- 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
163
175
  anything on PATH, so it keeps working when nvm, mise, Homebrew or an agent's installer
164
- change PATH later. Aliases that call `codex` or `claude` go through it too.
165
- 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
166
178
  PATH, so scripts that run them also get peekme. If some tool puts its own directory in front
167
179
  of it later, only scripts lose peekme, and `peekme doctor` tells you which directory it is.
168
180
 
169
181
  Both find the real agent on PATH themselves, so updating the agent changes nothing. If you
170
- remove peekme, the functions fall back to plain `codex` and `claude`.
182
+ remove peekme, the functions fall back to the plain agents.
171
183
 
172
184
  To use peekme with another program, run `peekme -- COMMAND`.
173
185
 
@@ -191,19 +203,21 @@ To use peekme with another program, run `peekme -- COMMAND`.
191
203
  cargo test
192
204
  cargo clippy --all-targets
193
205
  cargo run --example vtdump -- capture.bin 120 40 [offset]
194
- 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]
195
207
  python3 spikes/capture.py out.bin 120 40 "<script>" -- peekme claude
196
208
  python3 spikes/flicker_test.py
197
209
  python3 spikes/explain_probe.py
210
+ python3 spikes/copilot_probe.py info
198
211
  ```
199
212
 
200
213
  `vtdump` replays a captured byte stream and prints the screen. `peek_text` runs one explanation
201
214
  without a terminal and prints the exact prompt. `capture.py` runs a command in a pseudo-terminal,
202
215
  sends keys and mouse events from a script and saves everything it prints. `flicker_test.py`
203
216
  shows if your terminal flickers when a program switches screens. `explain_probe.py` makes one
204
- 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.
205
219
 
206
- 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
207
221
  its conversation comes from, and which model explains. The rest is shared.
208
222
 
209
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.3"
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.3"
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.3"
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.3",
72
+ "version": "0.3.0",
73
73
  "volta": {
74
74
  "node": "18.14.1",
75
75
  "npm": "9.5.0"