pisesh 0.1.6 → 0.1.7
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/README.md +24 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,37 +8,37 @@
|
|
|
8
8
|
|
|
9
9
|
**Bookmark, search, and resume [pi coding-agent](https://github.com/earendil-works/pi) sessions with a fast keyboard-driven TUI.**
|
|
10
10
|
|
|
11
|
-
> `pi --resume` lists every session you ever started. After a week that's 50+ entries with no titles, no tags, no order
|
|
11
|
+
> `pi --resume` lists every session you ever started. After a week that's 50+ entries with no titles, no tags, and no order, so you just scroll and hope. pisesh adds what was missing: ⭐ favorites, instant search, and a `[NOW]` badge for the session you're attached to.
|
|
12
12
|
|
|
13
13
|
## Preview
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
16
|
-
<img src="https://raw.githubusercontent.com/Blue-B/pisesh/main/assets/preview.png" alt="pisesh
|
|
16
|
+
<img src="https://raw.githubusercontent.com/Blue-B/pisesh/main/assets/preview.png" alt="pisesh Favorites tab in a real Windows Terminal session" width="100%">
|
|
17
17
|
</p>
|
|
18
18
|
|
|
19
19
|
<p align="center"><sub>Real capture: ★ starred session at the top, the rest available behind the <b>Today</b>, <b>Here</b>, and <b>All</b> tabs. <code>Tab</code> cycles. <code>f</code> stars. <code>Enter</code> resumes.</sub></p>
|
|
20
20
|
|
|
21
21
|
## Terminal walkthrough
|
|
22
22
|
|
|
23
|
-
What the TUI
|
|
23
|
+
What the TUI looks like, screen by screen. The data below is made up, not real sessions.
|
|
24
24
|
|
|
25
|
-
**Main list
|
|
25
|
+
**Main list.** The highlighted row is the current selection, and `Tab` cycles through the tabs. The green `[NOW]` badge marks the pi session you launched from, and the cyan `✎` marks a session you renamed yourself. CJK titles stay column-aligned:
|
|
26
26
|
|
|
27
|
-
<p align="center"><img src="https://raw.githubusercontent.com/Blue-B/pisesh/main/assets/screen-list.png" alt="pisesh main list
|
|
27
|
+
<p align="center"><img src="https://raw.githubusercontent.com/Blue-B/pisesh/main/assets/screen-list.png" alt="pisesh main list, Favorites tab with Today / Here / All tabs, the NOW badge, and a renamed session" width="100%"></p>
|
|
28
28
|
|
|
29
|
-
**`e`
|
|
29
|
+
**`e` renames a session.** The first user prompt makes a poor title for a thread you keep coming back to, so press `e` to set your own. It's saved as an override (the session jsonl is never touched) and the session gets a `✎` marker in the list:
|
|
30
30
|
|
|
31
|
-
<p align="center"><img src="https://raw.githubusercontent.com/Blue-B/pisesh/main/assets/screen-rename.png" alt="pisesh edit-name panel
|
|
31
|
+
<p align="center"><img src="https://raw.githubusercontent.com/Blue-B/pisesh/main/assets/screen-rename.png" alt="pisesh edit-name panel for setting a custom display title" width="100%"></p>
|
|
32
32
|
|
|
33
|
-
**`p`
|
|
33
|
+
**`p` re-points the working directory** through an arrow-key directory browser. This is the cwd pi actually `cd`s into on resume, and it's also what the `Here` tab filters on. Press `s` to lock in the highlighted directory:
|
|
34
34
|
|
|
35
|
-
<p align="center"><img src="https://raw.githubusercontent.com/Blue-B/pisesh/main/assets/screen-cwd.png" alt="pisesh cwd browser
|
|
35
|
+
<p align="center"><img src="https://raw.githubusercontent.com/Blue-B/pisesh/main/assets/screen-cwd.png" alt="pisesh cwd browser, an arrow-key directory picker for the resume and Here directory" width="100%"></p>
|
|
36
36
|
|
|
37
|
-
The **`Here` tab** shows only sessions whose effective cwd matches the directory you launched pisesh from
|
|
37
|
+
The **`Here` tab** shows only sessions whose effective cwd matches the directory you launched pisesh from. Inside a project you see just that project's threads, without scrolling past your home-dir scratch sessions.
|
|
38
38
|
|
|
39
39
|
## Why pisesh
|
|
40
40
|
|
|
41
|
-
Pi accumulates sessions across many working directories
|
|
41
|
+
Pi accumulates sessions across many working directories: your home, several project dirs, scratch tmux panes. The built-in resume picker is roughly alphabetical and forgets context. After a few weeks:
|
|
42
42
|
|
|
43
43
|
- You can't tell which session was "the one where you fixed the auth bug"
|
|
44
44
|
- You can't pin the 3-4 long-running threads you keep going back to
|
|
@@ -57,7 +57,7 @@ pisesh is a **single-file Node script** (no dependencies, ~900 LoC) that gives y
|
|
|
57
57
|
| Fix where a session resumes | `p` opens an arrow-key directory browser; sets the cwd pi `cd`s into |
|
|
58
58
|
| Find a session by what you said | `/` searches id + project + first user prompt + custom title |
|
|
59
59
|
| Know which session you're attached to | `[NOW]` badge on the live session (passed from pi via env var) |
|
|
60
|
-
| Keep your terminal clean | Alt-screen buffer
|
|
60
|
+
| Keep your terminal clean | Alt-screen buffer, so quitting puts your terminal back the way it was (like vim) |
|
|
61
61
|
| Read Korean / Chinese / Japanese prompts | Display-width-aware truncation; columns never blow up on CJK |
|
|
62
62
|
| Open from anywhere | Run as standalone `pisesh` shell command, or `/sesh` inside pi |
|
|
63
63
|
| Zero install pain | No build step, no native deps, runs on Node 18+ everywhere |
|
|
@@ -101,9 +101,9 @@ Pi-extension side: drop `extensions/sesh.ts` into `~/.pi/agent/extensions/` and
|
|
|
101
101
|
| `↑` `↓` / `j` `k` | move cursor |
|
|
102
102
|
| `Tab` / `h` / `l` | switch tab (`★ Favorites` → `Today` → `Here` → `All`) |
|
|
103
103
|
| `f` / `Space` | star / unstar the selected session |
|
|
104
|
-
| `Enter` | resume
|
|
105
|
-
| `e` | edit name
|
|
106
|
-
| `p` | edit cwd
|
|
104
|
+
| `Enter` | resume the session; runs `pi --session <id>` in its (or the overridden) cwd |
|
|
105
|
+
| `e` | edit name: set a custom display title, shown with `✎` in the list |
|
|
106
|
+
| `p` | edit cwd with an arrow-key directory browser; sets the resume / `Here` dir |
|
|
107
107
|
| `d` | session details (full prompt, file, byte size, timestamps) |
|
|
108
108
|
| `/` | search by id / project / first user prompt / custom title |
|
|
109
109
|
| `Esc` | clear search first, then quit |
|
|
@@ -132,7 +132,7 @@ pisesh --help
|
|
|
132
132
|
| ------------------- | ------------------------------------------------------------------------------------------------ |
|
|
133
133
|
| Runtime | Node.js ≥ 18 (uses only built-in modules: `fs`, `path`, `os`, `child_process`, `readline`) |
|
|
134
134
|
| TUI rendering | Raw ANSI escape sequences (no `blessed` / `ink` / `chalk` dependency) |
|
|
135
|
-
| Alt screen buffer | `\x1b[?1049h` / `\x1b[?1049l
|
|
135
|
+
| Alt screen buffer | `\x1b[?1049h` / `\x1b[?1049l`, the same primitive `vim`, `less`, `htop`, and droid CLI use |
|
|
136
136
|
| Input | Node's `readline.emitKeypressEvents` in raw mode |
|
|
137
137
|
| Width calculation | UAX #11 East Asian Width ranges, compressed to ~10 inline range checks |
|
|
138
138
|
| Pi extension | TypeScript factory using `@earendil-works/pi-coding-agent` extension API (`ui.custom`, `tui.stop`) |
|
|
@@ -142,7 +142,7 @@ pisesh --help
|
|
|
142
142
|
|
|
143
143
|
### What it explicitly does **not** depend on
|
|
144
144
|
|
|
145
|
-
- No `npm install` for the bundled CLI runtime
|
|
145
|
+
- No `npm install` for the bundled CLI runtime; it's genuinely zero-dependency
|
|
146
146
|
- No native binaries / GPU / ffmpeg / database
|
|
147
147
|
- No network calls, no telemetry, no analytics
|
|
148
148
|
- No daemon / background process
|
|
@@ -153,7 +153,7 @@ pisesh --help
|
|
|
153
153
|
| ---------- | ----------------------------------------------------------- |
|
|
154
154
|
| Favorites | `~/.pi/agent/favorites.json` |
|
|
155
155
|
| Overrides | `~/.pi/agent/pisesh-meta.json` (per-session custom title / cwd, keyed by session id) |
|
|
156
|
-
| Sessions | `~/.pi/agent/sessions/<projectSlug>/<timestamp>_<uuid>.jsonl` (pi's native layout
|
|
156
|
+
| Sessions | `~/.pi/agent/sessions/<projectSlug>/<timestamp>_<uuid>.jsonl` (pi's native layout; pisesh never writes here) |
|
|
157
157
|
|
|
158
158
|
Favorites file shape:
|
|
159
159
|
|
|
@@ -183,8 +183,8 @@ Korean / Chinese / Japanese / fullwidth characters render **2 cells wide** in te
|
|
|
183
183
|
|
|
184
184
|
## Requirements
|
|
185
185
|
|
|
186
|
-
- **Node.js ≥ 18** (uses optional chaining
|
|
187
|
-
- A terminal with ANSI escape
|
|
186
|
+
- **Node.js ≥ 18** (uses optional chaining and `for…of` on strings, so no transpile step)
|
|
187
|
+
- A terminal with ANSI escape and alternate screen buffer support, which covers basically every modern emulator:
|
|
188
188
|
- Windows: **Windows Terminal**, **WezTerm**, **Alacritty** ✅
|
|
189
189
|
- macOS: **iTerm2**, **Terminal.app**, **WezTerm**, **Alacritty**, **Kitty** ✅
|
|
190
190
|
- Linux: **GNOME Terminal**, **Konsole**, **xterm**, **Alacritty**, **Kitty** ✅
|
|
@@ -199,10 +199,10 @@ npm link
|
|
|
199
199
|
npm test # node --check + smoke test
|
|
200
200
|
```
|
|
201
201
|
|
|
202
|
-
|
|
202
|
+
Branch from `main` with a short-lived `feature/<scope>` or `fix/<scope>`, then squash-merge back.
|
|
203
203
|
Commits: [Conventional Commits](https://www.conventionalcommits.org/) style (`feat:`, `fix:`, `docs:`, `chore:`).
|
|
204
204
|
|
|
205
|
-
Open a PR
|
|
205
|
+
Open a PR. The CI matrix runs on Ubuntu, macOS, and Windows across Node 18, 20, and 22.
|
|
206
206
|
|
|
207
207
|
## Support
|
|
208
208
|
|
|
@@ -217,8 +217,8 @@ If pisesh saves you context-switching time or just makes pi nicer to live in, su
|
|
|
217
217
|
|
|
218
218
|
## Acknowledgments
|
|
219
219
|
|
|
220
|
-
- [pi-coding-agent](https://github.com/earendil-works/pi) by [@mariozechner](https://github.com/mariozechner)
|
|
221
|
-
- [interactive-shell example extension](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/examples/extensions/interactive-shell.ts)
|
|
220
|
+
- [pi-coding-agent](https://github.com/earendil-works/pi) by [@mariozechner](https://github.com/mariozechner), the agent and extension API that make `/sesh` possible.
|
|
221
|
+
- [interactive-shell example extension](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/examples/extensions/interactive-shell.ts), the pattern reference for the `ui.custom` + `tui.stop` TTY handoff.
|
|
222
222
|
- Inspiration for the favorites + tabs UX: [droid CLI](https://github.com/factory-ai/droid) and tmux's [sesh](https://github.com/joshmedeski/sesh).
|
|
223
223
|
|
|
224
224
|
## License
|