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:
- Slug — a short unique id. It’s lowercased and trimmed to
[a-z0-9-](e.g.my-team-readme). - Name — the display name shown in the template picker.
- Description — one line describing when to use it.
- Content — the Markdown body itself, pasted in or loaded from a local
.mdfile.
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}}

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