Rails for AI agents building with Next.js.
Let agents ship features fast — on rails that keep your architecture and directory structure under control. Fixed structure, enforced conventions, curated libraries, preinstalled skills.
# get started in seconds
$ bunx degit levix0501/next-agent-rails my-app
$ bun dev
One command. Two minutes.
Scaffold the repo, install, and start building. Ships with a public landing and a protected dashboard as a working example of the rails.
# 1. clone & install
$ bunx degit levix0501/next-agent-rails my-app
$ cd my-app && bun install
# 2. run the dev server
$ bun dev
# 3. ship
$ bun run build && vercel deploy
Demo dashboard login demo / demo123 · auto-fix on save with bun run lint:fix
Guardrails, not handcuffs.
A fixed directory structure and a short list of conventions keep agent output predictable and easy to review — no sprawl, no surprise patterns.
Use Bun
bun install / bun add, respect bun.lock. No npm, pnpm, or yarn.
Server Components first
Default to Server Components; push 'use client' down to the smallest leaf that needs it.
Official CLI first
Scaffold through a tool's own CLI (bunx shadcn@latest add …), never by hand.
One home per state
URL state → nuqs, client state → zustand. No per-feature reinvention.
Picked once, not per feature.
Mainstream libraries, each with one job — so your agent reaches for the same tool you would. Already wired up in providers.
8 skills, locked & ready.
Open the project. Your agent already knows how to do these things.
No JavaScript on the hot path.
Every dev-loop tool is a native binary — Bun (Zig) plus the Oxc family and Tailwind Oxide, all in Rust.
| Stage | Tool | Replaces | Lang |
|---|---|---|---|
| Install / run | bun | npm / node | Zig |
| Lint | oxlint | ESLint | Rust |
| Format | oxfmt | Prettier | Rust |
| Compile JS/TS | SWC | Babel | Rust |
| Bundle / dev | Turbopack | Webpack | Rust |
| CSS engine | Tailwind v4 Oxide | Tailwind v3 PostCSS | Rust |