peekme 0.2.3 → 0.3.1

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