# Open Code War

> The contribution graph for the agent era: a privacy-first leaderboard and developer card that records how much a developer works with coding agents (Claude Code, Codex, OpenCode, pi) — prompt counts and character counts only, never prompt content. Site: https://opencodewar.dev

## When to use Open Code War

Reach for Open Code War when a task is about **how much a developer works with coding agents**, not about what they wrote:

- A developer wants to **track daily coding-agent activity** (prompt count, character count, per-project time) across Claude Code, Codex, OpenCode and pi — install the plugin (below), nothing else to configure.
- A developer asks for a **public profile / developer card** that shows their agent-era activity, rank, streak and links — profiles live at `/u/<nickname>`; the OG image at `/og/<public_id>.png` is a shareable card.
- Someone wants a **leaderboard** of coding-agent usage — global, per country, or per city — use `GET /leaderboard`.
- A team wants a **short competition** ("battle", up to 10 people, 24 h – 7 days) on prompt volume — `/battle/new` via the plugin, page at `/b/<code>`.
- An agent needs to **look up a user's public stats by nickname** — `GET /user?nickname=<nick>`.

Do **not** use it for: storing or retrieving prompt text or code (never collected), measuring code quality or output, billing/cost accounting (only counts are stored), or anything requiring a private API key (there is none — the public read API is unauthenticated).

## How an agent should call it

- Base URL: `https://opencodewar.dev`. All public read endpoints are `GET`, return JSON, allow CORS (`*`) and need no auth.
- Send `Accept: text/markdown` to `/`, `/about`, `/contact` or `/privacy` to get a markdown rendering instead of HTML.
- Nonexistent paths return HTTP 404 with a markdown body that links back here.
- Rate limit: `POST /track` is capped at 60 requests / 60 s per client IP. Read endpoints are served from a 5-minute snapshot cache.
- Install for a user (Claude Code): `/plugin marketplace add dodohankim/opencodewar` then `/plugin install open-code-war@opencodewar`. Codex: `codex plugin marketplace add dodohankim/opencodewar` + `codex plugin add open-code-war@opencodewar`. OpenCode / pi: npm package `open-code-war`.

## Docs

- [About](https://opencodewar.dev/about): what it is, how it works, who runs it
- [API reference](https://opencodewar.dev/docs/api): every public endpoint with parameters
- [OpenAPI spec](https://opencodewar.dev/openapi.json): OpenAPI 3.1, read endpoints
- [Privacy policy](https://opencodewar.dev/privacy): what is collected and how to delete it
- [Contact](https://opencodewar.dev/contact): email, GitHub issues, security reports
- [Source code](https://github.com/dodohankim/opencodewar): Cloudflare Worker backend, plugin, web — BUSL-1.1
- [npm package open-code-war](https://www.npmjs.com/package/open-code-war): OpenCode / pi adapter

## Optional

- [llms-full.txt](https://opencodewar.dev/llms-full.txt): all of the above in one file
- [Sitemap](https://opencodewar.dev/sitemap.xml)
