spooling 0.1.3__tar.gz → 0.1.5__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.
Files changed (54) hide show
  1. spooling-0.1.5/PKG-INFO +523 -0
  2. {spooling-0.1.3 → spooling-0.1.5}/README.md +17 -0
  3. {spooling-0.1.3 → spooling-0.1.5}/pyproject.toml +2 -1
  4. {spooling-0.1.3 → spooling-0.1.5}/spooling/cli.py +236 -0
  5. {spooling-0.1.3 → spooling-0.1.5}/spooling/config.py +1 -1
  6. {spooling-0.1.3 → spooling-0.1.5}/spooling/server.py +59 -0
  7. spooling-0.1.5/spooling/stats.py +563 -0
  8. spooling-0.1.5/spooling.egg-info/PKG-INFO +523 -0
  9. spooling-0.1.3/PKG-INFO +0 -28
  10. spooling-0.1.3/spooling/stats.py +0 -180
  11. spooling-0.1.3/spooling.egg-info/PKG-INFO +0 -28
  12. {spooling-0.1.3 → spooling-0.1.5}/LICENSE +0 -0
  13. {spooling-0.1.3 → spooling-0.1.5}/setup.cfg +0 -0
  14. {spooling-0.1.3 → spooling-0.1.5}/spooling/__init__.py +0 -0
  15. {spooling-0.1.3 → spooling-0.1.5}/spooling/agent.py +0 -0
  16. {spooling-0.1.3 → spooling-0.1.5}/spooling/classifiers.py +0 -0
  17. {spooling-0.1.3 → spooling-0.1.5}/spooling/cloud.py +0 -0
  18. {spooling-0.1.3 → spooling-0.1.5}/spooling/db.py +0 -0
  19. {spooling-0.1.3 → spooling-0.1.5}/spooling/embeddings.py +0 -0
  20. {spooling-0.1.3 → spooling-0.1.5}/spooling/evals.py +0 -0
  21. {spooling-0.1.3 → spooling-0.1.5}/spooling/experiments.py +0 -0
  22. {spooling-0.1.3 → spooling-0.1.5}/spooling/ingest.py +0 -0
  23. {spooling-0.1.3 → spooling-0.1.5}/spooling/mcp_server.py +0 -0
  24. {spooling-0.1.3 → spooling-0.1.5}/spooling/parser.py +0 -0
  25. {spooling-0.1.3 → spooling-0.1.5}/spooling/pricing.py +0 -0
  26. {spooling-0.1.3 → spooling-0.1.5}/spooling/providers/__init__.py +0 -0
  27. {spooling-0.1.3 → spooling-0.1.5}/spooling/providers/antigravity.py +0 -0
  28. {spooling-0.1.3 → spooling-0.1.5}/spooling/providers/base.py +0 -0
  29. {spooling-0.1.3 → spooling-0.1.5}/spooling/providers/codex.py +0 -0
  30. {spooling-0.1.3 → spooling-0.1.5}/spooling/providers/copilot.py +0 -0
  31. {spooling-0.1.3 → spooling-0.1.5}/spooling/providers/cortex_code.py +0 -0
  32. {spooling-0.1.3 → spooling-0.1.5}/spooling/providers/cursor.py +0 -0
  33. {spooling-0.1.3 → spooling-0.1.5}/spooling/providers/gemini.py +0 -0
  34. {spooling-0.1.3 → spooling-0.1.5}/spooling/providers/github.py +0 -0
  35. {spooling-0.1.3 → spooling-0.1.5}/spooling/providers/gitlab.py +0 -0
  36. {spooling-0.1.3 → spooling-0.1.5}/spooling/providers/kiro.py +0 -0
  37. {spooling-0.1.3 → spooling-0.1.5}/spooling/providers/opencode.py +0 -0
  38. {spooling-0.1.3 → spooling-0.1.5}/spooling/providers/session_file.py +0 -0
  39. {spooling-0.1.3 → spooling-0.1.5}/spooling/providers/windsurf.py +0 -0
  40. {spooling-0.1.3 → spooling-0.1.5}/spooling/redact.py +0 -0
  41. {spooling-0.1.3 → spooling-0.1.5}/spooling/remote_otel.py +0 -0
  42. {spooling-0.1.3 → spooling-0.1.5}/spooling/sdk.py +0 -0
  43. {spooling-0.1.3 → spooling-0.1.5}/spooling/search.py +0 -0
  44. {spooling-0.1.3 → spooling-0.1.5}/spooling/subscription_pricing.py +0 -0
  45. {spooling-0.1.3 → spooling-0.1.5}/spooling/tracing.py +0 -0
  46. {spooling-0.1.3 → spooling-0.1.5}/spooling/watcher.py +0 -0
  47. {spooling-0.1.3 → spooling-0.1.5}/spooling.egg-info/SOURCES.txt +0 -0
  48. {spooling-0.1.3 → spooling-0.1.5}/spooling.egg-info/dependency_links.txt +0 -0
  49. {spooling-0.1.3 → spooling-0.1.5}/spooling.egg-info/entry_points.txt +0 -0
  50. {spooling-0.1.3 → spooling-0.1.5}/spooling.egg-info/requires.txt +0 -0
  51. {spooling-0.1.3 → spooling-0.1.5}/spooling.egg-info/top_level.txt +0 -0
  52. {spooling-0.1.3 → spooling-0.1.5}/tests/test_parser.py +0 -0
  53. {spooling-0.1.3 → spooling-0.1.5}/tests/test_pricing.py +0 -0
  54. {spooling-0.1.3 → spooling-0.1.5}/tests/test_redact.py +0 -0
