Skip to main content

Config overview

Readma is configured by a single file, readma.config.ts, placed at the workspace root (or passed explicitly with --config). It is a plain TypeScript module that default-exports a ReadmeTemplateArgs object — no magic keys, no plugins, just types.

import type * as types from "@readma/core";

const config: types.ReadmeTemplateArgs = {
// identity
language: "ts",
title: "Readma",
author: "elcoosp",
githubUsername: "elcoosp",
repoName: "readma",
// …
};

export default config;

Why TypeScript?​

  • Autocompletion — every field is documented in the @readma/core types your editor loads.
  • Reusable values — compute URLs, share constants between fields, pull values from other files.
  • Type safety — typos in field names or badge ids are compile errors, caught before any README is written.

The five groups of fields​

1. Identity​

Who you are and where the project lives:

FieldPurpose
author, githubUsername, repoName, xHandleHeader, contact section and shields
email, domain, domainExtContact email, rendered as email@domain.ext
linkedinUsernameOptional LinkedIn badge
titleDisplayed under the logo
urls.repo / urls.demo / urls.docOverrides for repository, demo and docs links

2. Rendering​

FieldPurpose
languagets or rs — drives install snippets and badges
packageRegistryjsr, npm or crates.io — drives the version badge
imageslogo (required) and screenshot, committed to the repo
backToTopAdds a back to top link after every section
tocTable of contents title and visibility
badgeStyleshields.io style: for-the-badge, social, flat, flat-square, plastic
badgesDisable built-in badges, append custom ones
repobeatsHash of the repobeats analytics SVG for the footer
templateGitHub issue template filenames for prefilled issue links

3. Content​

The sections object holds your markdown. Eight keys are required (projectDescription, about, features, gettingStarted, installation, usage, roadmap, acknowledgments), contributing is optional, and any extra key becomes a custom section rendered in insertion order — see sections & MDX.

4. Files & license​

FieldPurpose
licenseSPDX identifier, auto-detected by the CLI when omitted
licenseFilePath relative to the repo root, default LICENSE.txt
cocCode of conduct path, defaults to .github/CODE_OF_CONDUCT.md

5. Injected by the CLI​

You never write these — gen fills them in:

FieldInjected for
workspaceMemberEach member readme (name, path, description)
root.membersThe root readme (list of all members)

Defaults applied at render time​

FieldDefault
vcsNamegithub
domainExtcom
urls.repohttps://github.com/<user>/<repo>
urls.docFalls back to urls.repo
urls.demoFalls back to urls.repo
toc.titleTable of contents
licenseFileDetected license file or LICENSE.txt

Where images live​

images.logo and images.screenshot are rendered as https://raw.githubusercontent.com/<user>/<repo>/HEAD/<path> — commit them to the repository. The docs site of Readma itself uses docs/logo.png copied into its static assets.

Validating​

deno run -A jsr:@readma/cli validate

reports missing required fields and broken file references — see validate. For editor autocompletion of serialized configs, print the JSON schema with schema.