# AGENTS.md

Never stop coding. Free MIT AI gateway: one endpoint, 350 providers (90+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 450+ contributors

## Setup

```
npm ci
```

## Commands

```
npm run dev                      # run locally
npm run start                    # run the app
npm run build                    # produce a build
npm run test                     # run the test suite, must pass before any commit
npm run lint                     # lint
npm run check                    # lint and type check
npm run prebuild:docs
npm run gen:provider-reference
```

## Layout

- `tests/`      5088 source files
- `src/`        3027 source files
- `open-sse/`   1444 source files
- `scripts/`    220 source files
- `bin/`        209 source files
- `@omniroute/` 29 source files

## Conventions

- Tests live alongside the code they cover, following `@omniroute/opencode-plugin/tests/auth.test.ts`.
- TypeScript is not in strict mode. Turning it on catches a whole class of mistakes before they run.
- CI defines what passing means. See `.github/workflows/build.yml`, and keep it green.
- TODO: add the two or three conventions a newcomer always gets wrong here.

## Gotchas

- `open-sse/handlers/chatCore.ts` is 246KB. It will not fit comfortably in context, so read it in parts.
- Copy `.env.example` before running anything that needs configuration.

---

Drafted by agentreadme.com from what is in this repository. Everything marked TODO
needs a human. Check it in as AGENTS.md at the root.
