claudecto 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 +275 -0
- package/dist/__tests__/package.test.d.ts +2 -0
- package/dist/__tests__/package.test.d.ts.map +1 -0
- package/dist/__tests__/package.test.js +53 -0
- package/dist/__tests__/package.test.js.map +1 -0
- package/dist/cli.d.ts +6 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +200 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/server/index.d.ts +11 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +1207 -0
- package/dist/server/index.js.map +1 -0
- package/dist/services/advisor.d.ts +117 -0
- package/dist/services/advisor.d.ts.map +1 -0
- package/dist/services/advisor.js +2636 -0
- package/dist/services/advisor.js.map +1 -0
- package/dist/services/agent-generator.d.ts +71 -0
- package/dist/services/agent-generator.d.ts.map +1 -0
- package/dist/services/agent-generator.js +295 -0
- package/dist/services/agent-generator.js.map +1 -0
- package/dist/services/agents.d.ts +67 -0
- package/dist/services/agents.d.ts.map +1 -0
- package/dist/services/agents.js +405 -0
- package/dist/services/agents.js.map +1 -0
- package/dist/services/analytics.d.ts +145 -0
- package/dist/services/analytics.d.ts.map +1 -0
- package/dist/services/analytics.js +609 -0
- package/dist/services/analytics.js.map +1 -0
- package/dist/services/blueprints.d.ts +31 -0
- package/dist/services/blueprints.d.ts.map +1 -0
- package/dist/services/blueprints.js +317 -0
- package/dist/services/blueprints.js.map +1 -0
- package/dist/services/claude-dir.d.ts +50 -0
- package/dist/services/claude-dir.d.ts.map +1 -0
- package/dist/services/claude-dir.js +193 -0
- package/dist/services/claude-dir.js.map +1 -0
- package/dist/services/hooks.d.ts +38 -0
- package/dist/services/hooks.d.ts.map +1 -0
- package/dist/services/hooks.js +165 -0
- package/dist/services/hooks.js.map +1 -0
- package/dist/services/insights.d.ts +52 -0
- package/dist/services/insights.d.ts.map +1 -0
- package/dist/services/insights.js +1035 -0
- package/dist/services/insights.js.map +1 -0
- package/dist/services/memory.d.ts +14 -0
- package/dist/services/memory.d.ts.map +1 -0
- package/dist/services/memory.js +25 -0
- package/dist/services/memory.js.map +1 -0
- package/dist/services/plans.d.ts +20 -0
- package/dist/services/plans.d.ts.map +1 -0
- package/dist/services/plans.js +149 -0
- package/dist/services/plans.js.map +1 -0
- package/dist/services/project-intelligence.d.ts +75 -0
- package/dist/services/project-intelligence.d.ts.map +1 -0
- package/dist/services/project-intelligence.js +731 -0
- package/dist/services/project-intelligence.js.map +1 -0
- package/dist/services/search.d.ts +32 -0
- package/dist/services/search.d.ts.map +1 -0
- package/dist/services/search.js +203 -0
- package/dist/services/search.js.map +1 -0
- package/dist/services/sessions.d.ts +25 -0
- package/dist/services/sessions.d.ts.map +1 -0
- package/dist/services/sessions.js +248 -0
- package/dist/services/sessions.js.map +1 -0
- package/dist/services/skills.d.ts +30 -0
- package/dist/services/skills.d.ts.map +1 -0
- package/dist/services/skills.js +197 -0
- package/dist/services/skills.js.map +1 -0
- package/dist/services/stats.d.ts +23 -0
- package/dist/services/stats.d.ts.map +1 -0
- package/dist/services/stats.js +88 -0
- package/dist/services/stats.js.map +1 -0
- package/dist/services/teams.d.ts +115 -0
- package/dist/services/teams.d.ts.map +1 -0
- package/dist/services/teams.js +421 -0
- package/dist/services/teams.js.map +1 -0
- package/dist/services/tech-stack.d.ts +98 -0
- package/dist/services/tech-stack.d.ts.map +1 -0
- package/dist/services/tech-stack.js +1088 -0
- package/dist/services/tech-stack.js.map +1 -0
- package/dist/services/terminal.d.ts +75 -0
- package/dist/services/terminal.d.ts.map +1 -0
- package/dist/services/terminal.js +224 -0
- package/dist/services/terminal.js.map +1 -0
- package/dist/types.d.ts +1095 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +18 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/assets/index-BiH4Nhdk.css +1 -0
- package/dist/ui/assets/index-Brv-K8bd.css +1 -0
- package/dist/ui/assets/index-BwMBEdQz.js +3108 -0
- package/dist/ui/assets/index-BwMBEdQz.js.map +1 -0
- package/dist/ui/assets/index-CEWz7ABD.js +3108 -0
- package/dist/ui/assets/index-CEWz7ABD.js.map +1 -0
- package/dist/ui/assets/index-CIZ3vvc-.css +1 -0
- package/dist/ui/assets/index-CsU3cI0n.js +3108 -0
- package/dist/ui/assets/index-CsU3cI0n.js.map +1 -0
- package/dist/ui/assets/index-D3AY6iCS.js +3133 -0
- package/dist/ui/assets/index-D3AY6iCS.js.map +1 -0
- package/dist/ui/assets/index-D8lNZ0Ye.css +1 -0
- package/dist/ui/assets/index-DmgeppSA.js +3108 -0
- package/dist/ui/assets/index-DmgeppSA.js.map +1 -0
- package/dist/ui/favicon.svg +43 -0
- package/dist/ui/index.html +23 -0
- package/dist/utils/jsonl.d.ts +16 -0
- package/dist/utils/jsonl.d.ts.map +1 -0
- package/dist/utils/jsonl.js +51 -0
- package/dist/utils/jsonl.js.map +1 -0
- package/package.json +106 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 josharsh
|
|
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,275 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/josharsh/openclaudecto/main/public/images/introduction.png" alt="claudecto — If Claude Code is your engineer, I am your CTO" width="800" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">claudecto</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>If Claude Code is your engineer, claudecto is your CTO.</strong>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/claudecto"><img src="https://img.shields.io/npm/v/claudecto.svg" alt="npm version" /></a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/claudecto"><img src="https://img.shields.io/npm/dm/claudecto.svg" alt="npm downloads" /></a>
|
|
14
|
+
<a href="https://github.com/josharsh/claudecto/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/claudecto.svg" alt="license" /></a>
|
|
15
|
+
<a href="https://github.com/josharsh/claudecto"><img src="https://img.shields.io/github/stars/josharsh/claudecto.svg?style=social" alt="GitHub stars" /></a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
Your <code>~/.claude</code> data, visualized. Search, browse, edit, and analyze everything Claude Code does.
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Why claudecto?
|
|
25
|
+
|
|
26
|
+
You use Claude Code every day. But do you know:
|
|
27
|
+
|
|
28
|
+
- How much you're spending on tokens?
|
|
29
|
+
- Which conversations had the best results?
|
|
30
|
+
- What patterns keep showing up across sessions?
|
|
31
|
+
- Which skills or hooks would save you hours?
|
|
32
|
+
|
|
33
|
+
**claudecto answers all of this.** It reads your `~/.claude` directory and gives you a visual dashboard with search, analytics, AI insights, and tools to manage your Claude Code setup.
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install -g claudecto
|
|
39
|
+
claudecto
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
That's it. Your dashboard opens at `http://localhost:18791`.
|
|
43
|
+
|
|
44
|
+
## Features
|
|
45
|
+
|
|
46
|
+
### Analytics & Cost Tracking
|
|
47
|
+
|
|
48
|
+
See exactly how you use Claude Code: token consumption, cost breakdowns by model, tool usage distribution, and daily activity trends.
|
|
49
|
+
|
|
50
|
+
<p align="center">
|
|
51
|
+
<img src="https://raw.githubusercontent.com/josharsh/openclaudecto/main/public/images/analysis.png" alt="claudecto analytics — token costs, model usage, tool distribution" width="800" />
|
|
52
|
+
</p>
|
|
53
|
+
|
|
54
|
+
### AI-Powered Insights
|
|
55
|
+
|
|
56
|
+
claudecto uses Claude itself to analyze your sessions. Get project health scores, identify code hotspots, spot recurring challenges, and track Claude's effectiveness over time.
|
|
57
|
+
|
|
58
|
+
<p align="center">
|
|
59
|
+
<img src="https://raw.githubusercontent.com/josharsh/openclaudecto/main/public/images/insights.png" alt="claudecto AI insights — patterns, anti-patterns, development analysis" width="800" />
|
|
60
|
+
</p>
|
|
61
|
+
|
|
62
|
+
### AI Advisor
|
|
63
|
+
|
|
64
|
+
A proactive recommendation engine that analyzes your usage patterns and suggests skills, hooks, CLAUDE.md additions, and MCP servers to improve your workflow.
|
|
65
|
+
|
|
66
|
+
<p align="center">
|
|
67
|
+
<img src="https://raw.githubusercontent.com/josharsh/openclaudecto/main/public/images/advisor.png" alt="claudecto AI advisor — proactive skill and workflow recommendations" width="800" />
|
|
68
|
+
</p>
|
|
69
|
+
|
|
70
|
+
### Skill Studio
|
|
71
|
+
|
|
72
|
+
Create, edit, and manage Claude Code skills with a visual editor. Includes live preview, validation, and templates to get you started.
|
|
73
|
+
|
|
74
|
+
<p align="center">
|
|
75
|
+
<img src="https://raw.githubusercontent.com/josharsh/openclaudecto/main/public/images/skills.png" alt="claudecto skill studio — visual skill editor" width="800" />
|
|
76
|
+
</p>
|
|
77
|
+
|
|
78
|
+
### Multi-Agent Teams
|
|
79
|
+
|
|
80
|
+
Configure custom agents and multi-agent teams with leader/teammate roles, generate invocation instructions, and export reusable blueprints.
|
|
81
|
+
|
|
82
|
+
<p align="center">
|
|
83
|
+
<img src="https://raw.githubusercontent.com/josharsh/openclaudecto/main/public/images/agents.png" alt="claudecto agent studio — multi-agent teams and blueprints" width="800" />
|
|
84
|
+
</p>
|
|
85
|
+
|
|
86
|
+
### Search Everything
|
|
87
|
+
|
|
88
|
+
Full-text search across every Claude conversation you've ever had. Find that one-off fix from three weeks ago in seconds.
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
claudecto search "authentication middleware"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Session Browser & Replay
|
|
95
|
+
|
|
96
|
+
Browse all your sessions with rich metadata — project, branch, timestamps, message count. Open any session to replay the full conversation with syntax-highlighted code blocks.
|
|
97
|
+
|
|
98
|
+
### Hook Builder
|
|
99
|
+
|
|
100
|
+
Build event-driven automations with a visual hook editor. Test hooks against real events before deploying them.
|
|
101
|
+
|
|
102
|
+
### Tech Stack Intelligence
|
|
103
|
+
|
|
104
|
+
Aggregates technology usage across all your projects. See patterns, correlations, and get AI-powered insights about your development practices.
|
|
105
|
+
|
|
106
|
+
### Memory Editor
|
|
107
|
+
|
|
108
|
+
Edit your `CLAUDE.md` files with 8 project templates (web app, backend, mobile, CLI, monorepo, library, data science, DevOps).
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## CLI Commands
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Launch the dashboard (default)
|
|
116
|
+
claudecto
|
|
117
|
+
|
|
118
|
+
# Search conversations
|
|
119
|
+
claudecto search "fix the auth bug"
|
|
120
|
+
claudecto search "API refactor" --project /path/to/project --max 20
|
|
121
|
+
|
|
122
|
+
# Browse sessions
|
|
123
|
+
claudecto sessions
|
|
124
|
+
claudecto sessions --project /path/to/project
|
|
125
|
+
|
|
126
|
+
# Usage statistics
|
|
127
|
+
claudecto stats
|
|
128
|
+
|
|
129
|
+
# List projects
|
|
130
|
+
claudecto projects
|
|
131
|
+
|
|
132
|
+
# Options
|
|
133
|
+
claudecto --port 3000 # Custom port
|
|
134
|
+
claudecto --no-open # Don't auto-open browser
|
|
135
|
+
claudecto --claude-dir /path # Custom ~/.claude path
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Programmatic API
|
|
139
|
+
|
|
140
|
+
Use claudecto as a library in your own tools:
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
import { createServer, ClaudeDir, SessionService, SearchService } from 'claudecto';
|
|
144
|
+
|
|
145
|
+
// Start the server programmatically
|
|
146
|
+
const server = await createServer({ claudeDir: '~/.claude', port: 3000 });
|
|
147
|
+
await server.start();
|
|
148
|
+
|
|
149
|
+
// Or use services directly
|
|
150
|
+
const dir = new ClaudeDir('~/.claude');
|
|
151
|
+
const sessions = new SessionService(dir);
|
|
152
|
+
const { sessions: list } = await sessions.listSessions({ limit: 10 });
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### REST API
|
|
156
|
+
|
|
157
|
+
claudecto exposes 50+ API endpoints when the server is running:
|
|
158
|
+
|
|
159
|
+
| Category | Endpoints | Description |
|
|
160
|
+
|----------|-----------|-------------|
|
|
161
|
+
| **Stats** | `GET /api/stats`, `/api/stats/daily` | Usage statistics and daily activity |
|
|
162
|
+
| **Analytics** | `GET /api/analytics`, `/api/analytics/daily`, `/api/analytics/tools` | Token/cost tracking, tool distribution |
|
|
163
|
+
| **Sessions** | `GET /api/sessions`, `/api/sessions/:id` | Browse and read sessions |
|
|
164
|
+
| **Search** | `POST /api/search` | Full-text search |
|
|
165
|
+
| **Skills** | `GET/POST/PUT/DELETE /api/skills` | Skill CRUD |
|
|
166
|
+
| **Hooks** | `GET/POST/PUT/DELETE /api/hooks`, `POST /api/hooks/:id/test` | Hook management and testing |
|
|
167
|
+
| **Plans** | `GET /api/plans`, `/api/plans/:name` | Implementation plans |
|
|
168
|
+
| **Insights** | `GET/POST /api/insights` | AI-powered session analysis |
|
|
169
|
+
| **Agents** | `GET/POST/PUT/DELETE /api/agents`, `POST /api/agents/generate` | Agent management and AI generation |
|
|
170
|
+
| **Teams** | `GET/POST/PUT/DELETE /api/teams` | Multi-agent team orchestration |
|
|
171
|
+
| **Advisor** | `GET /api/advisor/recommendations`, `POST /api/advisor/analyze` | Proactive recommendations |
|
|
172
|
+
| **Terminal** | `WS /api/terminal/ws` | Integrated Claude Code terminal |
|
|
173
|
+
|
|
174
|
+
## Privacy & Security
|
|
175
|
+
|
|
176
|
+
- **100% local** — All data stays on your machine
|
|
177
|
+
- **Reads ~/.claude directly** — No external APIs, no data collection
|
|
178
|
+
- **Localhost only** — Dashboard binds to `127.0.0.1` by default
|
|
179
|
+
- **Optional auth** — Firebase auth is opt-in for cloud features; client keys are public by design (restricted via Firebase security rules)
|
|
180
|
+
|
|
181
|
+
## Installation
|
|
182
|
+
|
|
183
|
+
### NPM (Recommended)
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
npm install -g claudecto
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Mac App
|
|
190
|
+
|
|
191
|
+
Download the `.dmg` from [Releases](https://github.com/josharsh/claudecto/releases).
|
|
192
|
+
|
|
193
|
+
### From Source
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
git clone https://github.com/josharsh/claudecto
|
|
197
|
+
cd claudecto
|
|
198
|
+
npm install
|
|
199
|
+
npm run build
|
|
200
|
+
npm start
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Requirements
|
|
204
|
+
|
|
205
|
+
- **Claude Code** — [Install Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview) and use it at least once (creates `~/.claude`)
|
|
206
|
+
- **Node.js 18+**
|
|
207
|
+
- **macOS 11+** for the desktop app (Apple Silicon + Intel)
|
|
208
|
+
|
|
209
|
+
## Development
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
git clone https://github.com/josharsh/claudecto
|
|
213
|
+
cd claudecto
|
|
214
|
+
npm install
|
|
215
|
+
npm run dev # Start in dev mode
|
|
216
|
+
npm run build # Full build (server + UI)
|
|
217
|
+
npm test # Run smoke tests
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Project Structure
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
claudecto/
|
|
224
|
+
├── src/ # Server + CLI (TypeScript)
|
|
225
|
+
│ ├── cli.ts # CLI entry point
|
|
226
|
+
│ ├── index.ts # Library exports
|
|
227
|
+
│ ├── server/ # Hono API server
|
|
228
|
+
│ └── services/ # 18 service modules
|
|
229
|
+
├── ui/ # React dashboard (Vite + Tailwind + shadcn/ui)
|
|
230
|
+
├── electron/ # macOS desktop app
|
|
231
|
+
└── dist/ # Built output (published to npm)
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Troubleshooting
|
|
235
|
+
|
|
236
|
+
**"Claude directory not found"** — Use Claude Code at least once. `~/.claude` is created on first run.
|
|
237
|
+
|
|
238
|
+
**Port already in use** — `claudecto --port 3001`
|
|
239
|
+
|
|
240
|
+
**node-pty build errors** — The terminal feature requires native compilation:
|
|
241
|
+
```bash
|
|
242
|
+
# macOS
|
|
243
|
+
xcode-select --install
|
|
244
|
+
# Linux
|
|
245
|
+
sudo apt-get install build-essential
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## Related
|
|
249
|
+
|
|
250
|
+
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview) — The AI coding assistant this dashboard is built for
|
|
251
|
+
- [@anthropic-ai/sdk](https://www.npmjs.com/package/@anthropic-ai/sdk) — Anthropic's official SDK
|
|
252
|
+
- [Claude Code Hooks](https://docs.anthropic.com/en/docs/claude-code/hooks) — Event-driven automations that claudecto helps you manage
|
|
253
|
+
- [Claude Code MCP](https://docs.anthropic.com/en/docs/claude-code/mcp-servers) — MCP servers that claudecto's AI Advisor can recommend
|
|
254
|
+
|
|
255
|
+
## Contributing
|
|
256
|
+
|
|
257
|
+
1. Fork the repository
|
|
258
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
259
|
+
3. Make your changes
|
|
260
|
+
4. Run tests (`npm test`)
|
|
261
|
+
5. Open a Pull Request
|
|
262
|
+
|
|
263
|
+
## License
|
|
264
|
+
|
|
265
|
+
[MIT](LICENSE)
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
<p align="center">
|
|
270
|
+
Built for the Claude Code community.
|
|
271
|
+
<br />
|
|
272
|
+
<a href="https://claudecto.com">Website</a> ·
|
|
273
|
+
<a href="https://github.com/josharsh/claudecto/issues">Report Bug</a> ·
|
|
274
|
+
<a href="https://github.com/josharsh/claudecto/issues">Request Feature</a>
|
|
275
|
+
</p>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/package.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { describe, it } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { execFileSync } from 'node:child_process';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = path.dirname(__filename);
|
|
8
|
+
const cliPath = path.join(__dirname, '..', 'cli.js');
|
|
9
|
+
describe('package exports', () => {
|
|
10
|
+
it('should export createServer', async () => {
|
|
11
|
+
const mod = await import('../index.js');
|
|
12
|
+
assert.ok(typeof mod.createServer === 'function');
|
|
13
|
+
});
|
|
14
|
+
it('should export ClaudeDir', async () => {
|
|
15
|
+
const mod = await import('../index.js');
|
|
16
|
+
assert.ok(typeof mod.ClaudeDir === 'function');
|
|
17
|
+
});
|
|
18
|
+
it('should export SessionService', async () => {
|
|
19
|
+
const mod = await import('../index.js');
|
|
20
|
+
assert.ok(typeof mod.SessionService === 'function');
|
|
21
|
+
});
|
|
22
|
+
it('should export SearchService', async () => {
|
|
23
|
+
const mod = await import('../index.js');
|
|
24
|
+
assert.ok(typeof mod.SearchService === 'function');
|
|
25
|
+
});
|
|
26
|
+
it('should export StatsService', async () => {
|
|
27
|
+
const mod = await import('../index.js');
|
|
28
|
+
assert.ok(typeof mod.StatsService === 'function');
|
|
29
|
+
});
|
|
30
|
+
it('should export PlansService', async () => {
|
|
31
|
+
const mod = await import('../index.js');
|
|
32
|
+
assert.ok(typeof mod.PlansService === 'function');
|
|
33
|
+
});
|
|
34
|
+
it('should export SkillsService', async () => {
|
|
35
|
+
const mod = await import('../index.js');
|
|
36
|
+
assert.ok(typeof mod.SkillsService === 'function');
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
describe('CLI', () => {
|
|
40
|
+
it('--version should output a valid semver', () => {
|
|
41
|
+
const output = execFileSync('node', [cliPath, '--version'], {
|
|
42
|
+
encoding: 'utf-8',
|
|
43
|
+
}).trim();
|
|
44
|
+
assert.match(output, /^\d+\.\d+\.\d+/);
|
|
45
|
+
});
|
|
46
|
+
it('--help should exit cleanly', () => {
|
|
47
|
+
const output = execFileSync('node', [cliPath, '--help'], {
|
|
48
|
+
encoding: 'utf-8',
|
|
49
|
+
});
|
|
50
|
+
assert.ok(output.includes('claudecto'));
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=package.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.test.js","sourceRoot":"","sources":["../../src/__tests__/package.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;AAErD,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,4BAA4B,EAAE,KAAK,IAAI,EAAE;QAC1C,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;QACxC,MAAM,CAAC,EAAE,CAAC,OAAO,GAAG,CAAC,YAAY,KAAK,UAAU,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;QACvC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;QACxC,MAAM,CAAC,EAAE,CAAC,OAAO,GAAG,CAAC,SAAS,KAAK,UAAU,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8BAA8B,EAAE,KAAK,IAAI,EAAE;QAC5C,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;QACxC,MAAM,CAAC,EA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AAE,gBAAgB,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACpC,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE;YACvD,QAAQ,EAAE,OAAO;SAClB,CAAC,CAAC;QACH,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;GAEG"}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* claudecto CLI - Visual dashboard for ~/.claude
|
|
4
|
+
*/
|
|
5
|
+
import { exec } from 'node:child_process';
|
|
6
|
+
import { readFileSync } from 'node:fs';
|
|
7
|
+
import os from 'node:os';
|
|
8
|
+
import path from 'node:path';
|
|
9
|
+
import { fileURLToPath } from 'node:url';
|
|
10
|
+
import { Command } from 'commander';
|
|
11
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
+
const __dirname = path.dirname(__filename);
|
|
13
|
+
const pkg = JSON.parse(readFileSync(path.join(__dirname, '..', 'package.json'), 'utf-8'));
|
|
14
|
+
import { createServer } from './server/index.js';
|
|
15
|
+
import { ClaudeDir } from './services/claude-dir.js';
|
|
16
|
+
import { SessionService } from './services/sessions.js';
|
|
17
|
+
import { SearchService } from './services/search.js';
|
|
18
|
+
import { StatsService } from './services/stats.js';
|
|
19
|
+
const DEFAULT_PORT = 18791;
|
|
20
|
+
const DEFAULT_HOST = '127.0.0.1';
|
|
21
|
+
function openBrowser(url) {
|
|
22
|
+
const platform = process.platform;
|
|
23
|
+
const cmd = platform === 'darwin'
|
|
24
|
+
? `open "${url}"`
|
|
25
|
+
: platform === 'win32'
|
|
26
|
+
? `start "" "${url}"`
|
|
27
|
+
: `xdg-open "${url}"`;
|
|
28
|
+
exec(cmd, (err) => {
|
|
29
|
+
if (err)
|
|
30
|
+
console.log(`Open ${url} in your browser`);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
const program = new Command();
|
|
34
|
+
program
|
|
35
|
+
.name('claudecto')
|
|
36
|
+
.description('Visual dashboard for ~/.claude - search, browse, and manage your Claude Code data')
|
|
37
|
+
.version(pkg.version);
|
|
38
|
+
// ============================================================================
|
|
39
|
+
// Main Command (start server)
|
|
40
|
+
// ============================================================================
|
|
41
|
+
program
|
|
42
|
+
.command('start', { isDefault: true })
|
|
43
|
+
.description('Start the claudecto dashboard')
|
|
44
|
+
.option('-p, --port <number>', 'Port to listen on', String(DEFAULT_PORT))
|
|
45
|
+
.option('--host <address>', 'Host to bind to', DEFAULT_HOST)
|
|
46
|
+
.option('--no-open', 'Do not open browser automatically')
|
|
47
|
+
.option('--claude-dir <path>', 'Custom ~/.claude path', path.join(os.homedir(), '.claude'))
|
|
48
|
+
.action(async (opts) => {
|
|
49
|
+
const port = Number.parseInt(opts.port, 10);
|
|
50
|
+
const host = opts.host;
|
|
51
|
+
const claudeDir = path.resolve(opts.claudeDir);
|
|
52
|
+
// Check if Claude directory exists
|
|
53
|
+
const dir = new ClaudeDir(claudeDir);
|
|
54
|
+
if (!(await dir.exists())) {
|
|
55
|
+
console.error(`Error: Claude directory not found at ${claudeDir}`);
|
|
56
|
+
console.error('Make sure Claude Code is installed and you have used it at least once.');
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
console.log('Starting claudecto dashboard...');
|
|
60
|
+
console.log(`Claude directory: ${claudeDir}`);
|
|
61
|
+
const server = await createServer({ claudeDir, port, host });
|
|
62
|
+
await server.start();
|
|
63
|
+
if (opts.open) {
|
|
64
|
+
openBrowser(server.getUrl());
|
|
65
|
+
}
|
|
66
|
+
let isShuttingDown = false;
|
|
67
|
+
const shutdown = async () => {
|
|
68
|
+
if (isShuttingDown)
|
|
69
|
+
return;
|
|
70
|
+
isShuttingDown = true;
|
|
71
|
+
console.log('\nShutting down...');
|
|
72
|
+
await server.stop();
|
|
73
|
+
process.exit(0);
|
|
74
|
+
};
|
|
75
|
+
process.on('SIGINT', shutdown);
|
|
76
|
+
process.on('SIGTERM', shutdown);
|
|
77
|
+
});
|
|
78
|
+
// ============================================================================
|
|
79
|
+
// Search Command
|
|
80
|
+
// ============================================================================
|
|
81
|
+
program
|
|
82
|
+
.command('search <query>')
|
|
83
|
+
.description('Search across all Claude conversations')
|
|
84
|
+
.option('--claude-dir <path>', 'Custom ~/.claude path', path.join(os.homedir(), '.claude'))
|
|
85
|
+
.option('-n, --max <number>', 'Maximum results', '10')
|
|
86
|
+
.option('--project <path>', 'Filter by project path')
|
|
87
|
+
.action(async (query, opts) => {
|
|
88
|
+
const claudeDir = new ClaudeDir(path.resolve(opts.claudeDir));
|
|
89
|
+
if (!(await claudeDir.exists())) {
|
|
90
|
+
console.error(`Error: Claude directory not found at ${opts.claudeDir}`);
|
|
91
|
+
process.exit(1);
|
|
92
|
+
}
|
|
93
|
+
const searchService = new SearchService(claudeDir);
|
|
94
|
+
const maxResults = Number.parseInt(opts.max, 10);
|
|
95
|
+
const { results, total } = await searchService.search({
|
|
96
|
+
query,
|
|
97
|
+
limit: maxResults,
|
|
98
|
+
filters: opts.project ? { project: opts.project } : undefined,
|
|
99
|
+
});
|
|
100
|
+
if (results.length === 0) {
|
|
101
|
+
console.log('No results found.');
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
console.log(`Found ${total} results (showing ${results.length}):\n`);
|
|
105
|
+
for (const r of results) {
|
|
106
|
+
const date = new Date(r.timestamp).toLocaleString();
|
|
107
|
+
console.log(`[${r.type.toUpperCase()}] ${r.projectName} - ${date}`);
|
|
108
|
+
console.log(` ${r.snippet}`);
|
|
109
|
+
console.log(` Session: ${r.sessionId}\n`);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
// ============================================================================
|
|
113
|
+
// Sessions Command
|
|
114
|
+
// ============================================================================
|
|
115
|
+
program
|
|
116
|
+
.command('sessions')
|
|
117
|
+
.description('List recent Claude sessions')
|
|
118
|
+
.option('--claude-dir <path>', 'Custom ~/.claude path', path.join(os.homedir(), '.claude'))
|
|
119
|
+
.option('-n, --max <number>', 'Maximum sessions to show', '10')
|
|
120
|
+
.option('--project <path>', 'Filter by project path')
|
|
121
|
+
.action(async (opts) => {
|
|
122
|
+
const claudeDir = new ClaudeDir(path.resolve(opts.claudeDir));
|
|
123
|
+
if (!(await claudeDir.exists())) {
|
|
124
|
+
console.error(`Error: Claude directory not found at ${opts.claudeDir}`);
|
|
125
|
+
process.exit(1);
|
|
126
|
+
}
|
|
127
|
+
const sessionService = new SessionService(claudeDir);
|
|
128
|
+
const { sessions, total } = await sessionService.listSessions({
|
|
129
|
+
project: opts.project,
|
|
130
|
+
limit: Number.parseInt(opts.max, 10),
|
|
131
|
+
});
|
|
132
|
+
if (sessions.length === 0) {
|
|
133
|
+
console.log('No sessions found.');
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
console.log(`Found ${total} sessions (showing ${sessions.length}):\n`);
|
|
137
|
+
for (const s of sessions) {
|
|
138
|
+
const date = new Date(s.lastMessageAt).toLocaleString();
|
|
139
|
+
const slug = s.slug ? ` (${s.slug})` : '';
|
|
140
|
+
console.log(`${s.id.slice(0, 8)}...${slug}`);
|
|
141
|
+
console.log(` Project: ${s.projectName}`);
|
|
142
|
+
console.log(` Messages: ${s.messageCount} | Last: ${date}`);
|
|
143
|
+
if (s.branch)
|
|
144
|
+
console.log(` Branch: ${s.branch}`);
|
|
145
|
+
console.log();
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
// ============================================================================
|
|
149
|
+
// Stats Command
|
|
150
|
+
// ============================================================================
|
|
151
|
+
program
|
|
152
|
+
.command('stats')
|
|
153
|
+
.description('Show Claude usage statistics')
|
|
154
|
+
.option('--claude-dir <path>', 'Custom ~/.claude path', path.join(os.homedir(), '.claude'))
|
|
155
|
+
.action(async (opts) => {
|
|
156
|
+
const claudeDir = new ClaudeDir(path.resolve(opts.claudeDir));
|
|
157
|
+
if (!(await claudeDir.exists())) {
|
|
158
|
+
console.error(`Error: Claude directory not found at ${opts.claudeDir}`);
|
|
159
|
+
process.exit(1);
|
|
160
|
+
}
|
|
161
|
+
const statsService = new StatsService(claudeDir);
|
|
162
|
+
const summary = await statsService.getSummary();
|
|
163
|
+
console.log('Claude Code Usage Statistics\n');
|
|
164
|
+
console.log(`Total Messages: ${summary.totalMessages.toLocaleString()}`);
|
|
165
|
+
console.log(`Total Sessions: ${summary.totalSessions.toLocaleString()}`);
|
|
166
|
+
console.log(`Total Tool Calls: ${summary.totalToolCalls.toLocaleString()}`);
|
|
167
|
+
console.log(`Active Days: ${summary.activeDays}`);
|
|
168
|
+
console.log(`Current Streak: ${summary.streakDays} days`);
|
|
169
|
+
console.log(`Avg Messages/Day: ${summary.averageMessagesPerDay}`);
|
|
170
|
+
});
|
|
171
|
+
// ============================================================================
|
|
172
|
+
// Projects Command
|
|
173
|
+
// ============================================================================
|
|
174
|
+
program
|
|
175
|
+
.command('projects')
|
|
176
|
+
.description('List all projects')
|
|
177
|
+
.option('--claude-dir <path>', 'Custom ~/.claude path', path.join(os.homedir(), '.claude'))
|
|
178
|
+
.action(async (opts) => {
|
|
179
|
+
const claudeDir = new ClaudeDir(path.resolve(opts.claudeDir));
|
|
180
|
+
if (!(await claudeDir.exists())) {
|
|
181
|
+
console.error(`Error: Claude directory not found at ${opts.claudeDir}`);
|
|
182
|
+
process.exit(1);
|
|
183
|
+
}
|
|
184
|
+
const sessionService = new SessionService(claudeDir);
|
|
185
|
+
const projects = await sessionService.listProjects();
|
|
186
|
+
if (projects.length === 0) {
|
|
187
|
+
console.log('No projects found.');
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
console.log(`Found ${projects.length} projects:\n`);
|
|
191
|
+
for (const p of projects) {
|
|
192
|
+
const date = new Date(p.lastActivity).toLocaleString();
|
|
193
|
+
console.log(`${p.name}`);
|
|
194
|
+
console.log(` Path: ${p.path}`);
|
|
195
|
+
console.log(` Sessions: ${p.sessionCount} | Last: ${date}`);
|
|
196
|
+
console.log();
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
program.parse();
|
|
200
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;AAE1F,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACr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,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,cAAc,EAAE,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QACjC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,YAAY,YAAY,IAAI,EAAE,CAAC,CAAC;QAC7D,OAAO,CAAC,GAAG,EAAE,CAAC;IAChB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* claudecto - Visual dashboard for ~/.claude
|
|
3
|
+
*/
|
|
4
|
+
export { createServer } from './server/index.js';
|
|
5
|
+
export { ClaudeDir } from './services/claude-dir.js';
|
|
6
|
+
export { SessionService } from './services/sessions.js';
|
|
7
|
+
export { SearchService } from './services/search.js';
|
|
8
|
+
export { StatsService } from './services/stats.js';
|
|
9
|
+
export { PlansService } from './services/plans.js';
|
|
10
|
+
export { SkillsService } from './services/skills.js';
|
|
11
|
+
export * from './types.js';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,cAAc,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* claudecto - Visual dashboard for ~/.claude
|
|
3
|
+
*/
|
|
4
|
+
export { createServer } from './server/index.js';
|
|
5
|
+
export { ClaudeDir } from './services/claude-dir.js';
|
|
6
|
+
export { SessionService } from './services/sessions.js';
|
|
7
|
+
export { SearchService } from './services/search.js';
|
|
8
|
+
export { StatsService } from './services/stats.js';
|
|
9
|
+
export { PlansService } from './services/plans.js';
|
|
10
|
+
export { SkillsService } from './services/skills.js';
|
|
11
|
+
export * from './types.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* claudecto server - Hono-based API server
|
|
3
|
+
*/
|
|
4
|
+
import type { DotClaudeConfig } from '../types.js';
|
|
5
|
+
export interface DotClaudeServer {
|
|
6
|
+
start(): Promise<void>;
|
|
7
|
+
stop(): Promise<void>;
|
|
8
|
+
getUrl(): string;
|
|
9
|
+
}
|
|
10
|
+
export declare function createServer(config: DotClaudeConfig): Promise<DotClaudeServer>;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAWH,OAAO,KAAK,EAAE,eAAe,EAAyB,MAAM,aAAa,CAAC;AA4C1E,MAAM,WAAW,eAAe;IAC9B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,MAAM,IAAI,MAAM,CAAC;CAClB;AAuED,wBAAsB,YAAY,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CA0xCpF"}
|