Skip to content
chiltepin
chiltepin docs
CLI

Generate & 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 schema

The 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 picks the best block for your data — 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.md

Fails 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)

One look, one key

Chiltepin has a single visual design, dark by default. The only choice is the colour scheme, in chiltepin.config.json:

{ "docsDir": "docs", "outDir": "dist", "colorScheme": "dark" }
  • dark (default) — deep surfaces, one rust accent, a dot-grid drawing well under every diagram.
  • light — the print look, on screen.
  • system — the reader's OS chooses.

chiltepin html, chiltepin slides, chiltepin build, and Studio honour it. Print and PDF are always light. Hosts that compose their own page get LIGHT_SET, DARK_SET, and systemSchemeCss from chiltepin-render.

There are no themes and no palette. The reasoning is in the render design spec: meaning travels through shape, stroke, dash and typographic chips, and colour is spent on exactly one focal thing per diagram — chosen by the renderer from the data. A palette you can swap breaks that rule, and with it the guarantee that every diagram in a repository reads the same way. A leftover theme key from an older version is ignored.