sessioner 0.1.5 → 0.2.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 +43 -91
- package/package.json +7 -7
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026-present Weslley Araújo (@wellwelwel)
|
|
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
CHANGED
|
@@ -2,19 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
# Sessioner
|
|
4
4
|
|
|
5
|
-
✨ An interactive CLI to navigate and manage [**Claude Code**](https://docs.anthropic.com/en/docs/claude-code) sessions from the terminal.
|
|
5
|
+
✨ An interactive **CLI** to navigate and manage [**Claude Code**](https://docs.anthropic.com/en/docs/claude-code) sessions from the terminal.
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/sessioner)
|
|
8
8
|
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
|
-
> 🚧 Work in Progress
|
|
12
|
-
|
|
13
11
|
---
|
|
14
12
|
|
|
15
13
|
## 💡 Why
|
|
16
14
|
|
|
17
|
-
Claude Code supports native forking from specific points, but loses context like thoughts, references, choices, and subagents. It also provides no built-in way to search, browse, merge, prune, or trim
|
|
15
|
+
Claude Code supports native forking from specific points, but can loses context like thoughts, references, choices, and subagents. It also provides no built-in way to search, browse, merge, prune, or trim sessions.
|
|
18
16
|
|
|
19
17
|
**Sessioner** gives you a keyboard-driven interface to manage those sessions directly, including a **full fork** that preserves subagents and all session data:
|
|
20
18
|
|
|
@@ -66,29 +64,20 @@ sessioner
|
|
|
66
64
|
|
|
67
65
|
## 🛠️ Actions
|
|
68
66
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
> [!NOTE]
|
|
68
|
+
>
|
|
69
|
+
> Actions that modify session files (fork, merge, prune, trim, rename, delete, clean) require restarting the Claude Code extension to take effect.
|
|
70
|
+
>
|
|
71
|
+
> - In **VS Code**, you can use the **Reload Window** command (<kbd>Ctrl+Shift+P</kbd> / <kbd>Cmd+Shift+P</kbd> → `Developer: Reload Window`).
|
|
73
72
|
|
|
74
|
-
|
|
73
|
+
### ◌ Open
|
|
75
74
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
- **Session stats** (from the action menu): statistics for a single session
|
|
79
|
-
- **Project stats** (from the main menu): aggregated statistics across all sessions
|
|
80
|
-
- Both display:
|
|
81
|
-
- Duration (time between first and last message)
|
|
82
|
-
- Message counts (user vs assistant)
|
|
83
|
-
- Token usage (input, output, cache creation, cache read)
|
|
84
|
-
- Cost breakdown by model
|
|
85
|
-
- Tool usage frequency
|
|
86
|
-
- Subagent count
|
|
87
|
-
- Project stats also shows the total session count
|
|
75
|
+
- Reveals the `.jsonl` session file in your native file explorer
|
|
76
|
+
- **macOS** (`Finder`), **Windows** (`Explorer`), and **Linux** (`xdg-open`)
|
|
88
77
|
|
|
89
78
|
---
|
|
90
79
|
|
|
91
|
-
### Search (across all sessions)
|
|
80
|
+
### ◌ Search _(across all sessions)_
|
|
92
81
|
|
|
93
82
|
- Text input for a search query
|
|
94
83
|
- Streams all sessions in parallel for case-insensitive text matching
|
|
@@ -101,7 +90,7 @@ sessioner
|
|
|
101
90
|
|
|
102
91
|
---
|
|
103
92
|
|
|
104
|
-
### Fork
|
|
93
|
+
### ◌ Fork
|
|
105
94
|
|
|
106
95
|
- Creates an independent copy of the entire session
|
|
107
96
|
- All UUIDs (messages and subagents) are remapped to new random values
|
|
@@ -110,7 +99,7 @@ sessioner
|
|
|
110
99
|
|
|
111
100
|
---
|
|
112
101
|
|
|
113
|
-
### Merge
|
|
102
|
+
### ◌ Merge
|
|
114
103
|
|
|
115
104
|
- Combines multiple sessions into a single new one
|
|
116
105
|
- Multi-select UI with checkboxes for choosing which sessions to include
|
|
@@ -121,7 +110,7 @@ sessioner
|
|
|
121
110
|
|
|
122
111
|
---
|
|
123
112
|
|
|
124
|
-
### Prune
|
|
113
|
+
### ◌ Prune
|
|
125
114
|
|
|
126
115
|
- Analyzes the session and reports what can be removed:
|
|
127
116
|
- **Tool blocks**: `tool_use` and `tool_result` entries
|
|
@@ -135,101 +124,61 @@ sessioner
|
|
|
135
124
|
|
|
136
125
|
---
|
|
137
126
|
|
|
138
|
-
### Trim
|
|
127
|
+
### ◌ Trim
|
|
139
128
|
|
|
140
129
|
- Lists all messages in reverse order (newest first)
|
|
141
130
|
- Each line shows `[ YOU ]` or `[ LLM ]` followed by the message text
|
|
142
131
|
- Select the last message you want to keep
|
|
143
132
|
- Everything after the selected point is removed
|
|
144
|
-
- Confirmation prompt before applying
|
|
145
133
|
|
|
146
134
|
---
|
|
147
135
|
|
|
148
|
-
###
|
|
136
|
+
### ◌ Stats
|
|
137
|
+
|
|
138
|
+
> 🚧 **WIP**
|
|
139
|
+
|
|
140
|
+
- **Session stats** (from the action menu): statistics for a single session
|
|
141
|
+
- **Project stats** (from the main menu): aggregated statistics across all sessions
|
|
142
|
+
- Both display:
|
|
143
|
+
- Duration (time between first and last message)
|
|
144
|
+
- Message counts (user vs assistant)
|
|
145
|
+
- Token usage (input, output, cache creation, cache read)
|
|
146
|
+
- Cost breakdown by model
|
|
147
|
+
- Tool usage frequency
|
|
148
|
+
- Subagent count
|
|
149
|
+
- Project stats also shows the total session count
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### ◌ Rename
|
|
149
154
|
|
|
150
155
|
- Text input for the new title (<kbd>Esc</kbd> to cancel)
|
|
151
156
|
- Writes a `custom-title` entry to the session file (same format used by the Claude Code extension)
|
|
152
157
|
|
|
153
158
|
---
|
|
154
159
|
|
|
155
|
-
### Delete
|
|
160
|
+
### ◌ Delete
|
|
156
161
|
|
|
157
162
|
- Shows exactly what will be deleted:
|
|
158
163
|
- Session `.jsonl` file
|
|
159
164
|
- Subagents directory (with file count)
|
|
160
165
|
- Removes the entry from the sessions index
|
|
161
|
-
- Confirmation prompt before applying
|
|
162
166
|
|
|
163
167
|
---
|
|
164
168
|
|
|
165
|
-
### Clean (main menu)
|
|
169
|
+
### ◌ Clean _(main menu)_
|
|
166
170
|
|
|
167
171
|
- Batch-deletes empty session files
|
|
168
172
|
- Only appears when empty files exist
|
|
169
173
|
- Shows the count of empty sessions
|
|
170
|
-
- Confirmation prompt before applying
|
|
171
174
|
|
|
172
175
|
---
|
|
173
176
|
|
|
174
177
|
## ⌨️ Navigation
|
|
175
178
|
|
|
176
|
-
### Main Menu
|
|
177
|
-
|
|
178
179
|
- <kbd>Up</kbd> / <kbd>Down</kbd>: move cursor
|
|
179
180
|
- <kbd>Enter</kbd>: confirm
|
|
180
|
-
- <kbd>1</kbd>–<kbd>N</kbd>: select option by number
|
|
181
181
|
- <kbd>0</kbd>: exit
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
### Session List
|
|
186
|
-
|
|
187
|
-
- <kbd>Up</kbd> / <kbd>Down</kbd>: move cursor
|
|
188
|
-
- <kbd>Enter</kbd>: select session
|
|
189
|
-
- `←` Previous: previous page
|
|
190
|
-
- `→` Next: next page
|
|
191
|
-
- `☰` Back to menu: return to main menu
|
|
192
|
-
- `✕` Exit: exit
|
|
193
|
-
|
|
194
|
-
---
|
|
195
|
-
|
|
196
|
-
### Action Menu
|
|
197
|
-
|
|
198
|
-
- <kbd>Up</kbd> / <kbd>Down</kbd>: move cursor
|
|
199
|
-
- <kbd>Enter</kbd>: confirm action
|
|
200
|
-
- <kbd>1</kbd>–<kbd>8</kbd>: select action by number
|
|
201
|
-
- <kbd>9</kbd>: back
|
|
202
|
-
- <kbd>0</kbd>: exit
|
|
203
|
-
|
|
204
|
-
---
|
|
205
|
-
|
|
206
|
-
### Multi-Select (Merge / Prune)
|
|
207
|
-
|
|
208
|
-
- <kbd>Enter</kbd>: toggle item (`☑` selected, `☐` unselected)
|
|
209
|
-
- `✓` Confirm: confirm selection
|
|
210
|
-
- `✕` Cancel: cancel
|
|
211
|
-
|
|
212
|
-
---
|
|
213
|
-
|
|
214
|
-
### Confirmation (Clean / Trim / Delete)
|
|
215
|
-
|
|
216
|
-
- <kbd>Up</kbd> / <kbd>Down</kbd>: move cursor
|
|
217
|
-
- <kbd>Enter</kbd>: confirm selection
|
|
218
|
-
- <kbd>1</kbd>: yes
|
|
219
|
-
- <kbd>2</kbd>: no
|
|
220
|
-
|
|
221
|
-
---
|
|
222
|
-
|
|
223
|
-
### Text Input (Rename)
|
|
224
|
-
|
|
225
|
-
- Type the new title
|
|
226
|
-
- <kbd>Enter</kbd>: confirm
|
|
227
|
-
- <kbd>Esc</kbd>: cancel
|
|
228
|
-
|
|
229
|
-
---
|
|
230
|
-
|
|
231
|
-
### Global
|
|
232
|
-
|
|
233
182
|
- <kbd>ESC</kbd>: go back one level at a time until exit
|
|
234
183
|
- <kbd>Ctrl+C</kbd>: exit
|
|
235
184
|
|
|
@@ -240,14 +189,17 @@ sessioner
|
|
|
240
189
|
```bash
|
|
241
190
|
git clone https://github.com/wellwelwel/sessioner
|
|
242
191
|
cd sessioner
|
|
243
|
-
npm
|
|
192
|
+
npm ci
|
|
244
193
|
npm start
|
|
245
194
|
```
|
|
246
195
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
- `npm
|
|
250
|
-
- `npm run
|
|
196
|
+
### Scripts
|
|
197
|
+
|
|
198
|
+
- `npm start` _(development)_
|
|
199
|
+
- `npm run typecheck`
|
|
200
|
+
- `npm run lint`
|
|
201
|
+
- `npm run lint:fix`
|
|
202
|
+
- `npm run build`
|
|
251
203
|
|
|
252
204
|
---
|
|
253
205
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sessioner",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "✨ An interactive CLI to
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "✨ An interactive CLI to search, fork, merge, prune, trim, and manage Claude Code sessions from the terminal.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"main": "lib/bin/index.js",
|
|
7
8
|
"bin": {
|
|
8
9
|
"sessioner": "lib/bin/index.js"
|
|
9
10
|
},
|
|
@@ -23,13 +24,11 @@
|
|
|
23
24
|
"lib"
|
|
24
25
|
],
|
|
25
26
|
"scripts": {
|
|
26
|
-
"build": "rm -rf lib && tsc",
|
|
27
27
|
"start": "tsx src/bin/index.ts",
|
|
28
|
+
"build": "rm -rf lib && tsc",
|
|
28
29
|
"lint": "prettier --check .",
|
|
29
30
|
"lint:fix": "prettier --write .",
|
|
30
|
-
"typecheck": "tsc --noEmit"
|
|
31
|
-
"patch": "npm version patch --no-git-tag-version",
|
|
32
|
-
"prepublish": "npm run build"
|
|
31
|
+
"typecheck": "tsc --noEmit"
|
|
33
32
|
},
|
|
34
33
|
"dependencies": {
|
|
35
34
|
"@clack/core": "^1.0.1",
|
|
@@ -61,6 +60,7 @@
|
|
|
61
60
|
"claude-session-stats",
|
|
62
61
|
"claude-opus",
|
|
63
62
|
"claude-sonnet",
|
|
64
|
-
"claude-haiku"
|
|
63
|
+
"claude-haiku",
|
|
64
|
+
"search"
|
|
65
65
|
]
|
|
66
66
|
}
|