claude-home 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.
package/README.md ADDED
@@ -0,0 +1,117 @@
1
+ # claude-home
2
+
3
+ A local web dashboard for [Claude Code](https://claude.ai/code) power users.
4
+
5
+ Browse your session history, manage skills, agents, hooks, commands, plans, and discover community skills — all from a clean UI. No tokens consumed. Runs entirely on your machine.
6
+
7
+ ---
8
+
9
+ ## Why claude-home?
10
+
11
+ Claude Code is powerful but headless. Everything lives in files scattered across `~/.claude/` and your project directories. claude-home gives you a visual interface to explore and manage all of it:
12
+
13
+ - **Session history** — browse every conversation you've had with Claude, search by content, resume from where you left off
14
+ - **Skills** — view, create, edit and delete your user and project skills. Discover and install new ones from the community marketplace or any GitHub URL
15
+ - **Agents** — manage your custom agent definitions with full CRUD
16
+ - **Instructions** — read and edit your `CLAUDE.md` files (global and per-project), the instructions that shape Claude's behavior in every session
17
+ - **Permissions** — inspect the allow/deny lists that control what Claude can do in each project
18
+ - **Hooks** — view and manage all your configured hooks across global and project settings
19
+ - **Commands** — browse your slash command library
20
+ - **Plans** — read and search your GSD/planning files
21
+ - **Memory** — inspect your auto-memory entries across projects
22
+ - **Configuration** — view Claude settings per project
23
+
24
+ ### No tokens. No cloud. No tracking.
25
+
26
+ claude-home is a local Express server that reads your `~/.claude/` directory directly. It never calls the Claude API, never sends data anywhere, and works completely offline (except for the marketplace feature, which optionally fetches from GitHub).
27
+
28
+ ---
29
+
30
+ ## Installation
31
+
32
+ ### From GitHub
33
+
34
+ ```bash
35
+ npm install -g ZenekeZene/claude-home
36
+ ```
37
+
38
+ > Requires Node.js 18+. You'll need access to the repository.
39
+
40
+ ### From source
41
+
42
+ ```bash
43
+ git clone https://github.com/ZenekeZene/claude-home
44
+ cd claude-home
45
+ npm install
46
+ npm start
47
+ ```
48
+
49
+ ---
50
+
51
+ ## Usage
52
+
53
+ ```bash
54
+ claude-home
55
+ ```
56
+
57
+ Opens `http://localhost:3141` in your browser automatically.
58
+
59
+ ### Auto-launch on every Claude session
60
+
61
+ Run this once to register a hook that starts claude-home in the background whenever you open Claude Code:
62
+
63
+ ```bash
64
+ claude-home setup-hook
65
+ ```
66
+
67
+ This also creates a `/claude-home` slash command so you can trigger it from any Claude session.
68
+
69
+ ### CLI flags
70
+
71
+ ```
72
+ claude-home [options]
73
+
74
+ --port, -p <n> Port to use (default: 3141)
75
+ --no-open Don't open the browser automatically
76
+ --version, -v Print version
77
+ --help, -h Show help
78
+
79
+ Commands:
80
+ setup-hook Add SessionStart hook + /claude-home slash command
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Skills Marketplace
86
+
87
+ claude-home includes a marketplace to discover and install skills from GitHub repositories.
88
+
89
+ On first run it comes pre-configured with the [Anthropic Official skills repo](https://github.com/anthropics/skills). You can add your own sources (including private repos) by editing `~/.claude/sessions-browser/marketplace.json`:
90
+
91
+ ```json
92
+ {
93
+ "sources": [
94
+ {
95
+ "id": "my-org",
96
+ "name": "My Org Skills",
97
+ "owner": "my-org",
98
+ "repo": "our-skills",
99
+ "branch": "main",
100
+ "skillsPath": "",
101
+ "tokenEnv": "GITHUB_TOKEN"
102
+ }
103
+ ]
104
+ }
105
+ ```
106
+
107
+ For private repos, set your token in `~/.claude/sessions-browser/.env`:
108
+
109
+ ```
110
+ GITHUB_TOKEN=ghp_your_token_here
111
+ ```
112
+
113
+ ---
114
+
115
+ ## License
116
+
117
+ MIT
package/bin/cli.js ADDED
@@ -0,0 +1,137 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const net = require('net');
5
+ const { exec } = require('child_process');
6
+ const path = require('path');
7
+ const fs = require('fs');
8
+ const os = require('os');
9
+
10
+ const pkg = require('../package.json');
11
+
12
+ // ─── Arg parsing ─────────────────────────────────────────────────────────────
13
+
14
+ const args = process.argv.slice(2);
15
+ const subcommand = args[0];
16
+
17
+ function getFlag(name, def) {
18
+ const idx = args.indexOf(name);
19
+ if (idx === -1) return def;
20
+ return args[idx + 1];
21
+ }
22
+
23
+ const port = parseInt(getFlag('--port', getFlag('-p', process.env.PORT || 3141)), 10);
24
+ const noOpen = args.includes('--no-open');
25
+
26
+ if (args.includes('--version') || args.includes('-v')) {
27
+ console.log(pkg.version);
28
+ process.exit(0);
29
+ }
30
+
31
+ if (args.includes('--help') || args.includes('-h')) {
32
+ console.log(`
33
+ claude-home v${pkg.version}
34
+
35
+ Usage:
36
+ claude-home [options]
37
+ claude-home setup-hook
38
+
39
+ Options:
40
+ --port, -p <n> Port to use (default: 3141)
41
+ --no-open Don't open the browser automatically
42
+ --version, -v Print version
43
+ --help, -h Show help
44
+
45
+ Commands:
46
+ setup-hook Add SessionStart hook and /claude-home slash command
47
+ `);
48
+ process.exit(0);
49
+ }
50
+
51
+ // ─── Setup-hook subcommand ────────────────────────────────────────────────────
52
+
53
+ if (subcommand === 'setup-hook') {
54
+ setupHook();
55
+ process.exit(0);
56
+ }
57
+
58
+ // ─── Main: start server or reuse existing ────────────────────────────────────
59
+
60
+ isPortFree(port).then(free => {
61
+ if (free) {
62
+ const { startServer } = require('../server.js');
63
+ startServer(port);
64
+ } else {
65
+ console.log(`Claude Manager already running at http://localhost:${port}`);
66
+ }
67
+ if (!noOpen) openBrowser(`http://localhost:${port}`);
68
+ });
69
+
70
+ // ─── Helpers ─────────────────────────────────────────────────────────────────
71
+
72
+ function isPortFree(p) {
73
+ return new Promise(resolve => {
74
+ const s = net.createServer();
75
+ s.once('error', () => resolve(false));
76
+ s.once('listening', () => s.close(() => resolve(true)));
77
+ s.listen(p);
78
+ });
79
+ }
80
+
81
+ function openBrowser(url) {
82
+ const cmd = process.platform === 'darwin' ? `open "${url}"`
83
+ : process.platform === 'win32' ? `start "" "${url}"`
84
+ : `xdg-open "${url}"`;
85
+ exec(cmd, err => {
86
+ if (err) console.log(`Open in browser: ${url}`);
87
+ });
88
+ }
89
+
90
+ function setupHook() {
91
+ const settingsPath = path.join(os.homedir(), '.claude', 'settings.json');
92
+ const commandsDir = path.join(os.homedir(), '.claude', 'commands');
93
+ const commandPath = path.join(commandsDir, 'claude-home.md');
94
+ const hookCommand = `lsof -ti:${port} >/dev/null 2>&1 || (claude-home --no-open &>/dev/null &)`;
95
+
96
+ // Add SessionStart hook to settings.json
97
+ let settings = {};
98
+ try { settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8')); } catch { /* new file */ }
99
+ if (!settings.hooks) settings.hooks = {};
100
+ if (!settings.hooks.SessionStart) settings.hooks.SessionStart = [];
101
+
102
+ const alreadyExists = settings.hooks.SessionStart.some(entry =>
103
+ entry.hooks?.some(h => h.command?.includes('claude-home'))
104
+ );
105
+
106
+ if (!alreadyExists) {
107
+ settings.hooks.SessionStart.push({
108
+ matcher: '',
109
+ hooks: [{ type: 'command', command: hookCommand }],
110
+ });
111
+ fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2), 'utf8');
112
+ console.log(`✓ SessionStart hook added to ${settingsPath}`);
113
+ } else {
114
+ console.log(` SessionStart hook already present — skipped`);
115
+ }
116
+
117
+ // Create /claude-home slash command
118
+ if (!fs.existsSync(commandsDir)) fs.mkdirSync(commandsDir, { recursive: true });
119
+ if (!fs.existsSync(commandPath)) {
120
+ fs.writeFileSync(commandPath, [
121
+ '---',
122
+ 'description: Start the Claude Manager web dashboard',
123
+ '---',
124
+ '',
125
+ 'Start the Claude Manager web dashboard if not already running, then open it in the browser.',
126
+ '',
127
+ '```bash',
128
+ `lsof -ti:${port} >/dev/null 2>&1 && echo "Claude Manager running at http://localhost:${port}" || (claude-home &)`,
129
+ '```',
130
+ ].join('\n'), 'utf8');
131
+ console.log(`✓ Slash command created at ${commandPath}`);
132
+ } else {
133
+ console.log(` Slash command already present — skipped`);
134
+ }
135
+
136
+ console.log('\nDone! Restart Claude Code for the hook to take effect.');
137
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "sources": [
3
+ {
4
+ "id": "anthropic",
5
+ "name": "Anthropic Official",
6
+ "owner": "anthropics",
7
+ "repo": "skills",
8
+ "branch": "main",
9
+ "skillsPath": "skills",
10
+ "token": ""
11
+ }
12
+ ]
13
+ }
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "claude-home",
3
+ "version": "1.0.0",
4
+ "description": "Web dashboard for Claude Code — browse sessions, manage skills, hooks, commands, and agents",
5
+ "main": "server.js",
6
+ "bin": {
7
+ "claude-home": "bin/cli.js"
8
+ },
9
+ "files": [
10
+ "bin/",
11
+ "server.js",
12
+ "public/",
13
+ "marketplace.default.json",
14
+ "README.md"
15
+ ],
16
+ "scripts": {
17
+ "start": "node server.js"
18
+ },
19
+ "engines": {
20
+ "node": ">=18"
21
+ },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/ZenekeZene/claude-home.git"
25
+ },
26
+ "keywords": [
27
+ "claude",
28
+ "claude-code",
29
+ "sessions",
30
+ "dashboard",
31
+ "cli",
32
+ "skills",
33
+ "agents"
34
+ ],
35
+ "author": "ZenekeZene",
36
+ "license": "MIT",
37
+ "dependencies": {
38
+ "express": "^4.18.2"
39
+ }
40
+ }