Import and configure
Turn an OpenAPI spec, a CSV, or a SQL / DBML / Prisma schema into a Chiltepin document, and pick the colour scheme.
chiltepin sync
Generate Chiltepin content from data you already have. Every command prints a
ready-to-paste block to stdout, or writes a whole validated document with
--out:
chiltepin sync openapi spec.yaml --out docs/api.md # a full API doc from an OpenAPI spec
chiltepin sync csv sales.csv # a ready-to-paste block from a CSV
chiltepin sync sql schema.sql --out docs/data.md # an erd from SQL DDL
chiltepin sync dbml schema.dbml # an erd from a DBML schema
chiltepin sync prisma schema.prisma # an erd from a Prisma schemaThe output is normal Chiltepin Markdown — edit and validate it like anything else.
Schemas → an ERD
chiltepin sync sql reads CREATE TABLE (inline and table constraints, with
Postgres, MySQL and SQL Server quoting), CREATE INDEX, ALTER TABLE ADD,
CREATE TYPE … AS ENUM, CREATE VIEW, and COMMENT ON. dbml and prisma
read their own grammars. All three produce the same typed erd block —
columns with their key markers, foreign-key targets, enums, and crow's-foot
cardinality.
chiltepin sync prisma prisma/schema.prisma --out docs/data-model.md --title "Data model"--out refuses to replace a file you already wrote; pass --force when you
mean it.
CSV → the right block
chiltepin sync csv chooses a block from the column types — a status column becomes a
statustable, numeric columns become a chart, anything else a table — and
tells you why. Override with --block table|statustable|chart.
OpenAPI, in CI
chiltepin sync openapi spec.yaml --check docs/api.mdFails when the doc has drifted from the spec.
chiltepin audit
Audit a codebase and get a recommendation of which docs to write, with the evidence for each:
chiltepin audit # the current directory
chiltepin audit ./services --json # machine-readable (schema version 1)Configuration
Set document paths and the color scheme in chiltepin.config.json:
{ "docsDir": "docs", "outDir": "dist", "colorScheme": "dark" }| Key | Purpose |
|---|---|
docsDir | Directory containing the source Markdown documents |
outDir | Output directory for chiltepin build |
colorScheme | dark, light, or system (follow the reader's OS setting) |
One look, one key
HTML, slides, the built site, and Studio use the configured color scheme.
Print and PDF use the light scheme. The renderer supplies the visual style;
an older theme configuration key is ignored.