Why rute
Most API teams already have the contract in code. The problem is keeping it visible. rute keeps the docs next to the schemas you already maintain and gives the terminal first-class treatment.
rute reads your rute.yaml and linked Zod schemas, then turns them into terminal docs and a static HTML export. No OpenAPI ceremony. No duplicated contracts. No drift.
Built for TypeScript API projects that already use Zod as the source of truth.
Installation instructions for humans and agents: docs/installation.md
Most API teams already have the contract in code. The problem is keeping it visible. rute keeps the docs next to the schemas you already maintain and gives the terminal first-class treatment.
Swagger solves publication. rute solves co-location. It is for teams that want a lightweight way to browse and share API documentation without introducing a second documentation system.
Small config, linked schemas, fast feedback.
Add a rute.yaml at the repo root and map each route to the Zod schemas it uses.
Use rute, rute list, and rute show to inspect routes, types, and validations.
Run rute export to generate a static HTML site for teammates, reviewers, or public API consumers.
The basics cover browsing, validation, and export.
Browse endpoint groups, inspect schema trees, and test routes directly from the TUI.
Print a compact list of routes, methods, and descriptions for quick orientation.
Render params, query, body, and response schemas as readable trees in the terminal.
Confirm that every referenced TypeScript file and exported schema still resolves.
Build a self-contained HTML site from the same route metadata and schema definitions.
Publish exported documentation to GitHub Pages when you want a public-facing copy.
A minimal rute.yaml is enough to get useful docs.
title: My API
version: 1.0.0
baseUrl: https://api.example.com
endpoints:
- path: /users/:id
method: GET
description: Get a user by ID
params:
schema: ./schemas/user.ts#UserParamsSchema
response:
200:
schema: ./schemas/user.ts#UserResponseSchema
404:
schema: ./schemas/errors.ts#NotFoundSchema
- path: /users
method: POST
description: Create a new user
body:
schema: ./schemas/user.ts#CreateUserSchema
response:
201:
schema: ./schemas/user.ts#UserResponseSchema