Skip to content
Kokumi

Docs

Self-host for $0: a Cloudflare Worker + D1 analytics, a scoped CLI, and machine-readable twins.

Start quickstart
0/4 confirmedResume: Add /visit.js script tag

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.

Onboarding track

  1. 01Quickstart

    Embed /visit.js to record views, dwell time, scroll depth, and optional page metadata.

    Done when: kokumi verify --path //docs/quickstart.md
  2. 02Self-hosting

    Provision D1, set READ_TOKEN and VISITOR_SALT, and deploy the Cloudflare Worker.

    Done when: kokumi health/docs/self-hosting.md
  3. 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
  4. 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
/docs/data-and-privacy.md
Repository README
  • Read the Worker, CLI, and site source
  • Open an issue or a pull request

Jump to a reference entry

Brief an agent

Where does Kokumi run?
What do you already have?

Machine index