spooling 0.2.18__tar.gz → 0.3.0__tar.gz
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.
- {spooling-0.2.18/spooling.egg-info → spooling-0.3.0}/PKG-INFO +39 -88
- {spooling-0.2.18 → spooling-0.3.0}/README.md +38 -86
- {spooling-0.2.18 → spooling-0.3.0}/pyproject.toml +1 -2
- {spooling-0.2.18 → spooling-0.3.0}/spooling/cli.py +1 -49
- {spooling-0.2.18 → spooling-0.3.0}/spooling/cloud.py +25 -1
- {spooling-0.2.18 → spooling-0.3.0}/spooling/ingest.py +1 -1
- {spooling-0.2.18 → spooling-0.3.0}/spooling/server.py +0 -9
- {spooling-0.2.18 → spooling-0.3.0/spooling.egg-info}/PKG-INFO +39 -88
- {spooling-0.2.18 → spooling-0.3.0}/spooling.egg-info/requires.txt +0 -1
- {spooling-0.2.18 → spooling-0.3.0}/tests/test_cloud_errors.py +23 -1
- {spooling-0.2.18 → spooling-0.3.0}/LICENSE +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/setup.cfg +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/__init__.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/agent.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/classifiers.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/config.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/connectors/__init__.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/connectors/base.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/connectors/bigquery.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/connectors/clickhouse.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/connectors/factory.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/connectors/mongodb.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/connectors/mysql.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/connectors/postgresql.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/connectors/rest/__init__.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/connectors/rest/base.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/connectors/rest/shopify_connectors.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/connectors/snowflake.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/connectors/types.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/db.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/device_login.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/embeddings.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/evals.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/experiments.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/insights.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/mcp_server.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/optimize.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/parser.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/pricing.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/providers/__init__.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/providers/antigravity.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/providers/base.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/providers/claude_code.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/providers/codex.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/providers/copilot.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/providers/cortex_code.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/providers/cursor.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/providers/gemini.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/providers/github.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/providers/gitlab.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/providers/kiro.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/providers/opencode.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/providers/session_file.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/providers/windsurf.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/redact.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/remote_otel.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/schema.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/sdk.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/search.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/sessions.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/stats.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/subscription_pricing.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/summarize.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/tracing.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/tunnel.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/tunnel_auth.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling/watcher.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling.egg-info/SOURCES.txt +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling.egg-info/dependency_links.txt +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling.egg-info/entry_points.txt +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/spooling.egg-info/top_level.txt +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/tests/test_agent_spans.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/tests/test_claude_code_provider.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/tests/test_cloud_teams.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/tests/test_device_login.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/tests/test_docs.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/tests/test_insights.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/tests/test_mcp_auth_middleware.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/tests/test_session_ids.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/tests/test_storage_optimizations.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/tests/test_summarize.py +0 -0
- {spooling-0.2.18 → spooling-0.3.0}/tests/test_tunnel_auth.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spooling
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Local session tracker and semantic search for AI coding assistants
|
|
5
5
|
Author: Parsed Analytics, Inc.
|
|
6
6
|
License: MIT
|
|
@@ -15,7 +15,6 @@ Requires-Dist: sentence-transformers>=3.0
|
|
|
15
15
|
Requires-Dist: numpy>=1.24
|
|
16
16
|
Requires-Dist: fastapi>=0.111
|
|
17
17
|
Requires-Dist: uvicorn[standard]>=0.30
|
|
18
|
-
Requires-Dist: jinja2>=3.1
|
|
19
18
|
Requires-Dist: watchdog>=4.0
|
|
20
19
|
Requires-Dist: rich>=13.0
|
|
21
20
|
Requires-Dist: httpx>=0.27
|
|
@@ -38,7 +37,7 @@ Dynamic: license-file
|
|
|
38
37
|
|
|
39
38
|
Local session tracker and semantic search for AI coding assistants.
|
|
40
39
|
|
|
41
|
-
Track your AI coding sessions across **Claude Code**, **OpenAI Codex CLI**, **GitHub Copilot**, **Cursor**, **Windsurf**, **Kiro**, **Google Antigravity**, and **opencode**, all in one place. Get usage stats, cost estimates, per-provider breakdowns, semantic search,
|
|
40
|
+
Track your AI coding sessions across **Claude Code**, **OpenAI Codex CLI**, **GitHub Copilot**, **Cursor**, **Windsurf**, **Kiro**, **Google Antigravity**, and **opencode**, all in one place. Get usage stats, cost estimates, per-provider breakdowns, semantic search, to explore your history.
|
|
42
41
|
|
|
43
42
|
**Website:** [spooling.ai](https://spooling.ai)
|
|
44
43
|
|
|
@@ -48,7 +47,7 @@ Track your AI coding sessions across **Claude Code**, **OpenAI Codex CLI**, **Gi
|
|
|
48
47
|
|
|
49
48
|
- **Python 3.11+**
|
|
50
49
|
- **pipx** or **uv** (optional, alternative install methods)
|
|
51
|
-
- **Ollama** (optional, for free local
|
|
50
|
+
- **Ollama** (optional, for free local LLM features) or an **Anthropic API key**
|
|
52
51
|
|
|
53
52
|
No Docker, no PostgreSQL, no Node.js required.
|
|
54
53
|
|
|
@@ -119,7 +118,7 @@ curl -s http://127.0.0.1:3004/mcp \
|
|
|
119
118
|
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | jq
|
|
120
119
|
```
|
|
121
120
|
|
|
122
|
-
Should return the tools listed under [Tools exposed](#tools-exposed). If you get "connection refused", `spooling mcp`
|
|
121
|
+
Should return the tools listed under [Tools exposed](#tools-exposed). If you get "connection refused", `spooling mcp` is not running, or something else is using port 3004. Find it with `lsof -i :3004`.
|
|
123
122
|
|
|
124
123
|
---
|
|
125
124
|
|
|
@@ -271,6 +270,22 @@ spooling summarize --backend opencode --model amazon-bedrock/us.anthropic.claude
|
|
|
271
270
|
- `--force` - regenerate even if a summary exists
|
|
272
271
|
- `-y, --yes` - don't ask before sending text to a non-local endpoint
|
|
273
272
|
|
|
273
|
+
#### Summarize one session
|
|
274
|
+
|
|
275
|
+
Name the session by its id (or any unique prefix) and pick the backend:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
spooling session list --title login # find the id first
|
|
279
|
+
spooling summarize ses_e6310bd1 --backend claude-code
|
|
280
|
+
spooling summarize ses_e6310bd1 --backend claude-code --ssh my-other-mac
|
|
281
|
+
spooling session show ses_e6310bd1 # read it back
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
- If the session already has a summary, nothing runs. Add `--force` to replace it, including a summary the provider wrote.
|
|
285
|
+
- Naming a session skips the `--min-messages` filter, so short sessions work too. You can name several: `spooling summarize ID1 ID2 --backend claude-code`.
|
|
286
|
+
- `--dry-run` shows what would run without calling a model, and `-y` skips the confirmation prompt.
|
|
287
|
+
- To avoid typing the backend each time, `export SPOOLING_SUMMARY_BACKEND=claude-code`. There is no environment variable for `--ssh`.
|
|
288
|
+
|
|
274
289
|
#### Using Claude Code or opencode
|
|
275
290
|
|
|
276
291
|
The `claude-code` and `opencode` backends run the agent's headless mode and send the prompt on stdin, so there is no API key to set up: they use whatever login the agent already has. Both send the redacted transcript to that agent's provider, so Spooling asks for confirmation first.
|
|
@@ -308,20 +323,11 @@ spooling serve --port 8080 # Custom port
|
|
|
308
323
|
spooling serve --host 0.0.0.0 # Bind to all interfaces
|
|
309
324
|
```
|
|
310
325
|
|
|
311
|
-
### `spooling ui`
|
|
312
|
-
|
|
313
|
-
Start the API server, the MCP HTTP server, and the Next.js UI together. Requires the `ui/` directory from the [source repo](https://github.com/sashimiboi/spooling) to be present. Set `SPOOLING_UI_DIR` to point at it if running from a non-standard location.
|
|
314
|
-
|
|
315
|
-
```bash
|
|
316
|
-
spooling ui # API :3002 · MCP :3004 · GUI :3003
|
|
317
|
-
```
|
|
318
|
-
|
|
319
326
|
### `spooling mcp`
|
|
320
327
|
|
|
321
328
|
Start the Spooling MCP server on its own. Defaults to streamable-HTTP at
|
|
322
329
|
`http://127.0.0.1:3004/mcp`, which any MCP-compatible agent can connect to
|
|
323
|
-
by URL.
|
|
324
|
-
need to run it directly when you want the MCP server without the GUI.
|
|
330
|
+
by URL.
|
|
325
331
|
|
|
326
332
|
```bash
|
|
327
333
|
spooling mcp # streamable-HTTP at http://127.0.0.1:3004/mcp (default)
|
|
@@ -471,6 +477,21 @@ spooling push --dry-run # show what would be pushed
|
|
|
471
477
|
|
|
472
478
|
`push` ingests new provider sessions into the local database before uploading, so you don't need to run `spooling sync` first. The server upserts by session id, so re-running is safe.
|
|
473
479
|
|
|
480
|
+
#### When a Free workspace is full
|
|
481
|
+
|
|
482
|
+
The Free plan caps each workspace (200 sessions, 25,000 messages, 5,000 traces). When a push would go past a cap the server answers
|
|
483
|
+
`402`, and `spooling push` stops with a clear message and a non-zero exit code:
|
|
484
|
+
|
|
485
|
+
```
|
|
486
|
+
Free plan limit reached: this workspace can't take more on the Free plan.
|
|
487
|
+
The Free plan allows 200 sessions per workspace. Delete old ones with `spooling cloud delete`, or upgrade at https://app.spooling.ai/settings?tab=billing
|
|
488
|
+
Nothing already pushed was removed; the rest of this push was not sent.
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
Nothing you have already pushed is removed, and sessions already in the workspace can still be updated by a batch that adds no new
|
|
492
|
+
ones. Free space with `spooling cloud delete`, or upgrade from the link. `spooling cloud watch` shows the message once and then a
|
|
493
|
+
short "still at the Free plan limit" line each cycle, and carries on automatically once there is room.
|
|
494
|
+
|
|
474
495
|
### Push only some sessions, or to a specific team
|
|
475
496
|
|
|
476
497
|
**Which team gets the sessions** is decided by the API key you are logged in with. Each key belongs to one workspace (personal or a team), and `spooling push` sends to that workspace. Mint a key for the team in the app, then log in with it:
|
|
@@ -553,7 +574,7 @@ curl -s "https://api.spooling.ai/v1/search?q=migration&limit=10" \
|
|
|
553
574
|
-H "Authorization: Bearer $SPOOLING_KEY"
|
|
554
575
|
```
|
|
555
576
|
|
|
556
|
-
**Important**: `app.spooling.ai` is the
|
|
577
|
+
**Important**: `app.spooling.ai` is the hosted web app. For API access, use `api.spooling.ai` directly.
|
|
557
578
|
|
|
558
579
|
### Status / logout
|
|
559
580
|
|
|
@@ -597,8 +618,7 @@ launchctl load ~/Library/LaunchAgents/ai.spooling.cloud-watch.plist
|
|
|
597
618
|
|
|
598
619
|
Spooling exposes an MCP server so any AI agent can query your session history
|
|
599
620
|
as a context source. The server runs over **streamable-HTTP** at
|
|
600
|
-
`http://127.0.0.1:3004/mcp` and is started
|
|
601
|
-
ui`.
|
|
621
|
+
`http://127.0.0.1:3004/mcp` and is started with `spooling mcp`.
|
|
602
622
|
|
|
603
623
|
Drop this into your MCP client config (`~/.mcp.json`, Cursor,
|
|
604
624
|
Codex, or any other streamable-HTTP capable agent):
|
|
@@ -615,9 +635,6 @@ Codex, or any other streamable-HTTP capable agent):
|
|
|
615
635
|
|
|
616
636
|
Or register it with an MCP client's config file.
|
|
617
637
|
|
|
618
|
-
The **Settings** page in the GUI shows the endpoint URL, a copy button, and
|
|
619
|
-
the full config snippet so you don't have to remember it.
|
|
620
|
-
|
|
621
638
|
### Tools exposed
|
|
622
639
|
|
|
623
640
|
| Tool | Purpose |
|
|
@@ -650,63 +667,6 @@ it with the command-based form:
|
|
|
650
667
|
|
|
651
668
|
---
|
|
652
669
|
|
|
653
|
-
## GUI
|
|
654
|
-
|
|
655
|
-
The Spooling GUI runs on **http://localhost:3003** and includes:
|
|
656
|
-
|
|
657
|
-
| Page | Description |
|
|
658
|
-
|------|-------------|
|
|
659
|
-
| **Dashboard** | Overview stats, per-provider breakdown, daily activity chart, projects, top tools, recent sessions |
|
|
660
|
-
| **Sessions** | Browse all sessions with provider labels, filtering, click into any session for full conversation view |
|
|
661
|
-
| **Search** | Semantic search across all session history with similarity scores |
|
|
662
|
-
| **Analytics** | Charts for daily usage, cost trends, token usage, tool distribution, filterable by provider (AG Charts) |
|
|
663
|
-
| **Chat** | AI assistant that can answer questions about your session data (RAG-powered) |
|
|
664
|
-
| **Connections** | Connect/disconnect AI coding tools (Codex, Copilot, Cursor, Windsurf) |
|
|
665
|
-
| **Settings** | Configure the AI chat provider (Ollama or Anthropic) |
|
|
666
|
-
|
|
667
|
-
### Running the GUI
|
|
668
|
-
|
|
669
|
-
```bash
|
|
670
|
-
# Terminal 1: API server
|
|
671
|
-
source .venv/bin/activate
|
|
672
|
-
spooling serve
|
|
673
|
-
|
|
674
|
-
# Terminal 2: Next.js dev server
|
|
675
|
-
cd ui
|
|
676
|
-
npm run dev
|
|
677
|
-
```
|
|
678
|
-
|
|
679
|
-
Or use `spooling ui` to start both at once.
|
|
680
|
-
|
|
681
|
-
---
|
|
682
|
-
|
|
683
|
-
## Chat Agent Setup
|
|
684
|
-
|
|
685
|
-
The chat page lets you ask questions about your coding sessions in natural language. It uses RAG — retrieves relevant context from the local database before answering.
|
|
686
|
-
|
|
687
|
-
### Option A: Ollama (free, local)
|
|
688
|
-
|
|
689
|
-
```bash
|
|
690
|
-
# Install Ollama
|
|
691
|
-
brew install ollama
|
|
692
|
-
|
|
693
|
-
# Start the server
|
|
694
|
-
ollama serve
|
|
695
|
-
|
|
696
|
-
# Pull a model
|
|
697
|
-
ollama pull gemma3:4b
|
|
698
|
-
```
|
|
699
|
-
|
|
700
|
-
Go to **Settings** in the GUI and select Ollama. The model will auto-detect.
|
|
701
|
-
|
|
702
|
-
### Option B: Anthropic API (bring your own key)
|
|
703
|
-
|
|
704
|
-
Go to **Settings** in the GUI, select Anthropic, and paste your API key from [console.anthropic.com](https://console.anthropic.com).
|
|
705
|
-
|
|
706
|
-
Available models: Sonnet, Haiku, Opus.
|
|
707
|
-
|
|
708
|
-
---
|
|
709
|
-
|
|
710
670
|
## Architecture
|
|
711
671
|
|
|
712
672
|
```
|
|
@@ -729,12 +689,6 @@ spooling/
|
|
|
729
689
|
│ ├── agent.py # Chat agent (Ollama + Anthropic)
|
|
730
690
|
│ ├── tunnel.py # Cloudflare quick tunnel support
|
|
731
691
|
│ └── server.py # FastAPI API server
|
|
732
|
-
└── ui/ # Next.js frontend (source repo only)
|
|
733
|
-
├── next.config.js # API proxy to :3002
|
|
734
|
-
└── src/
|
|
735
|
-
├── components/ # shadcn/ui components
|
|
736
|
-
├── lib/ # API helpers
|
|
737
|
-
└── app/(app)/ # Pages (dashboard, sessions, search, etc.)
|
|
738
692
|
```
|
|
739
693
|
|
|
740
694
|
### Stack
|
|
@@ -745,7 +699,6 @@ spooling/
|
|
|
745
699
|
| Embeddings | sentence-transformers / all-MiniLM-L6-v2 (local) |
|
|
746
700
|
| Search | numpy cosine similarity |
|
|
747
701
|
| Backend | Python, FastAPI, Click |
|
|
748
|
-
| Frontend | Next.js 14, shadcn/ui, Tailwind CSS, AG Charts |
|
|
749
702
|
| Chat AI | Ollama (local) or Anthropic API |
|
|
750
703
|
|
|
751
704
|
### Ports
|
|
@@ -753,7 +706,6 @@ spooling/
|
|
|
753
706
|
| Service | Port |
|
|
754
707
|
|---------|------|
|
|
755
708
|
| API Server | 3002 |
|
|
756
|
-
| GUI | 3003 |
|
|
757
709
|
| MCP Server (streamable-HTTP) | 3004 |
|
|
758
710
|
|
|
759
711
|
---
|
|
@@ -767,8 +719,7 @@ All optional — defaults work out of the box.
|
|
|
767
719
|
| `SPOOLING_DB` | `~/.local/share/spooling/spooling.db` | Path to the SQLite database file (`%APPDATA%\spooling\spooling.db` on Windows) |
|
|
768
720
|
| `SPOOLING_EMBEDDING_MODEL` | `all-MiniLM-L6-v2` | Sentence transformer model |
|
|
769
721
|
| `SPOOLING_UI_HOST` | `127.0.0.1` | API server host |
|
|
770
|
-
| `
|
|
771
|
-
| `ANTHROPIC_API_KEY` | - | Anthropic API key (alternative to setting in the GUI) |
|
|
722
|
+
| `ANTHROPIC_API_KEY` | - | Anthropic API key (required for Anthropic-backed features) |
|
|
772
723
|
|
|
773
724
|
---
|
|
774
725
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Local session tracker and semantic search for AI coding assistants.
|
|
4
4
|
|
|
5
|
-
Track your AI coding sessions across **Claude Code**, **OpenAI Codex CLI**, **GitHub Copilot**, **Cursor**, **Windsurf**, **Kiro**, **Google Antigravity**, and **opencode**, all in one place. Get usage stats, cost estimates, per-provider breakdowns, semantic search,
|
|
5
|
+
Track your AI coding sessions across **Claude Code**, **OpenAI Codex CLI**, **GitHub Copilot**, **Cursor**, **Windsurf**, **Kiro**, **Google Antigravity**, and **opencode**, all in one place. Get usage stats, cost estimates, per-provider breakdowns, semantic search, to explore your history.
|
|
6
6
|
|
|
7
7
|
**Website:** [spooling.ai](https://spooling.ai)
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ Track your AI coding sessions across **Claude Code**, **OpenAI Codex CLI**, **Gi
|
|
|
12
12
|
|
|
13
13
|
- **Python 3.11+**
|
|
14
14
|
- **pipx** or **uv** (optional, alternative install methods)
|
|
15
|
-
- **Ollama** (optional, for free local
|
|
15
|
+
- **Ollama** (optional, for free local LLM features) or an **Anthropic API key**
|
|
16
16
|
|
|
17
17
|
No Docker, no PostgreSQL, no Node.js required.
|
|
18
18
|
|
|
@@ -83,7 +83,7 @@ curl -s http://127.0.0.1:3004/mcp \
|
|
|
83
83
|
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | jq
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
Should return the tools listed under [Tools exposed](#tools-exposed). If you get "connection refused", `spooling mcp`
|
|
86
|
+
Should return the tools listed under [Tools exposed](#tools-exposed). If you get "connection refused", `spooling mcp` is not running, or something else is using port 3004. Find it with `lsof -i :3004`.
|
|
87
87
|
|
|
88
88
|
---
|
|
89
89
|
|
|
@@ -235,6 +235,22 @@ spooling summarize --backend opencode --model amazon-bedrock/us.anthropic.claude
|
|
|
235
235
|
- `--force` - regenerate even if a summary exists
|
|
236
236
|
- `-y, --yes` - don't ask before sending text to a non-local endpoint
|
|
237
237
|
|
|
238
|
+
#### Summarize one session
|
|
239
|
+
|
|
240
|
+
Name the session by its id (or any unique prefix) and pick the backend:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
spooling session list --title login # find the id first
|
|
244
|
+
spooling summarize ses_e6310bd1 --backend claude-code
|
|
245
|
+
spooling summarize ses_e6310bd1 --backend claude-code --ssh my-other-mac
|
|
246
|
+
spooling session show ses_e6310bd1 # read it back
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
- If the session already has a summary, nothing runs. Add `--force` to replace it, including a summary the provider wrote.
|
|
250
|
+
- Naming a session skips the `--min-messages` filter, so short sessions work too. You can name several: `spooling summarize ID1 ID2 --backend claude-code`.
|
|
251
|
+
- `--dry-run` shows what would run without calling a model, and `-y` skips the confirmation prompt.
|
|
252
|
+
- To avoid typing the backend each time, `export SPOOLING_SUMMARY_BACKEND=claude-code`. There is no environment variable for `--ssh`.
|
|
253
|
+
|
|
238
254
|
#### Using Claude Code or opencode
|
|
239
255
|
|
|
240
256
|
The `claude-code` and `opencode` backends run the agent's headless mode and send the prompt on stdin, so there is no API key to set up: they use whatever login the agent already has. Both send the redacted transcript to that agent's provider, so Spooling asks for confirmation first.
|
|
@@ -272,20 +288,11 @@ spooling serve --port 8080 # Custom port
|
|
|
272
288
|
spooling serve --host 0.0.0.0 # Bind to all interfaces
|
|
273
289
|
```
|
|
274
290
|
|
|
275
|
-
### `spooling ui`
|
|
276
|
-
|
|
277
|
-
Start the API server, the MCP HTTP server, and the Next.js UI together. Requires the `ui/` directory from the [source repo](https://github.com/sashimiboi/spooling) to be present. Set `SPOOLING_UI_DIR` to point at it if running from a non-standard location.
|
|
278
|
-
|
|
279
|
-
```bash
|
|
280
|
-
spooling ui # API :3002 · MCP :3004 · GUI :3003
|
|
281
|
-
```
|
|
282
|
-
|
|
283
291
|
### `spooling mcp`
|
|
284
292
|
|
|
285
293
|
Start the Spooling MCP server on its own. Defaults to streamable-HTTP at
|
|
286
294
|
`http://127.0.0.1:3004/mcp`, which any MCP-compatible agent can connect to
|
|
287
|
-
by URL.
|
|
288
|
-
need to run it directly when you want the MCP server without the GUI.
|
|
295
|
+
by URL.
|
|
289
296
|
|
|
290
297
|
```bash
|
|
291
298
|
spooling mcp # streamable-HTTP at http://127.0.0.1:3004/mcp (default)
|
|
@@ -435,6 +442,21 @@ spooling push --dry-run # show what would be pushed
|
|
|
435
442
|
|
|
436
443
|
`push` ingests new provider sessions into the local database before uploading, so you don't need to run `spooling sync` first. The server upserts by session id, so re-running is safe.
|
|
437
444
|
|
|
445
|
+
#### When a Free workspace is full
|
|
446
|
+
|
|
447
|
+
The Free plan caps each workspace (200 sessions, 25,000 messages, 5,000 traces). When a push would go past a cap the server answers
|
|
448
|
+
`402`, and `spooling push` stops with a clear message and a non-zero exit code:
|
|
449
|
+
|
|
450
|
+
```
|
|
451
|
+
Free plan limit reached: this workspace can't take more on the Free plan.
|
|
452
|
+
The Free plan allows 200 sessions per workspace. Delete old ones with `spooling cloud delete`, or upgrade at https://app.spooling.ai/settings?tab=billing
|
|
453
|
+
Nothing already pushed was removed; the rest of this push was not sent.
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
Nothing you have already pushed is removed, and sessions already in the workspace can still be updated by a batch that adds no new
|
|
457
|
+
ones. Free space with `spooling cloud delete`, or upgrade from the link. `spooling cloud watch` shows the message once and then a
|
|
458
|
+
short "still at the Free plan limit" line each cycle, and carries on automatically once there is room.
|
|
459
|
+
|
|
438
460
|
### Push only some sessions, or to a specific team
|
|
439
461
|
|
|
440
462
|
**Which team gets the sessions** is decided by the API key you are logged in with. Each key belongs to one workspace (personal or a team), and `spooling push` sends to that workspace. Mint a key for the team in the app, then log in with it:
|
|
@@ -517,7 +539,7 @@ curl -s "https://api.spooling.ai/v1/search?q=migration&limit=10" \
|
|
|
517
539
|
-H "Authorization: Bearer $SPOOLING_KEY"
|
|
518
540
|
```
|
|
519
541
|
|
|
520
|
-
**Important**: `app.spooling.ai` is the
|
|
542
|
+
**Important**: `app.spooling.ai` is the hosted web app. For API access, use `api.spooling.ai` directly.
|
|
521
543
|
|
|
522
544
|
### Status / logout
|
|
523
545
|
|
|
@@ -561,8 +583,7 @@ launchctl load ~/Library/LaunchAgents/ai.spooling.cloud-watch.plist
|
|
|
561
583
|
|
|
562
584
|
Spooling exposes an MCP server so any AI agent can query your session history
|
|
563
585
|
as a context source. The server runs over **streamable-HTTP** at
|
|
564
|
-
`http://127.0.0.1:3004/mcp` and is started
|
|
565
|
-
ui`.
|
|
586
|
+
`http://127.0.0.1:3004/mcp` and is started with `spooling mcp`.
|
|
566
587
|
|
|
567
588
|
Drop this into your MCP client config (`~/.mcp.json`, Cursor,
|
|
568
589
|
Codex, or any other streamable-HTTP capable agent):
|
|
@@ -579,9 +600,6 @@ Codex, or any other streamable-HTTP capable agent):
|
|
|
579
600
|
|
|
580
601
|
Or register it with an MCP client's config file.
|
|
581
602
|
|
|
582
|
-
The **Settings** page in the GUI shows the endpoint URL, a copy button, and
|
|
583
|
-
the full config snippet so you don't have to remember it.
|
|
584
|
-
|
|
585
603
|
### Tools exposed
|
|
586
604
|
|
|
587
605
|
| Tool | Purpose |
|
|
@@ -614,63 +632,6 @@ it with the command-based form:
|
|
|
614
632
|
|
|
615
633
|
---
|
|
616
634
|
|
|
617
|
-
## GUI
|
|
618
|
-
|
|
619
|
-
The Spooling GUI runs on **http://localhost:3003** and includes:
|
|
620
|
-
|
|
621
|
-
| Page | Description |
|
|
622
|
-
|------|-------------|
|
|
623
|
-
| **Dashboard** | Overview stats, per-provider breakdown, daily activity chart, projects, top tools, recent sessions |
|
|
624
|
-
| **Sessions** | Browse all sessions with provider labels, filtering, click into any session for full conversation view |
|
|
625
|
-
| **Search** | Semantic search across all session history with similarity scores |
|
|
626
|
-
| **Analytics** | Charts for daily usage, cost trends, token usage, tool distribution, filterable by provider (AG Charts) |
|
|
627
|
-
| **Chat** | AI assistant that can answer questions about your session data (RAG-powered) |
|
|
628
|
-
| **Connections** | Connect/disconnect AI coding tools (Codex, Copilot, Cursor, Windsurf) |
|
|
629
|
-
| **Settings** | Configure the AI chat provider (Ollama or Anthropic) |
|
|
630
|
-
|
|
631
|
-
### Running the GUI
|
|
632
|
-
|
|
633
|
-
```bash
|
|
634
|
-
# Terminal 1: API server
|
|
635
|
-
source .venv/bin/activate
|
|
636
|
-
spooling serve
|
|
637
|
-
|
|
638
|
-
# Terminal 2: Next.js dev server
|
|
639
|
-
cd ui
|
|
640
|
-
npm run dev
|
|
641
|
-
```
|
|
642
|
-
|
|
643
|
-
Or use `spooling ui` to start both at once.
|
|
644
|
-
|
|
645
|
-
---
|
|
646
|
-
|
|
647
|
-
## Chat Agent Setup
|
|
648
|
-
|
|
649
|
-
The chat page lets you ask questions about your coding sessions in natural language. It uses RAG — retrieves relevant context from the local database before answering.
|
|
650
|
-
|
|
651
|
-
### Option A: Ollama (free, local)
|
|
652
|
-
|
|
653
|
-
```bash
|
|
654
|
-
# Install Ollama
|
|
655
|
-
brew install ollama
|
|
656
|
-
|
|
657
|
-
# Start the server
|
|
658
|
-
ollama serve
|
|
659
|
-
|
|
660
|
-
# Pull a model
|
|
661
|
-
ollama pull gemma3:4b
|
|
662
|
-
```
|
|
663
|
-
|
|
664
|
-
Go to **Settings** in the GUI and select Ollama. The model will auto-detect.
|
|
665
|
-
|
|
666
|
-
### Option B: Anthropic API (bring your own key)
|
|
667
|
-
|
|
668
|
-
Go to **Settings** in the GUI, select Anthropic, and paste your API key from [console.anthropic.com](https://console.anthropic.com).
|
|
669
|
-
|
|
670
|
-
Available models: Sonnet, Haiku, Opus.
|
|
671
|
-
|
|
672
|
-
---
|
|
673
|
-
|
|
674
635
|
## Architecture
|
|
675
636
|
|
|
676
637
|
```
|
|
@@ -693,12 +654,6 @@ spooling/
|
|
|
693
654
|
│ ├── agent.py # Chat agent (Ollama + Anthropic)
|
|
694
655
|
│ ├── tunnel.py # Cloudflare quick tunnel support
|
|
695
656
|
│ └── server.py # FastAPI API server
|
|
696
|
-
└── ui/ # Next.js frontend (source repo only)
|
|
697
|
-
├── next.config.js # API proxy to :3002
|
|
698
|
-
└── src/
|
|
699
|
-
├── components/ # shadcn/ui components
|
|
700
|
-
├── lib/ # API helpers
|
|
701
|
-
└── app/(app)/ # Pages (dashboard, sessions, search, etc.)
|
|
702
657
|
```
|
|
703
658
|
|
|
704
659
|
### Stack
|
|
@@ -709,7 +664,6 @@ spooling/
|
|
|
709
664
|
| Embeddings | sentence-transformers / all-MiniLM-L6-v2 (local) |
|
|
710
665
|
| Search | numpy cosine similarity |
|
|
711
666
|
| Backend | Python, FastAPI, Click |
|
|
712
|
-
| Frontend | Next.js 14, shadcn/ui, Tailwind CSS, AG Charts |
|
|
713
667
|
| Chat AI | Ollama (local) or Anthropic API |
|
|
714
668
|
|
|
715
669
|
### Ports
|
|
@@ -717,7 +671,6 @@ spooling/
|
|
|
717
671
|
| Service | Port |
|
|
718
672
|
|---------|------|
|
|
719
673
|
| API Server | 3002 |
|
|
720
|
-
| GUI | 3003 |
|
|
721
674
|
| MCP Server (streamable-HTTP) | 3004 |
|
|
722
675
|
|
|
723
676
|
---
|
|
@@ -731,8 +684,7 @@ All optional — defaults work out of the box.
|
|
|
731
684
|
| `SPOOLING_DB` | `~/.local/share/spooling/spooling.db` | Path to the SQLite database file (`%APPDATA%\spooling\spooling.db` on Windows) |
|
|
732
685
|
| `SPOOLING_EMBEDDING_MODEL` | `all-MiniLM-L6-v2` | Sentence transformer model |
|
|
733
686
|
| `SPOOLING_UI_HOST` | `127.0.0.1` | API server host |
|
|
734
|
-
| `
|
|
735
|
-
| `ANTHROPIC_API_KEY` | - | Anthropic API key (alternative to setting in the GUI) |
|
|
687
|
+
| `ANTHROPIC_API_KEY` | - | Anthropic API key (required for Anthropic-backed features) |
|
|
736
688
|
|
|
737
689
|
---
|
|
738
690
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "spooling"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.0"
|
|
4
4
|
description = "Local session tracker and semantic search for AI coding assistants"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [{ name = "Parsed Analytics, Inc." }]
|
|
@@ -17,7 +17,6 @@ dependencies = [
|
|
|
17
17
|
"numpy>=1.24",
|
|
18
18
|
"fastapi>=0.111",
|
|
19
19
|
"uvicorn[standard]>=0.30",
|
|
20
|
-
"jinja2>=3.1",
|
|
21
20
|
"watchdog>=4.0",
|
|
22
21
|
"rich>=13.0",
|
|
23
22
|
"httpx>=0.27",
|
|
@@ -50,7 +50,7 @@ def init():
|
|
|
50
50
|
available = provider.is_available()
|
|
51
51
|
status = "[green]available[/green]" if available else "[dim]not found[/dim]"
|
|
52
52
|
if provider.is_remote:
|
|
53
|
-
path_str = "[dim](remote API
|
|
53
|
+
path_str = "[dim](remote API)[/dim]"
|
|
54
54
|
else:
|
|
55
55
|
if available:
|
|
56
56
|
files = provider.discover_session_files()
|
|
@@ -336,7 +336,6 @@ def serve(host, port):
|
|
|
336
336
|
h = host or UI_HOST
|
|
337
337
|
p = port or 3002
|
|
338
338
|
console.print(f"[bold]Spooling API[/bold] at http://{h}:{p}")
|
|
339
|
-
console.print("Start the UI with: [bold]cd ui && npm run dev[/bold]")
|
|
340
339
|
uvicorn.run(app, host=h, port=p, log_level="warning")
|
|
341
340
|
|
|
342
341
|
|
|
@@ -1028,53 +1027,6 @@ def _check_ollama_preflight() -> None:
|
|
|
1028
1027
|
)
|
|
1029
1028
|
|
|
1030
1029
|
|
|
1031
|
-
@cli.command()
|
|
1032
|
-
def ui():
|
|
1033
|
-
"""Launch the API server, MCP HTTP server, and Next.js UI together."""
|
|
1034
|
-
import subprocess
|
|
1035
|
-
import os
|
|
1036
|
-
import sys
|
|
1037
|
-
|
|
1038
|
-
ui_dir = (
|
|
1039
|
-
os.environ.get("SPOOLING_UI_DIR")
|
|
1040
|
-
or os.path.join(os.path.dirname(os.path.dirname(__file__)), "ui")
|
|
1041
|
-
)
|
|
1042
|
-
if not os.path.isdir(ui_dir):
|
|
1043
|
-
ui_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "ui")
|
|
1044
|
-
if not os.path.isdir(ui_dir):
|
|
1045
|
-
ui_dir = os.path.join(os.path.expanduser("~"), "spooling", "ui")
|
|
1046
|
-
if not os.path.isdir(ui_dir):
|
|
1047
|
-
ui_dir = os.path.join(os.getcwd(), "ui")
|
|
1048
|
-
if not os.path.isdir(ui_dir):
|
|
1049
|
-
console.print("[red]UI directory not found. Set SPOOLING_UI_DIR or run from the repo root.[/red]")
|
|
1050
|
-
raise SystemExit(1)
|
|
1051
|
-
|
|
1052
|
-
console.print("[bold]Starting Spooling...[/bold]")
|
|
1053
|
-
console.print(" API: http://127.0.0.1:3002")
|
|
1054
|
-
console.print(" MCP: http://127.0.0.1:3004/mcp")
|
|
1055
|
-
console.print(" UI: http://localhost:3003")
|
|
1056
|
-
|
|
1057
|
-
# Preflight: warn if Ollama is down — otherwise chat + judge will fail
|
|
1058
|
-
# silently with "All connection attempts failed" from httpx.
|
|
1059
|
-
_check_ollama_preflight()
|
|
1060
|
-
|
|
1061
|
-
api_proc = subprocess.Popen(
|
|
1062
|
-
[sys.executable, "-m", "uvicorn", "spooling.server:app", "--host", "127.0.0.1", "--port", "3002", "--log-level", "warning"],
|
|
1063
|
-
)
|
|
1064
|
-
|
|
1065
|
-
mcp_proc = subprocess.Popen(
|
|
1066
|
-
[sys.executable, "-m", "spooling.mcp_server"],
|
|
1067
|
-
)
|
|
1068
|
-
|
|
1069
|
-
try:
|
|
1070
|
-
subprocess.run(["npm", "run", "dev"], cwd=ui_dir)
|
|
1071
|
-
except KeyboardInterrupt:
|
|
1072
|
-
pass
|
|
1073
|
-
finally:
|
|
1074
|
-
api_proc.terminate()
|
|
1075
|
-
mcp_proc.terminate()
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
1030
|
from spooling.cloud import cloud as _cloud_group, push as _push_cmd
|
|
1079
1031
|
cli.add_command(_cloud_group)
|
|
1080
1032
|
cli.add_command(_push_cmd)
|
|
@@ -171,9 +171,23 @@ def _explain_error_impl(e: BaseException, base: str) -> str:
|
|
|
171
171
|
return escape(str(e) or type(e).__name__)
|
|
172
172
|
|
|
173
173
|
|
|
174
|
+
# Stable first words of the 402 explanation, so `watch` can tell "workspace is full" from a real failure.
|
|
175
|
+
PLAN_LIMIT = "Free plan limit reached"
|
|
176
|
+
|
|
177
|
+
|
|
174
178
|
def _explain_http(e: "httpx.HTTPStatusError") -> str:
|
|
175
179
|
code = e.response.status_code
|
|
176
180
|
body = escape(e.response.text[:200])
|
|
181
|
+
if code == 402:
|
|
182
|
+
try:
|
|
183
|
+
detail = e.response.json().get("detail")
|
|
184
|
+
except Exception: # noqa: BLE001 - a proxy's HTML page, an empty body...
|
|
185
|
+
detail = None
|
|
186
|
+
return (
|
|
187
|
+
f"{PLAN_LIMIT}: this workspace can't take more on the Free plan.\n"
|
|
188
|
+
f" {escape(str(detail)) if detail else body}\n"
|
|
189
|
+
f" Nothing already pushed was removed; the rest of this push was not sent."
|
|
190
|
+
)
|
|
177
191
|
if code == 401:
|
|
178
192
|
return (
|
|
179
193
|
f"HTTP 401: the server rejected your API key.\n"
|
|
@@ -927,6 +941,7 @@ def cloud_watch(interval: int, limit: int, batch: int, lookback: int, no_redact:
|
|
|
927
941
|
|
|
928
942
|
console.print(f"[cyan]Watching local sessions → {base}[/cyan]")
|
|
929
943
|
console.print(f" interval: {interval}s · lookback: {lookback}m · starting watermark: {watermark or 'none (full first push)'}")
|
|
944
|
+
limit_warned = False
|
|
930
945
|
|
|
931
946
|
while not stop["flag"]:
|
|
932
947
|
cycle_started = datetime.now(timezone.utc)
|
|
@@ -954,9 +969,18 @@ def cloud_watch(interval: int, limit: int, batch: int, lookback: int, no_redact:
|
|
|
954
969
|
if redaction_count:
|
|
955
970
|
console.print(f" [dim]Redacted {redaction_count} secret(s) before push[/dim]")
|
|
956
971
|
total, rejected, err = _push_batches(sessions, batch, base, headers, console.print)
|
|
957
|
-
if err:
|
|
972
|
+
if err and err.startswith(PLAN_LIMIT):
|
|
973
|
+
# A full workspace will not fix itself, so say it clearly once and then stay quiet instead of repeating it.
|
|
974
|
+
if not limit_warned:
|
|
975
|
+
console.print(f"[red]{err}[/red]")
|
|
976
|
+
console.print(" [dim]Watch keeps running and tries again each cycle, so it resumes as soon as you upgrade or free some space.[/dim]")
|
|
977
|
+
limit_warned = True
|
|
978
|
+
else:
|
|
979
|
+
console.print(f"[dim]{ts}[/dim] [yellow]still at the Free plan limit; nothing was sent[/yellow]")
|
|
980
|
+
elif err:
|
|
958
981
|
console.print(f"[red]{err.splitlines()[0]}[/red] (will retry next cycle)")
|
|
959
982
|
else:
|
|
983
|
+
limit_warned = False
|
|
960
984
|
# Advance watermark to the cycle start; the lookback window catches
|
|
961
985
|
# sessions whose started_at slid backwards or whose messages were
|
|
962
986
|
# appended after the original started_at.
|
|
@@ -521,7 +521,7 @@ def sync(embed: bool = True, provider_filter: str | None = None, reparse: bool =
|
|
|
521
521
|
connected = [p for p in connected if p["type"] == provider_filter]
|
|
522
522
|
|
|
523
523
|
if not connected:
|
|
524
|
-
console.print("[yellow]No providers to sync. Run 'spooling init' to see what's detected locally
|
|
524
|
+
console.print("[yellow]No providers to sync. Run 'spooling init' to see what's detected locally.[/yellow]")
|
|
525
525
|
conn.close()
|
|
526
526
|
return
|
|
527
527
|
|
|
@@ -5,7 +5,6 @@ import re
|
|
|
5
5
|
|
|
6
6
|
from fastapi import FastAPI, Query
|
|
7
7
|
from fastapi.responses import JSONResponse
|
|
8
|
-
from fastapi.middleware.cors import CORSMiddleware
|
|
9
8
|
from pydantic import BaseModel
|
|
10
9
|
|
|
11
10
|
from spooling.stats import get_overview, get_daily_stats, get_session_detail, get_provider_breakdown
|
|
@@ -20,14 +19,6 @@ from datetime import datetime
|
|
|
20
19
|
|
|
21
20
|
app = FastAPI(title="Spooling", version="0.1.0")
|
|
22
21
|
|
|
23
|
-
app.add_middleware(
|
|
24
|
-
CORSMiddleware,
|
|
25
|
-
allow_origins=["http://localhost:3003", "http://127.0.0.1:3003"],
|
|
26
|
-
allow_credentials=True,
|
|
27
|
-
allow_methods=["*"],
|
|
28
|
-
allow_headers=["*"],
|
|
29
|
-
)
|
|
30
|
-
|
|
31
22
|
|
|
32
23
|
# --- Overview / Stats ---
|
|
33
24
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spooling
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Local session tracker and semantic search for AI coding assistants
|
|
5
5
|
Author: Parsed Analytics, Inc.
|
|
6
6
|
License: MIT
|
|
@@ -15,7 +15,6 @@ Requires-Dist: sentence-transformers>=3.0
|
|
|
15
15
|
Requires-Dist: numpy>=1.24
|
|
16
16
|
Requires-Dist: fastapi>=0.111
|
|
17
17
|
Requires-Dist: uvicorn[standard]>=0.30
|
|
18
|
-
Requires-Dist: jinja2>=3.1
|
|
19
18
|
Requires-Dist: watchdog>=4.0
|
|
20
19
|
Requires-Dist: rich>=13.0
|
|
21
20
|
Requires-Dist: httpx>=0.27
|
|
@@ -38,7 +37,7 @@ Dynamic: license-file
|
|
|
38
37
|
|
|
39
38
|
Local session tracker and semantic search for AI coding assistants.
|
|
40
39
|
|
|
41
|
-
Track your AI coding sessions across **Claude Code**, **OpenAI Codex CLI**, **GitHub Copilot**, **Cursor**, **Windsurf**, **Kiro**, **Google Antigravity**, and **opencode**, all in one place. Get usage stats, cost estimates, per-provider breakdowns, semantic search,
|
|
40
|
+
Track your AI coding sessions across **Claude Code**, **OpenAI Codex CLI**, **GitHub Copilot**, **Cursor**, **Windsurf**, **Kiro**, **Google Antigravity**, and **opencode**, all in one place. Get usage stats, cost estimates, per-provider breakdowns, semantic search, to explore your history.
|
|
42
41
|
|
|
43
42
|
**Website:** [spooling.ai](https://spooling.ai)
|
|
44
43
|
|
|
@@ -48,7 +47,7 @@ Track your AI coding sessions across **Claude Code**, **OpenAI Codex CLI**, **Gi
|
|
|
48
47
|
|
|
49
48
|
- **Python 3.11+**
|
|
50
49
|
- **pipx** or **uv** (optional, alternative install methods)
|
|
51
|
-
- **Ollama** (optional, for free local
|
|
50
|
+
- **Ollama** (optional, for free local LLM features) or an **Anthropic API key**
|
|
52
51
|
|
|
53
52
|
No Docker, no PostgreSQL, no Node.js required.
|
|
54
53
|
|
|
@@ -119,7 +118,7 @@ curl -s http://127.0.0.1:3004/mcp \
|
|
|
119
118
|
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | jq
|
|
120
119
|
```
|
|
121
120
|
|
|
122
|
-
Should return the tools listed under [Tools exposed](#tools-exposed). If you get "connection refused", `spooling mcp`
|
|
121
|
+
Should return the tools listed under [Tools exposed](#tools-exposed). If you get "connection refused", `spooling mcp` is not running, or something else is using port 3004. Find it with `lsof -i :3004`.
|
|
123
122
|
|
|
124
123
|
---
|
|
125
124
|
|
|
@@ -271,6 +270,22 @@ spooling summarize --backend opencode --model amazon-bedrock/us.anthropic.claude
|
|
|
271
270
|
- `--force` - regenerate even if a summary exists
|
|
272
271
|
- `-y, --yes` - don't ask before sending text to a non-local endpoint
|
|
273
272
|
|
|
273
|
+
#### Summarize one session
|
|
274
|
+
|
|
275
|
+
Name the session by its id (or any unique prefix) and pick the backend:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
spooling session list --title login # find the id first
|
|
279
|
+
spooling summarize ses_e6310bd1 --backend claude-code
|
|
280
|
+
spooling summarize ses_e6310bd1 --backend claude-code --ssh my-other-mac
|
|
281
|
+
spooling session show ses_e6310bd1 # read it back
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
- If the session already has a summary, nothing runs. Add `--force` to replace it, including a summary the provider wrote.
|
|
285
|
+
- Naming a session skips the `--min-messages` filter, so short sessions work too. You can name several: `spooling summarize ID1 ID2 --backend claude-code`.
|
|
286
|
+
- `--dry-run` shows what would run without calling a model, and `-y` skips the confirmation prompt.
|
|
287
|
+
- To avoid typing the backend each time, `export SPOOLING_SUMMARY_BACKEND=claude-code`. There is no environment variable for `--ssh`.
|
|
288
|
+
|
|
274
289
|
#### Using Claude Code or opencode
|
|
275
290
|
|
|
276
291
|
The `claude-code` and `opencode` backends run the agent's headless mode and send the prompt on stdin, so there is no API key to set up: they use whatever login the agent already has. Both send the redacted transcript to that agent's provider, so Spooling asks for confirmation first.
|
|
@@ -308,20 +323,11 @@ spooling serve --port 8080 # Custom port
|
|
|
308
323
|
spooling serve --host 0.0.0.0 # Bind to all interfaces
|
|
309
324
|
```
|
|
310
325
|
|
|
311
|
-
### `spooling ui`
|
|
312
|
-
|
|
313
|
-
Start the API server, the MCP HTTP server, and the Next.js UI together. Requires the `ui/` directory from the [source repo](https://github.com/sashimiboi/spooling) to be present. Set `SPOOLING_UI_DIR` to point at it if running from a non-standard location.
|
|
314
|
-
|
|
315
|
-
```bash
|
|
316
|
-
spooling ui # API :3002 · MCP :3004 · GUI :3003
|
|
317
|
-
```
|
|
318
|
-
|
|
319
326
|
### `spooling mcp`
|
|
320
327
|
|
|
321
328
|
Start the Spooling MCP server on its own. Defaults to streamable-HTTP at
|
|
322
329
|
`http://127.0.0.1:3004/mcp`, which any MCP-compatible agent can connect to
|
|
323
|
-
by URL.
|
|
324
|
-
need to run it directly when you want the MCP server without the GUI.
|
|
330
|
+
by URL.
|
|
325
331
|
|
|
326
332
|
```bash
|
|
327
333
|
spooling mcp # streamable-HTTP at http://127.0.0.1:3004/mcp (default)
|
|
@@ -471,6 +477,21 @@ spooling push --dry-run # show what would be pushed
|
|
|
471
477
|
|
|
472
478
|
`push` ingests new provider sessions into the local database before uploading, so you don't need to run `spooling sync` first. The server upserts by session id, so re-running is safe.
|
|
473
479
|
|
|
480
|
+
#### When a Free workspace is full
|
|
481
|
+
|
|
482
|
+
The Free plan caps each workspace (200 sessions, 25,000 messages, 5,000 traces). When a push would go past a cap the server answers
|
|
483
|
+
`402`, and `spooling push` stops with a clear message and a non-zero exit code:
|
|
484
|
+
|
|
485
|
+
```
|
|
486
|
+
Free plan limit reached: this workspace can't take more on the Free plan.
|
|
487
|
+
The Free plan allows 200 sessions per workspace. Delete old ones with `spooling cloud delete`, or upgrade at https://app.spooling.ai/settings?tab=billing
|
|
488
|
+
Nothing already pushed was removed; the rest of this push was not sent.
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
Nothing you have already pushed is removed, and sessions already in the workspace can still be updated by a batch that adds no new
|
|
492
|
+
ones. Free space with `spooling cloud delete`, or upgrade from the link. `spooling cloud watch` shows the message once and then a
|
|
493
|
+
short "still at the Free plan limit" line each cycle, and carries on automatically once there is room.
|
|
494
|
+
|
|
474
495
|
### Push only some sessions, or to a specific team
|
|
475
496
|
|
|
476
497
|
**Which team gets the sessions** is decided by the API key you are logged in with. Each key belongs to one workspace (personal or a team), and `spooling push` sends to that workspace. Mint a key for the team in the app, then log in with it:
|
|
@@ -553,7 +574,7 @@ curl -s "https://api.spooling.ai/v1/search?q=migration&limit=10" \
|
|
|
553
574
|
-H "Authorization: Bearer $SPOOLING_KEY"
|
|
554
575
|
```
|
|
555
576
|
|
|
556
|
-
**Important**: `app.spooling.ai` is the
|
|
577
|
+
**Important**: `app.spooling.ai` is the hosted web app. For API access, use `api.spooling.ai` directly.
|
|
557
578
|
|
|
558
579
|
### Status / logout
|
|
559
580
|
|
|
@@ -597,8 +618,7 @@ launchctl load ~/Library/LaunchAgents/ai.spooling.cloud-watch.plist
|
|
|
597
618
|
|
|
598
619
|
Spooling exposes an MCP server so any AI agent can query your session history
|
|
599
620
|
as a context source. The server runs over **streamable-HTTP** at
|
|
600
|
-
`http://127.0.0.1:3004/mcp` and is started
|
|
601
|
-
ui`.
|
|
621
|
+
`http://127.0.0.1:3004/mcp` and is started with `spooling mcp`.
|
|
602
622
|
|
|
603
623
|
Drop this into your MCP client config (`~/.mcp.json`, Cursor,
|
|
604
624
|
Codex, or any other streamable-HTTP capable agent):
|
|
@@ -615,9 +635,6 @@ Codex, or any other streamable-HTTP capable agent):
|
|
|
615
635
|
|
|
616
636
|
Or register it with an MCP client's config file.
|
|
617
637
|
|
|
618
|
-
The **Settings** page in the GUI shows the endpoint URL, a copy button, and
|
|
619
|
-
the full config snippet so you don't have to remember it.
|
|
620
|
-
|
|
621
638
|
### Tools exposed
|
|
622
639
|
|
|
623
640
|
| Tool | Purpose |
|
|
@@ -650,63 +667,6 @@ it with the command-based form:
|
|
|
650
667
|
|
|
651
668
|
---
|
|
652
669
|
|
|
653
|
-
## GUI
|
|
654
|
-
|
|
655
|
-
The Spooling GUI runs on **http://localhost:3003** and includes:
|
|
656
|
-
|
|
657
|
-
| Page | Description |
|
|
658
|
-
|------|-------------|
|
|
659
|
-
| **Dashboard** | Overview stats, per-provider breakdown, daily activity chart, projects, top tools, recent sessions |
|
|
660
|
-
| **Sessions** | Browse all sessions with provider labels, filtering, click into any session for full conversation view |
|
|
661
|
-
| **Search** | Semantic search across all session history with similarity scores |
|
|
662
|
-
| **Analytics** | Charts for daily usage, cost trends, token usage, tool distribution, filterable by provider (AG Charts) |
|
|
663
|
-
| **Chat** | AI assistant that can answer questions about your session data (RAG-powered) |
|
|
664
|
-
| **Connections** | Connect/disconnect AI coding tools (Codex, Copilot, Cursor, Windsurf) |
|
|
665
|
-
| **Settings** | Configure the AI chat provider (Ollama or Anthropic) |
|
|
666
|
-
|
|
667
|
-
### Running the GUI
|
|
668
|
-
|
|
669
|
-
```bash
|
|
670
|
-
# Terminal 1: API server
|
|
671
|
-
source .venv/bin/activate
|
|
672
|
-
spooling serve
|
|
673
|
-
|
|
674
|
-
# Terminal 2: Next.js dev server
|
|
675
|
-
cd ui
|
|
676
|
-
npm run dev
|
|
677
|
-
```
|
|
678
|
-
|
|
679
|
-
Or use `spooling ui` to start both at once.
|
|
680
|
-
|
|
681
|
-
---
|
|
682
|
-
|
|
683
|
-
## Chat Agent Setup
|
|
684
|
-
|
|
685
|
-
The chat page lets you ask questions about your coding sessions in natural language. It uses RAG — retrieves relevant context from the local database before answering.
|
|
686
|
-
|
|
687
|
-
### Option A: Ollama (free, local)
|
|
688
|
-
|
|
689
|
-
```bash
|
|
690
|
-
# Install Ollama
|
|
691
|
-
brew install ollama
|
|
692
|
-
|
|
693
|
-
# Start the server
|
|
694
|
-
ollama serve
|
|
695
|
-
|
|
696
|
-
# Pull a model
|
|
697
|
-
ollama pull gemma3:4b
|
|
698
|
-
```
|
|
699
|
-
|
|
700
|
-
Go to **Settings** in the GUI and select Ollama. The model will auto-detect.
|
|
701
|
-
|
|
702
|
-
### Option B: Anthropic API (bring your own key)
|
|
703
|
-
|
|
704
|
-
Go to **Settings** in the GUI, select Anthropic, and paste your API key from [console.anthropic.com](https://console.anthropic.com).
|
|
705
|
-
|
|
706
|
-
Available models: Sonnet, Haiku, Opus.
|
|
707
|
-
|
|
708
|
-
---
|
|
709
|
-
|
|
710
670
|
## Architecture
|
|
711
671
|
|
|
712
672
|
```
|
|
@@ -729,12 +689,6 @@ spooling/
|
|
|
729
689
|
│ ├── agent.py # Chat agent (Ollama + Anthropic)
|
|
730
690
|
│ ├── tunnel.py # Cloudflare quick tunnel support
|
|
731
691
|
│ └── server.py # FastAPI API server
|
|
732
|
-
└── ui/ # Next.js frontend (source repo only)
|
|
733
|
-
├── next.config.js # API proxy to :3002
|
|
734
|
-
└── src/
|
|
735
|
-
├── components/ # shadcn/ui components
|
|
736
|
-
├── lib/ # API helpers
|
|
737
|
-
└── app/(app)/ # Pages (dashboard, sessions, search, etc.)
|
|
738
692
|
```
|
|
739
693
|
|
|
740
694
|
### Stack
|
|
@@ -745,7 +699,6 @@ spooling/
|
|
|
745
699
|
| Embeddings | sentence-transformers / all-MiniLM-L6-v2 (local) |
|
|
746
700
|
| Search | numpy cosine similarity |
|
|
747
701
|
| Backend | Python, FastAPI, Click |
|
|
748
|
-
| Frontend | Next.js 14, shadcn/ui, Tailwind CSS, AG Charts |
|
|
749
702
|
| Chat AI | Ollama (local) or Anthropic API |
|
|
750
703
|
|
|
751
704
|
### Ports
|
|
@@ -753,7 +706,6 @@ spooling/
|
|
|
753
706
|
| Service | Port |
|
|
754
707
|
|---------|------|
|
|
755
708
|
| API Server | 3002 |
|
|
756
|
-
| GUI | 3003 |
|
|
757
709
|
| MCP Server (streamable-HTTP) | 3004 |
|
|
758
710
|
|
|
759
711
|
---
|
|
@@ -767,8 +719,7 @@ All optional — defaults work out of the box.
|
|
|
767
719
|
| `SPOOLING_DB` | `~/.local/share/spooling/spooling.db` | Path to the SQLite database file (`%APPDATA%\spooling\spooling.db` on Windows) |
|
|
768
720
|
| `SPOOLING_EMBEDDING_MODEL` | `all-MiniLM-L6-v2` | Sentence transformer model |
|
|
769
721
|
| `SPOOLING_UI_HOST` | `127.0.0.1` | API server host |
|
|
770
|
-
| `
|
|
771
|
-
| `ANTHROPIC_API_KEY` | - | Anthropic API key (alternative to setting in the GUI) |
|
|
722
|
+
| `ANTHROPIC_API_KEY` | - | Anthropic API key (required for Anthropic-backed features) |
|
|
772
723
|
|
|
773
724
|
---
|
|
774
725
|
|
|
@@ -28,7 +28,7 @@ class _Handler(BaseHTTPRequestHandler):
|
|
|
28
28
|
|
|
29
29
|
def _go(self):
|
|
30
30
|
type(self).seen.append(f"{self.command} {self.path}")
|
|
31
|
-
payload = json.dumps(type(self).body if type(self).status == 200 else {"detail": "nope"}).encode()
|
|
31
|
+
payload = json.dumps(type(self).body if type(self).status == 200 else getattr(type(self), "error_body", {"detail": "nope"})).encode()
|
|
32
32
|
self.send_response(type(self).status)
|
|
33
33
|
if type(self).status == 429:
|
|
34
34
|
self.send_header("Retry-After", "42")
|
|
@@ -194,6 +194,28 @@ def test_push_success_exits_zero(logged_in, server, monkeypatch):
|
|
|
194
194
|
assert "POST /v1/sessions/batch" in server.handler.seen
|
|
195
195
|
|
|
196
196
|
|
|
197
|
+
FULL = {"detail": "The Free plan allows 200 sessions per workspace. Delete old ones with `spooling cloud delete`, or upgrade at https://app.spooling.ai/settings?tab=billing"}
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
def test_a_full_free_workspace_gets_a_clear_message_and_a_nonzero_exit(logged_in, server, monkeypatch):
|
|
201
|
+
server.handler.status, server.handler.error_body = 402, FULL
|
|
202
|
+
logged_in(server.url)
|
|
203
|
+
monkeypatch.setattr(cloud, "_collect_sessions", lambda **k: one_session())
|
|
204
|
+
r = run("push", "--no-sync")
|
|
205
|
+
assert r.exit_code == 1 and "Done." not in r.output
|
|
206
|
+
assert cloud.PLAN_LIMIT in r.output
|
|
207
|
+
assert "settings?tab=billing" in r.output and "spooling cloud delete" in r.output # the server's own words, not raw JSON
|
|
208
|
+
assert "Nothing already pushed was removed" in r.output
|
|
209
|
+
assert '{"detail"' not in r.output
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
def test_a_402_without_json_still_explains_itself():
|
|
213
|
+
req = httpx.Request("POST", "http://x/v1/sessions/batch")
|
|
214
|
+
e = httpx.HTTPStatusError("402", request=req, response=httpx.Response(402, text="<html>Payment Required</html>", request=req))
|
|
215
|
+
msg = cloud._explain_http(e)
|
|
216
|
+
assert msg.startswith(cloud.PLAN_LIMIT) and "Payment Required" in msg
|
|
217
|
+
|
|
218
|
+
|
|
197
219
|
@pytest.mark.parametrize("status", [401, 500])
|
|
198
220
|
def test_push_server_error_exits_nonzero(logged_in, server, monkeypatch, status):
|
|
199
221
|
server.handler.status = status
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|