DocsReference
For AI agents
Rules and entry points for an agent working in a project built with Nexy. Working on Nexy itself is
a different job: read the repository's root AGENTS.md.
Map
| You need | Read |
|---|---|
| the product, in one page | README |
| to run a project | getting-started |
| a file's URL | routing |
| dynamic segments, layouts, error pages | pages |
| the current path, query, cookies, session | hooks |
| to edit a page | .nexy files or views |
| Markdown or MDX | markdown |
| built-in HTML helpers | components |
| rendering mode | SSR, CSR, ISR |
| a WebSocket | websocket |
| controllers and modules | modular |
| to add an endpoint | API |
| a form posted from a page | actions |
| why a request failed, and which page answers it | exceptions |
| translations | i18n |
| a config field | config |
| to test the app | testing |
| the client build | frontend |
Skills
A project made with nx new already holds the rules for agents: AGENTS.md, CLAUDE.md and the
skills in .agents/skills/ and .claude/skills/. Read AGENTS.md first; it lists the skills and
says which one to load for a task. For an existing project, run nx skills. See
Coding agents.
Invariants
__nexy__/is generated. Never edit it, never commit it. Delete it to force a clean build.- One file per URL.
index.nexyandindex.pyfor the same path is a bug, not a priority rule. - Reserved names inside
src/routes/:layout.nexy,loading.nexy,errors.nexy,notfound.nexy,dependencies.py,__init__.py. Do not use them for content. .nexyfrontmatter is Python that runs per request. No module-level side effects: no file handles, no database connections, no network calls at import..pyinsrc/routes/is an API handler. Methods are function names (GET,POST, ...).- Configuration lives in
nexyconfig.py, not in environment variables and not in scattered constants. - Autoescaping is off in
.nexytemplates: escape untrusted values with| e.
Commands
nx dev # development
nx build # production build
nx start # production server
nx test # pytest, --client adds vitest
How to answer a question about Nexy
- Search
docs/for the concept. - If the page is silent, read the installed package -
nexy/core/config.pyfor options,nexy/modules/routers/fbrouter/for routing rules,nexy/modules/compiler/for how.nexyfiles become modules. - If the docs and the code disagree, trust the code and say so.