Kaladont is a word game where players take turns saying words, each starting with the last two letters of the previous word. This is a Cloudflare Workers + local LLM implementation.
Each turn you submit two letters, the LLM picks a matching word, and the next head is that word's last two letters.
Project stuck waiting on Cloudflare. Their AI Workers runtime doesn't support local development yet. Once wrangler dev can talk to a local LLM through oMLX it can be finished. Until then it's wired to the Anthropic API on oMLX or similar via "@anthropic-ai/sdk.
A small example of a stateful Cloudflare Worker: KV-backed sessions via @hono/session, a Hono HTTP layer in index.ts, and an LLM client in llm.ts that's easy to swap out. Player name generation and word selection both go through through the model.
| Tool | Purpose |
|---|---|
| Hono | HTTP framework for Cloudflare Workers |
| Wrangler | Dev server & deployment |
| Anthropic SDK | LLM client (swap for Worker AI when CF supports it) |
| Vitest | Unit tests |
| mise | Tool version management & task runner |
| hk | Git hooks — pre-commit lint/format, conventional commits |
mise run dev # (alias: d) start wrangler dev server
mise run test # (alias: t) run vitest
mise run lint # (alias: l) run hk check (eslint + prettier)
mise run build # build for deployment- pre-commit — eslint, prettier, end-of-file and trailing whitespace fixers; auto-fixes and re-stages
- commit-msg — enforces Conventional Commits
| Method | Path | Description |
|---|---|---|
PUT |
/session |
Start a session (empty word list) |
GET |
/session |
Inspect session data |
DELETE |
/session |
Destroy the session |
GET |
/players |
Generate AI player names (requires session) |
PUT |
/word |
Submit a head (2 letters); get back a word and its tail (requires session) |
Use xh with a session file (./s) to persist the cookie.
# Start a session
xh put :5173/session --session=./s
# Play a word — submit two letters, get back a word and its tail
xh put :5173/word head=an --session=./s
# Play again (hopefully gives a different word)
xh put :5173/word head=an --session=./s
# Check session (see words played so far)
xh get :5173/session --session=./s
# Clear the session
xh delete :5173/session --session=./s