schema
deno run -A jsr:@readma/cli schema
Prints the JSON Schema (draft 2020-12) describing the whole
ReadmeTemplateArgs config — the same shape documented in the
configuration reference.
What it is for
The config is a TypeScript module, so editors already autocomplete it through
the @readma/core type import. The JSON schema is useful when you:
- build your own tooling around Readma (validators, generators, web UIs),
- want validation for generated or serialized configs,
- maintain editor snippets matching the config shape.
Usage
# Inspect it
deno run -A jsr:@readma/cli schema | less
# Save it next to your project
deno run -A jsr:@readma/cli schema > .readma.schema.json
Example excerpt:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Readma config",
"type": "object",
"required": [
"language",
"images",
"author",
"template",
"githubUsername",
"repoName",
"xHandle",
"domain",
"email",
"title",
"backToTop",
"sections"
],
"properties": {
"language": { "type": "string", "enum": ["rs", "ts"] },
"packageRegistry": {
"type": "string",
"enum": ["jsr", "npm", "crates.io"]
}
}
}
note
The schema mirrors the config type but JSON Schema cannot express every
TypeScript nicety — template literal types like GhIssueTemplateFilename
are flattened to string. When in doubt, the TypeScript type is the source
of truth.