Deploy
PlannedDeploy Kokumi on your own Cloudflare Worker and D1 database using wrangler today. One-click Cloudflare deploy is planned; the live path takes five commands and stays inside Cloudflare's free tier with built-in limit guards.
Today: wrangler deploy plus schema steps in the README.
Create D1, set secrets, and deploy
Provision a D1 database, apply schema.sql, generate READ_TOKEN (protects /api/v1/*) and VISITOR_SALT (rotates daily SHA-256 visitor keys), then push the Worker.
wrangler d1 create kokumi
wrangler d1 execute kokumi --remote --file schema.sql
openssl rand -hex 32 | wrangler secret put READ_TOKEN
openssl rand -hex 32 | wrangler secret put VISITOR_SALT
wrangler deployProgressive enhancement: Cloudflare route vs external host
Attach the Worker to a Cloudflare route in front of your origin to unlock full edge tracking: verified AI crawler detection, .md twin counts, llms.txt tracking, and same-origin /visit.js. On external hosts like Shopify, Squarespace, Wix, or WordPress, load /visit.js from your Worker URL with data-endpoint and optionally lock CORS with ALLOWED_ORIGINS.
<script src="https://analytics.example.com/visit.js" data-endpoint="https://analytics.example.com" defer></script>Hand setup to your agent and watch free-tier limits
Run kokumi init and kokumi onboard or pass kokumi describe --format onboarding-skill to your AI coding assistant to automate setup, snippet installation, and beacon verification. If daily D1 writes or Worker requests cross 75% or 95% of Cloudflare's free limits (100k writes/day, 100k requests/day, 500 MB DB), kokumi health exits with code 5 so you never get surprised by a bill.
kokumi init
kokumi snippet
kokumi verify
kokumi health