Skip to content

docs / custom-templates

Custom Templates

Save your own Markdown README recipes with {{placeholders}} and reuse them forever.

Custom templates let you save any Markdown layout as a reusable recipe. Built-in and custom templates both support placeholders that the CLI fills in from the project-details prompts.

Create one

Run the CLI and choose Create custom template:

the-magic-readme

You’ll be asked for:

  1. Slug — a short unique id. It’s lowercased and trimmed to [a-z0-9-] (e.g. my-team-readme).
  2. Name — the display name shown in the template picker.
  3. Description — one line describing when to use it.
  4. Content — the Markdown body itself, pasted in or loaded from a local .md file.

Placeholders

Use these tokens anywhere in your template; each is replaced with the value from the matching prompt:

{{repoName}} {{authorName}} {{repoUrl}} {{logo}} {{email}} {{linkedin}}

Where they’re stored

Custom templates are saved as JSON files in your home directory:

~/.the-magic-readme/templates/<slug>.json

On Windows that’s C:\Users\<you>\.the-magic-readme\templates\<slug>.json. To use a different location (for example a shared team folder), set the MAGIC_README_TEMPLATES_DIR environment variable to that directory.

Minimal example

# {{repoName}}

Maintained by {{authorName}}.

- Repository: {{repoUrl}}
- Questions: {{email}}

![logo]({{logo}})

Saved templates appear in Step 2 of the generation flow, listed after the built-ins.