@@ -0,0 +1,523 @@
1
+ Metadata-Version: 2.4
2
+ Name: spooling
3
+ Version: 0.1.5
4
+ Summary: Local session tracker and semantic search for AI coding assistants
5
+ Author: Parsed Analytics, Inc.
6
+ License-Expression: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.11
9
+ Classifier: Programming Language :: Python :: 3.12
10
+ Requires-Python: >=3.11
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: click>=8.1
14
+ Requires-Dist: psycopg[binary]>=3.1
15
+ Requires-Dist: sentence-transformers>=3.0
16
+ Requires-Dist: fastapi>=0.111
17
+ Requires-Dist: uvicorn[standard]>=0.30
18
+ Requires-Dist: jinja2>=3.1
19
+ Requires-Dist: watchdog>=4.0
20
+ Requires-Dist: rich>=13.0
21
+ Requires-Dist: httpx>=0.27
22
+ Requires-Dist: anthropic>=0.40
23
+ Requires-Dist: strands-agents[ollama]>=1.35
24
+ Requires-Dist: strands-agents-evals>=0.1
25
+ Requires-Dist: mcp>=1.27
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest>=8.0; extra == "dev"
28
+ Requires-Dist: pytest-mock>=3.14; extra == "dev"
29
+ Dynamic: license-file
30
+
31
+ # Spooling
32
+
33
+ Local session tracker and semantic search for AI coding assistants.
34
+
35
+ Track your AI coding sessions across **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 via pgvector, and a built-in AI chat agent to explore your history.
36
+
37
+ **Website:** [spooling.ai](https://spooling.ai)
38
+
39
+ ---
40
+
41
+ ## Prerequisites
42
+
43
+ - **Python 3.11+**
44
+ - **Node.js 18+**
45
+ - **Docker** (for PostgreSQL + pgvector)
46
+ - **pipx** or **uv** (optional, alternative install methods)
47
+ - **Ollama** (optional, for free local AI chat) or an **Anthropic API key**
48
+
49
+ ---
50
+
51
+ ## How it works
52
+
53
+ **Four commands. Zero cloud.**
54
+
55
+ ### 01   Clone & start the database
56
+
57
+ ```bash
58
+ git clone https://github.com/sashimiboi/spooling && cd spooling
59
+ docker compose up -d # postgres + pgvector :5434
60
+ ```
61
+
62
+ ### 02   Install backend + UI
63
+
64
+ Choose one:
65
+
66
+ ```bash
67
+ # pip (recommended)
68
+ python3 -m venv .venv && source .venv/bin/activate
69
+ pip install -e .
70
+
71
+ # pipx
72
+ pipx install .
73
+
74
+ # uv
75
+ uv sync
76
+ ```
77
+
78
+ Then install the UI:
79
+
80
+ ```bash
81
+ cd ui && npm install && cd ..
82
+ ```
83
+
84
+ ### 03   Detect providers & sync
85
+
86
+ ```bash
87
+ spooling init # scan for available providers
88
+ spooling sync # embed every session into pgvector
89
+ ```
90
+
91
+ ### 04   Search & explore
92
+
93
+ ```bash
94
+ spooling ui # API :3002 · MCP :3004 · GUI :3003
95
+ spooling search "that redis race condition"
96
+ ```
97
+
98
+ Open **http://localhost:3003** and you're in.
99
+
100
+ ---
101
+
102
+ ## Connect Spooling to your AI coding agent
103
+
104
+ `spooling ui` automatically exposes an MCP server at `http://127.0.0.1:3004/mcp` (HTTP streamable transport). Any MCP-speaking agent can connect to it and pull context from your local KB mid-conversation. The agent gets tools like `spooling_search`, `spooling_recent_sessions`, `spooling_get_session`, `spooling_workspace_stats`, and `spooling_top_projects`.
105
+
106
+ ### Cursor / Windsurf / Codex / Antigravity
107
+
108
+ Edit your client's MCP config (usually `~/.cursor/mcp.json`, `~/.codeium/windsurf/mcp_config.json`, or the equivalent) and add:
109
+
110
+ ```json
111
+ {
112
+ "mcpServers": {
113
+ "spooling": {
114
+ "type": "http",
115
+ "url": "http://127.0.0.1:3004/mcp"
116
+ }
117
+ }
118
+ }
119
+ ```
120
+
121
+ Restart the client. The `spooling` server and its tools should appear in the MCP panel.
122
+
123
+ ### Generic JSON-RPC smoke test
124
+
125
+ ```bash
126
+ curl -s http://127.0.0.1:3004/mcp \
127
+ -H "Content-Type: application/json" \
128
+ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | jq
129
+ ```
130
+
131
+ Should return the five `spool_*` tools. If you get "connection refused", `spooling ui` is not running (or its ports got squatted, run `lsof -ti :3004 | xargs kill -9` and retry).
132
+
133
+ ---
134
+
135
+ ## CLI Usage
136
+
137
+ All CLI commands require the venv to be active and the database running.
138
+
139
+ ```bash
140
+ source .venv/bin/activate
141
+ ```
142
+
143
+ ### `spooling init`
144
+
145
+ Check database connection and show which AI coding tool providers are detected on your system. This scans default paths for Codex CLI, GitHub Copilot, Cursor, and Windsurf session data.
146
+
147
+ ```bash
148
+ spooling init
149
+ ```
150
+
151
+ ### `spooling sync`
152
+
153
+ Parse and ingest sessions from all connected providers into the database. Chunks and embeds message content into pgvector for semantic search.
154
+
155
+ ```bash
156
+ spooling sync # Full sync with embeddings
157
+ spooling sync --no-embed # Skip embeddings (faster initial sync)
158
+ spooling sync -p cursor # Sync only Cursor sessions
159
+ spooling sync -p codex # Sync only Codex CLI sessions
160
+ ```
161
+
162
+ ### `spooling stats`
163
+
164
+ Show usage statistics - sessions, messages, tool calls, tokens, costs, broken down by project and day.
165
+
166
+ ```bash
167
+ spooling stats # Overview + last 7 days
168
+ spooling stats --week # Weekly breakdown
169
+ spooling stats --days 30 # Last 30 days
170
+ ```
171
+
172
+ ### `spooling search <query>`
173
+
174
+ Semantic search across all your session history using natural language.
175
+
176
+ ```bash
177
+ spooling search "snowflake connector"
178
+ spooling search "authentication bug" -n 5
179
+ spooling search "database migration" -p ~/myproject
180
+ ```
181
+
182
+ Options:
183
+ - `-n, --limit` - Number of results (default: 10)
184
+ - `-p, --project` - Filter by project name
185
+
186
+ ### `spooling watch`
187
+
188
+ Watch all connected provider directories for new session data and auto-sync in real time.
189
+
190
+ ```bash
191
+ spooling watch
192
+ ```
193
+
194
+ ### `spooling serve`
195
+
196
+ Start the API server only (for when you want to run the GUI separately).
197
+
198
+ ```bash
199
+ spooling serve # Default: http://127.0.0.1:3002
200
+ spooling serve --port 8080 # Custom port
201
+ spooling serve --host 0.0.0.0 # Bind to all interfaces
202
+ ```
203
+
204
+ ### `spooling ui`
205
+
206
+ Start the API server, the MCP HTTP server, and the Next.js UI together.
207
+
208
+ ```bash
209
+ spooling ui
210
+ ```
211
+
212
+ ### `spooling mcp`
213
+
214
+ Start the Spooling MCP server on its own. Defaults to streamable-HTTP at
215
+ `http://127.0.0.1:3004/mcp`, which any MCP-compatible agent can connect to
216
+ by URL. `spooling ui` already launches this alongside the API, so you only
217
+ need to run it directly when you want the MCP server without the GUI.
218
+
219
+ ```bash
220
+ spooling mcp # streamable-HTTP at http://127.0.0.1:3004/mcp (default)
221
+ spooling mcp --stdio # stdio transport, for stdio-only clients
222
+ ```
223
+
224
+ ---
225
+
226
+ ## Spooling Cloud (optional)
227
+
228
+ By default Spooling stays 100% local. If you also want your sessions in the
229
+ hosted workspace at [spooling.ai](https://spooling.ai) (so teammates can
230
+ search the same pool, or you can chat with sessions from any browser),
231
+ the CLI ships with a `spooling cloud` subcommand.
232
+
233
+ ### One-time setup
234
+
235
+ 1. Mint an API key in the GUI at `app.spooling.ai/settings/api-keys`
236
+ (looks like `sk_live_...`).
237
+ 2. Save it locally:
238
+
239
+ ```bash
240
+ spooling cloud login --key sk_live_...
241
+ ```
242
+
243
+ The key is stored at `~/.config/spooling/cloud.json` with `0600` perms.
244
+ You can override the API base with `--api-url` or the
245
+ `SPOOLING_CLOUD_URL` env var (default: `https://api.spooling.ai`).
246
+
247
+ ### Push once
248
+
249
+ Send the most recent local sessions up to the cloud:
250
+
251
+ ```bash
252
+ spooling push # 100 sessions, batches of 20
253
+ spooling push --limit 500 # bigger backfill
254
+ ```
255
+
256
+ The server upserts by session id, so re-running is safe.
257
+
258
+ ### Watch (continuous push)
259
+
260
+ Stream new and updated sessions to the cloud on a timer. Stop with
261
+ Ctrl+C.
262
+
263
+ ```bash
264
+ spooling cloud watch # every 60s, 1000 sessions/cycle
265
+ spooling cloud watch --interval 30 # tighter cadence
266
+ spooling cloud watch --lookback 60 # widen the overlap window if you edit old sessions
267
+ ```
268
+
269
+ What it does each cycle:
270
+
271
+ 1. Reads `last_push_at` from `~/.config/spooling/cloud.json`.
272
+ 2. Queries local sessions where `started_at >= last_push_at - lookback`
273
+ (default lookback: 10 minutes, so messages appended to an in-progress
274
+ session get re-uploaded).
275
+ 3. POSTs to `/v1/sessions/batch` in chunks of `--batch` (default 20).
276
+ 4. Advances `last_push_at` to the cycle start on success.
277
+
278
+ Cycles with no new work are silent. If a push fails the watermark is
279
+ not advanced, so the next cycle retries the same window.
280
+
281
+ ### Cloud API endpoints (programmatic access)
282
+
283
+ The cloud API at `api.spooling.ai` uses `/v1/` endpoints. Requests require a Bearer token via the `Authorization` header:
284
+
285
+ ```bash
286
+ # Stats
287
+ curl -s "https://api.spooling.ai/v1/stats" \
288
+ -H "Authorization: Bearer $SPOOLING_KEY"
289
+
290
+ # Search (when deployed — falls back to local search on self-hosted)
291
+ curl -s "https://api.spooling.ai/api/search?q=migration&limit=10" \
292
+ -H "Authorization: Bearer $SPOOLING_KEY"
293
+ ```
294
+
295
+ **Important**: `app.spooling.ai` is the Next.js frontend. For API access, use `api.spooling.ai` directly or set `API_URL=https://api.spooling.ai` when deploying the frontend so its `/api/*` rewrites reach the backend.
296
+
297
+ ### Status / logout
298
+
299
+ ```bash
300
+ spooling cloud status # show what is in the cloud + stored API base
301
+ spooling cloud logout # remove the stored API key
302
+ ```
303
+
304
+ ### Auto-start at login (macOS)
305
+
306
+ Run `spooling cloud watch` as a launchd agent so it survives reboots:
307
+
308
+ ```bash
309
+ cat > ~/Library/LaunchAgents/ai.spooling.cloud-watch.plist <<'PLIST'
310
+ <?xml version="1.0" encoding="UTF-8"?>
311
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
312
+ <plist version="1.0">
313
+ <dict>
314
+ <key>Label</key><string>ai.spooling.cloud-watch</string>
315
+ <key>ProgramArguments</key>
316
+ <array>
317
+ <string>/usr/local/bin/spooling</string>
318
+ <string>cloud</string>
319
+ <string>watch</string>
320
+ </array>
321
+ <key>RunAtLoad</key><true/>
322
+ <key>KeepAlive</key><true/>
323
+ <key>StandardOutPath</key><string>/tmp/spooling-cloud-watch.log</string>
324
+ <key>StandardErrorPath</key><string>/tmp/spooling-cloud-watch.log</string>
325
+ </dict>
326
+ </plist>
327
+ PLIST
328
+ launchctl load ~/Library/LaunchAgents/ai.spooling.cloud-watch.plist
329
+ ```
330
+
331
+ (Adjust the `spooling` path with `which spooling` if it lives elsewhere.)
332
+
333
+ ---
334
+
335
+ ## MCP Endpoint
336
+
337
+ Spooling exposes an MCP server so any AI agent can query your session history
338
+ as a context source. The server runs over **streamable-HTTP** at
339
+ `http://127.0.0.1:3004/mcp` and is started automatically alongside `spooling
340
+ ui`.
341
+
342
+ Drop this into your MCP client config (`~/.mcp.json`, Cursor,
343
+ Codex, or any other streamable-HTTP capable agent):
344
+
345
+ ```json
346
+ {
347
+ "mcpServers": {
348
+ "spooling": {
349
+ "url": "http://127.0.0.1:3004/mcp"
350
+ }
351
+ }
352
+ }
353
+ ```
354
+
355
+ Or register it with an MCP client's config file.
356
+
357
+ The **Settings** page in the GUI shows the endpoint URL, a copy button, and
358
+ the full config snippet so you don't have to remember it.
359
+
360
+ ### Tools exposed
361
+
362
+ | Tool | Purpose |
363
+ |------|---------|
364
+ | `list_traces` | Recent Spooling traces, filterable by provider/project |
365
+ | `get_trace` | Full detail for one trace: header, spans, eval scores |
366
+ | `search_sessions` | Semantic search over embedded session chunks |
367
+ | `get_stats` | Top-line stats: traces, tokens, cost, errors |
368
+ | `get_top_vendors` | Most-used external vendors by tool-call count |
369
+ | `list_evals` | Recent eval runs, optionally filtered by rubric |
370
+ | `list_rubrics` | All configured Strands eval rubrics |
371
+ | `run_eval` | Run a rubric against a trace and persist the result |
372
+
373
+ ### Stdio (legacy clients)
374
+
375
+ For MCP clients that only speak stdio, run `spooling mcp --stdio` and register
376
+ it with the command-based form:
377
+
378
+ ```bash
379
+ # MCP config for stdio transport
380
+ ```
381
+
382
+ ---
383
+
384
+ ## GUI
385
+
386
+ The Spooling GUI runs on **http://localhost:3003** and includes:
387
+
388
+ | Page | Description |
389
+ |------|-------------|
390
+ | **Dashboard** | Overview stats, per-provider breakdown, daily activity chart, projects, top tools, recent sessions |
391
+ | **Sessions** | Browse all sessions with provider labels, filtering, click into any session for full conversation view |
392
+ | **Search** | Semantic search across all session history with similarity scores |
393
+ | **Analytics** | Charts for daily usage, cost trends, token usage, tool distribution, filterable by provider (AG Charts) |
394
+ | **Chat** | AI assistant that can answer questions about your session data (RAG-powered) |
395
+ | **Connections** | Connect/disconnect AI coding tools (Codex, Copilot, Cursor, Windsurf) |
396
+ | **Settings** | Configure the AI chat provider (Ollama or Anthropic) |
397
+
398
+ ### Running the GUI
399
+
400
+ ```bash
401
+ # Terminal 1: API server
402
+ source .venv/bin/activate
403
+ spooling serve
404
+
405
+ # Terminal 2: Next.js dev server
406
+ cd ui
407
+ npm run dev
408
+ ```
409
+
410
+ Or use `spooling ui` to start both at once.
411
+
412
+ ---
413
+
414
+ ## Chat Agent Setup
415
+
416
+ The chat page lets you ask questions about your coding sessions in natural language. It uses RAG - retrieves relevant context from pgvector before answering.
417
+
418
+ ### Option A: Ollama (free, local)
419
+
420
+ ```bash
421
+ # Install Ollama
422
+ brew install ollama
423
+
424
+ # Start the server
425
+ ollama serve
426
+
427
+ # Pull a model
428
+ ollama pull gemma3:4b
429
+ ```
430
+
431
+ Go to **Settings** in the GUI and select Ollama. The model will auto-detect.
432
+
433
+ ### Option B: Anthropic API (bring your own key)
434
+
435
+ Go to **Settings** in the GUI, select Anthropic, and paste your API key from [console.anthropic.com](https://console.anthropic.com).
436
+
437
+ Available models: Sonnet, Haiku, Opus.
438
+
439
+ ---
440
+
441
+ ## Architecture
442
+
443
+ ```
444
+ spooling/
445
+ ├── docker-compose.yml # PostgreSQL + pgvector
446
+ ├── init.sql # Database schema
447
+ ├── pyproject.toml # Python package config
448
+ ├── spooling/ # Python backend
449
+ │ ├── cli.py # Click CLI
450
+ │ ├── config.py # Configuration
451
+ │ ├── db.py # Database connection
452
+ │ ├── providers/ # Provider plugins (codex, copilot, cursor, windsurf)
453
+ │ ├── parser.py # Session JSONL parser
454
+ │ ├── embeddings.py # sentence-transformers (all-MiniLM-L6-v2)
455
+ │ ├── ingest.py # Sync pipeline
456
+ │ ├── search.py # pgvector semantic search
457
+ │ ├── stats.py # Usage statistics
458
+ │ ├── watcher.py # File watcher (watchdog)
459
+ │ ├── agent.py # Chat agent (Ollama + Anthropic)
460
+ │ └── server.py # FastAPI API server
461
+ └── ui/ # Next.js frontend
462
+ ├── next.config.js # API proxy to :3002
463
+ └── src/
464
+ ├── components/ # shadcn/ui components
465
+ ├── lib/ # API helpers
466
+ └── app/(app)/ # Pages (dashboard, sessions, search, etc.)
467
+ ```
468
+
469
+ ### Stack
470
+
471
+ | Layer | Technology |
472
+ |-------|-----------|
473
+ | Database | PostgreSQL 16 + pgvector (Docker) |
474
+ | Embeddings | sentence-transformers / all-MiniLM-L6-v2 (local) |
475
+ | Backend | Python, FastAPI, Click |
476
+ | Frontend | Next.js 14, shadcn/ui, Tailwind CSS, AG Charts |
477
+ | Chat AI | Ollama (local) or Anthropic API |
478
+
479
+ ### Ports
480
+
481
+ | Service | Port |
482
+ |---------|------|
483
+ | PostgreSQL | 5434 |
484
+ | API Server | 3002 |
485
+ | GUI | 3003 |
486
+ | MCP Server (streamable-HTTP) | 3004 |
487
+
488
+ ---
489
+
490
+ ## Environment Variables
491
+
492
+ All optional - defaults work out of the box for local development.
493
+
494
+ | Variable | Default | Description |
495
+ |----------|---------|-------------|
496
+ | `SPOOLING_DB_HOST` | `localhost` | Database host |
497
+ | `SPOOLING_DB_PORT` | `5434` | Database port |
498
+ | `SPOOLING_DB_NAME` | `spooling` | Database name |
499
+ | `SPOOLING_DB_USER` | `spooling` | Database user |
500
+ | `SPOOLING_DB_PASSWORD` | `spooling` | Database password |
501
+ | `SPOOLING_EMBEDDING_MODEL` | `all-MiniLM-L6-v2` | Sentence transformer model |
502
+ | `SPOOLING_UI_HOST` | `127.0.0.1` | API server host |
503
+ | `ANTHROPIC_API_KEY` | - | Anthropic API key (alternative to setting in UI) |
504
+ | `API_URL` | `http://127.0.0.1:3002` | Backend API URL for Next.js rewrites (`/api/*`→`<API_URL>/api/*`). Set to `https://api.spooling.ai` in production. |
505
+
506
+ ---
507
+
508
+ ## Supported Providers
509
+
510
+ | Provider | Data Location | Format |
511
+ |----------|--------------|--------|
512
+ | **JSONL Sessions** | `~/.sessions/projects/` | UUID-named JSONL files with conversation history, tool calls, git context |
513
+ | **OpenAI Codex CLI** | `~/.codex/sessions/` | `rollout-*.jsonl` files organized by date |
514
+ | **GitHub Copilot** | `~/Library/Application Support/Code/User/workspaceStorage/` | Chat session JSON from VS Code |
515
+ | **Cursor** | `~/Library/Application Support/Cursor/User/workspaceStorage/` | Chat and composer sessions from SQLite |
516
+ | **Windsurf** | `~/Library/Application Support/Windsurf/User/workspaceStorage/` | Chat and Cascade sessions from SQLite |
517
+ | **Kiro** | `~/Library/Application Support/Kiro/User/workspaceStorage/` | AWS Kiro chat and agent sessions from SQLite |
518
+ | **Google Antigravity** | `~/Library/Application Support/Antigravity/User/workspaceStorage/` | Antigravity chat and agent sessions from SQLite |
519
+ | **opencode** | `~/.local/share/opencode/opencode.db` | sst/opencode SQLite database with session/message/part tables (Vercel AI SDK part shape) |
520
+
521
+ Run `spooling init` to see which providers are detected on your system.
522
+
523
+ No data is sent to external servers. Everything runs locally.
@@ -248,6 +248,22 @@ What it does each cycle:
248
248
  Cycles with no new work are silent. If a push fails the watermark is
249
249
  not advanced, so the next cycle retries the same window.
250
250
 
251
+ ### Cloud API endpoints (programmatic access)
252
+
253
+ The cloud API at `api.spooling.ai` uses `/v1/` endpoints. Requests require a Bearer token via the `Authorization` header:
254
+
255
+ ```bash
256
+ # Stats
257
+ curl -s "https://api.spooling.ai/v1/stats" \
258
+ -H "Authorization: Bearer $SPOOLING_KEY"
259
+
260
+ # Search (when deployed — falls back to local search on self-hosted)
261
+ curl -s "https://api.spooling.ai/api/search?q=migration&limit=10" \
262
+ -H "Authorization: Bearer $SPOOLING_KEY"
263
+ ```
264
+
265
+ **Important**: `app.spooling.ai` is the Next.js frontend. For API access, use `api.spooling.ai` directly or set `API_URL=https://api.spooling.ai` when deploying the frontend so its `/api/*` rewrites reach the backend.
266
+
251
267
  ### Status / logout
252
268
 
253
269
  ```bash
@@ -455,6 +471,7 @@ All optional - defaults work out of the box for local development.
455
471
  | `SPOOLING_EMBEDDING_MODEL` | `all-MiniLM-L6-v2` | Sentence transformer model |
456
472
  | `SPOOLING_UI_HOST` | `127.0.0.1` | API server host |
457
473
  | `ANTHROPIC_API_KEY` | - | Anthropic API key (alternative to setting in UI) |
474
+ | `API_URL` | `http://127.0.0.1:3002` | Backend API URL for Next.js rewrites (`/api/*`→`<API_URL>/api/*`). Set to `https://api.spooling.ai` in production. |
458
475
 
459
476
  ---
460
477
 
@@ -1,7 +1,8 @@
1
1
  [project]
2
2
  name = "spooling"
3
- version = "0.1.3"
3
+ version = "0.1.5"
4
4
  description = "Local session tracker and semantic search for AI coding assistants"
5
+ readme = "README.md"
5
6
  license = "MIT"
6
7
  license-files = ["LICENSE"]
7
8
  authors = [{ name = "Parsed Analytics, Inc." }]