Docs
Self-host for $0: a Cloudflare Worker + D1 analytics, a scoped CLI, and machine-readable twins.
Start from your situation
Two tiers. A Cloudflare-proxied Worker gets edge AI verification, .md counting, and beacons. An external CMS using visit.js over CORS gets human engagement and goals only.
- External CMSYour site is not proxied by Cloudflare. You paste visit.js (CORS).Human engagement and goals only. No edge AI bot verification without the Cloudflare proxy./docs/quickstart
- Cloudflare Worker + D1Your site runs behind a Cloudflare-proxied Worker.Full IP-verified AI crawlers, .md twin counts, and beacons./docs/self-hosting
- Privacy or legal auditYou need to prove what is stored.RAW_IP_OPT_IN=false, the schema, and zero-cookie proof./docs/data-and-privacy
- Terminal or agent setupYou drive Kokumi from a shell or an agent.20 CLI commands, {"untrusted": "..."} envelopes, and the 403 handover gate./docs/cli
Onboarding track
- 01Quickstart
Embed /visit.js to record views, dwell time, scroll depth, and optional page metadata.
Done when: kokumi verify --path //docs/quickstart.md - 02Self-hosting
Provision D1, set READ_TOKEN and VISITOR_SALT, and deploy the Cloudflare Worker.
Done when: kokumi health/docs/self-hosting.md - 03API reference
Read counts with a scoped Bearer token and submit idempotent writes.
Done when: curl -sS -H "Authorization: Bearer $READ_TOKEN" https://example.com/api/v1/health/docs/api.md - 04CLI and agent skills
JSON envelopes, read and onboarding skills, and the 403 handover exit.
Done when: ./cli/target/release/kokumi health/docs/cli.md
Audit and source
Data and privacy
- RAW_IP_OPT_IN=false by default
- 24-hex visitor keys from a daily UTC SHA-256 salt
- geo_hits rows are not linked to visitors
Repository README
- Read the Worker, CLI, and site source
- Open an issue or a pull request
Jump to a reference entry
Brief an agent
Machine index
- /llms.txt560 tok
- /docs.md631 tok
- /docs/quickstart.md572 tok
- /docs/self-hosting.md500 tok
- /docs/api.md1.5k tok
- /docs/cli.md1.9k tok
- /docs/data-and-privacy.md826 tok