cursortab-api
March 22, 2026 ยท View on GitHub
Community data collection API for training an improved completion gating model. Built with Hono on Cloudflare Workers with Turso (LibSQL) for storage.
Local Development
bun install
cp .dev.vars.example .dev.vars # add your Turso credentials
turso dev --port 8080 # local LibSQL server
bun run dev # http://localhost:8787
Deploy
Deploys automatically on push to main via GitHub Actions.
First-time setup
- Set Cloudflare API token in GitHub repo secrets as
CLOUDFLARE_API_TOKEN - Set Turso secrets on Cloudflare:
wrangler secret put TURSO_URL wrangler secret put TURSO_AUTH_TOKEN
Database migrations run automatically on first request.
Live
The production API is at https://api.cursortab.com.
Endpoints
| Method | Path | Rate limit | Description |
|---|---|---|---|
POST | /events | 200/10s/IP | Ingest a completion event |
GET | /events | 60/min/IP | Paginated read (?limit=&offset=&device_id=&outcome=) |
GET | /stats | 60/min/IP | Aggregate statistics |
See docs/community-data-schema.md for the full schema.