claude-sessions-dash 1.0.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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +62 -0
  3. package/bin/cli.js +93 -0
  4. package/package.json +35 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Valerii Kovalskii
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,62 @@
1
+ # claude-sessions-dash
2
+
3
+ Termius-style browser dashboard for your Claude Code (and Codex) sessions.
4
+
5
+ ![Dashboard](https://img.shields.io/badge/UI-Dark%20Theme-1a1d23?style=flat-square) ![Node](https://img.shields.io/badge/node-%3E%3D16-green?style=flat-square) ![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)
6
+
7
+ ## Quick Start
8
+
9
+ ```bash
10
+ npx claude-sessions-dash
11
+ ```
12
+
13
+ Opens `http://localhost:3847` with your sessions dashboard.
14
+
15
+ Custom port:
16
+
17
+ ```bash
18
+ npx claude-sessions-dash 4000
19
+ ```
20
+
21
+ ## Features
22
+
23
+ **Sessions**
24
+ - View all Claude Code and Codex sessions in a card grid
25
+ - Group by project, view as timeline, or filter by tool
26
+ - Full-text search across session names and projects
27
+ - Preview conversation history in a side panel
28
+
29
+ **Launch**
30
+ - Resume any session directly in your terminal (iTerm2, Terminal.app, Warp, Kitty, Alacritty)
31
+ - One-click launch with `--dangerously-skip-permissions` option
32
+ - Auto `cd` into the correct project directory
33
+ - Copy resume command to clipboard
34
+ - Terminal preference saved between sessions
35
+
36
+ **Manage**
37
+ - Delete sessions (file + history + env cleanup)
38
+ - Confirmation dialog to prevent accidents
39
+ - Refresh data without restarting
40
+
41
+ **Keyboard Shortcuts**
42
+ - `/` — Focus search
43
+ - `Escape` — Close panels
44
+
45
+ ## How It Works
46
+
47
+ Reads session data from `~/.claude/`:
48
+ - `history.jsonl` — session index with timestamps and projects
49
+ - `projects/*/\<session-id\>.jsonl` — full conversation data
50
+ - `session-env/` — session environment files
51
+
52
+ Zero dependencies. Single Node.js file. Everything runs on `localhost`.
53
+
54
+ ## Requirements
55
+
56
+ - Node.js >= 16
57
+ - Claude Code installed (`~/.claude/` directory exists)
58
+ - macOS / Linux / Windows
59
+
60
+ ## License
61
+
62
+ MIT
package/bin/cli.js ADDED
@@ -0,0 +1,93 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { loadSessions } = require('../src/data');
4
+ const { startServer } = require('../src/server');
5
+
6
+ const DEFAULT_PORT = 3847;
7
+ const args = process.argv.slice(2);
8
+ const command = args[0] || 'help';
9
+
10
+ switch (command) {
11
+ case 'run':
12
+ case 'start': {
13
+ const portArg = args.find(a => a.startsWith('--port='));
14
+ const port = portArg ? parseInt(portArg.split('=')[1]) : (parseInt(args[1]) || DEFAULT_PORT);
15
+ const noBrowser = args.includes('--no-browser');
16
+ startServer(port, !noBrowser);
17
+ break;
18
+ }
19
+
20
+ case 'list':
21
+ case 'ls': {
22
+ const sessions = loadSessions();
23
+ const limit = parseInt(args[1]) || 20;
24
+ console.log(`\n \x1b[36m\x1b[1m${sessions.length} sessions\x1b[0m across ${new Set(sessions.map(s => s.project)).size} projects\n`);
25
+ for (const s of sessions.slice(0, limit)) {
26
+ const tool = s.tool === 'codex' ? '\x1b[36mcodex\x1b[0m' : '\x1b[34mclaude\x1b[0m';
27
+ const msg = (s.first_message || '').slice(0, 50).padEnd(50);
28
+ const proj = s.project_short || '';
29
+ console.log(` ${tool} ${s.id.slice(0, 12)} ${s.last_time} ${msg} \x1b[2m${proj}\x1b[0m`);
30
+ }
31
+ if (sessions.length > limit) console.log(`\n \x1b[2m... and ${sessions.length - limit} more (codedash list ${limit + 20})\x1b[0m`);
32
+ console.log('');
33
+ break;
34
+ }
35
+
36
+ case 'stats': {
37
+ const sessions = loadSessions();
38
+ const projects = {};
39
+ for (const s of sessions) {
40
+ const p = s.project_short || 'unknown';
41
+ if (!projects[p]) projects[p] = { count: 0, messages: 0 };
42
+ projects[p].count++;
43
+ projects[p].messages += s.messages;
44
+ }
45
+ console.log(`\n \x1b[36m\x1b[1mSession Stats\x1b[0m\n`);
46
+ console.log(` Total sessions: ${sessions.length}`);
47
+ console.log(` Total projects: ${Object.keys(projects).length}`);
48
+ console.log(` Claude sessions: ${sessions.filter(s => s.tool === 'claude').length}`);
49
+ console.log(` Codex sessions: ${sessions.filter(s => s.tool === 'codex').length}`);
50
+ console.log(`\n \x1b[1mTop projects:\x1b[0m`);
51
+ const sorted = Object.entries(projects).sort((a, b) => b[1].count - a[1].count).slice(0, 10);
52
+ for (const [name, info] of sorted) {
53
+ console.log(` ${String(info.count).padStart(3)} sessions ${name}`);
54
+ }
55
+ console.log('');
56
+ break;
57
+ }
58
+
59
+ case 'version':
60
+ case '-v':
61
+ case '--version': {
62
+ const pkg = require('../package.json');
63
+ console.log(pkg.version);
64
+ break;
65
+ }
66
+
67
+ case 'help':
68
+ case '-h':
69
+ case '--help':
70
+ default:
71
+ console.log(`
72
+ \x1b[36m\x1b[1mcodedash\x1b[0m — Claude & Codex Sessions Dashboard
73
+
74
+ \x1b[1mUsage:\x1b[0m
75
+ codedash run [port] [--no-browser] Start the dashboard server
76
+ codedash list [limit] List sessions in terminal
77
+ codedash stats Show session statistics
78
+ codedash help Show this help
79
+ codedash version Show version
80
+
81
+ \x1b[1mExamples:\x1b[0m
82
+ codedash run Start on port ${DEFAULT_PORT}
83
+ codedash run --port=4000 Start on port 4000
84
+ codedash run --no-browser Start without opening browser
85
+ codedash list 50 Show last 50 sessions
86
+ codedash ls Alias for list
87
+ `);
88
+ if (!['help', '-h', '--help'].includes(command)) {
89
+ console.log(` Unknown command: ${command}\n`);
90
+ process.exit(1);
91
+ }
92
+ break;
93
+ }
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "claude-sessions-dash",
3
+ "version": "1.0.0",
4
+ "description": "Termius-style browser dashboard for Claude Code sessions. View, search, resume, and delete sessions with a dark-themed UI.",
5
+ "bin": {
6
+ "codedash": "./bin/cli.js"
7
+ },
8
+ "files": [
9
+ "bin/"
10
+ ],
11
+ "keywords": [
12
+ "claude",
13
+ "claude-code",
14
+ "codex",
15
+ "sessions",
16
+ "dashboard",
17
+ "terminal",
18
+ "iterm2",
19
+ "cli",
20
+ "devtools"
21
+ ],
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/vakovalskii/claude-sessions-dash.git"
25
+ },
26
+ "homepage": "https://github.com/vakovalskii/claude-sessions-dash#readme",
27
+ "bugs": {
28
+ "url": "https://github.com/vakovalskii/claude-sessions-dash/issues"
29
+ },
30
+ "author": "Valerii Kovalskii",
31
+ "license": "MIT",
32
+ "engines": {
33
+ "node": ">=16"
34
+ }
35
+ }