codex-session-manager 0.1.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/LICENSE +21 -0
- package/README.md +89 -0
- package/bin/codex-session-manager.js +3 -0
- package/dist/src/cli.js +821 -0
- package/dist/src/preview.js +95 -0
- package/dist/src/session-store.js +364 -0
- package/dist/src/types.js +2 -0
- package/dist/src/ui-utils.js +58 -0
- package/dist/tests/preview.test.js +68 -0
- package/dist/tests/session-store.test.js +132 -0
- package/dist/tests/ui-utils.test.js +33 -0
- package/package.json +36 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lucent Lab
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Codex Session Manager
|
|
2
|
+
|
|
3
|
+
Simple TUI to rename, tag, and archive Codex CLI sessions stored under `~/.codex`.
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
- Browse sessions with a focused cursor and optional bulk selection
|
|
8
|
+
- Rename sessions and edit tags
|
|
9
|
+
- Archive or unarchive sessions
|
|
10
|
+
- Search by name or tag and filter by archive status
|
|
11
|
+
- Toggle a details pane with metadata and previews of the first and last messages
|
|
12
|
+
- Tag autocomplete in the tag editor
|
|
13
|
+
- Bulk toggle archive status for selected sessions
|
|
14
|
+
|
|
15
|
+
## Requirements
|
|
16
|
+
|
|
17
|
+
- Node.js 18.18+ or 20.9+ (or newer)
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Build and run
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm run build
|
|
29
|
+
npm start
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Quality checks
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm run typecheck
|
|
36
|
+
npm run lint
|
|
37
|
+
npm test
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Dev run (tsx)
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm run dev
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Controls
|
|
47
|
+
|
|
48
|
+
Navigation
|
|
49
|
+
- Up/Down (j/k): move focus
|
|
50
|
+
- p/n: page up/down
|
|
51
|
+
- g : jump to top
|
|
52
|
+
- G : jump to bottom
|
|
53
|
+
|
|
54
|
+
Filter and view
|
|
55
|
+
- / : search by name or tag
|
|
56
|
+
- f : show filter (active, archived, active+archived)
|
|
57
|
+
- s : toggle sort order (desc/asc)
|
|
58
|
+
- d : toggle details pane
|
|
59
|
+
|
|
60
|
+
Selection
|
|
61
|
+
- space : toggle selection for bulk actions
|
|
62
|
+
- A : select all visible
|
|
63
|
+
- I (capital i): invert selection
|
|
64
|
+
- C : clear selection
|
|
65
|
+
|
|
66
|
+
Actions
|
|
67
|
+
- r : rename session
|
|
68
|
+
- t : edit tags (comma separated)
|
|
69
|
+
- a : toggle archive focused
|
|
70
|
+
- B : toggle archive selected
|
|
71
|
+
|
|
72
|
+
Other
|
|
73
|
+
- h or ? : toggle help
|
|
74
|
+
- q : quit
|
|
75
|
+
|
|
76
|
+
Note: In-app help (h/?) includes alternate keys like Home/End and Tab.
|
|
77
|
+
|
|
78
|
+
## Notes
|
|
79
|
+
|
|
80
|
+
- Session metadata is stored in the first JSON line (`session_meta`) inside each `.jsonl` file.
|
|
81
|
+
- This tool adds or updates `title`, `name`, and `tags` in that line.
|
|
82
|
+
- Archiving moves files into `~/.codex/archived_sessions` and restoring moves them back into the date-based folder.
|
|
83
|
+
- Windows: Works in Windows Terminal or PowerShell 7+ (ANSI + raw mode). Session data still lives under `%USERPROFILE%\.codex`.
|
|
84
|
+
|
|
85
|
+
## Example use cases
|
|
86
|
+
|
|
87
|
+
- Rename a session so it is easy to spot in `--resume` lists.
|
|
88
|
+
- Tag sessions with project names for quick filtering.
|
|
89
|
+
- Archive old sessions to keep the active list clean.
|