Skip to content

🐶 scaffdog is Markdown driven scaffolding tool.


Notifications You must be signed in to change notification settings


Repository files navigation


scaffdog is Markdown driven scaffolding tool.

GitHub Workflow Status npm npm MIT LICENSE



Multiple files can be output in a document, and flexible scaffolding is possible with a simple but powerful template syntax 🐕


Visit to view the full documentation.


  • 📝 Markdown driven
    • You can define a template with <h1> and code block.
    • It will be a Documetable template !
    • Define meta information with extended syntax using Front Matter.
  • 🗒️ Intuitive template
    • It provides a simple yet powerful template engine inspired by ECMAScript and Go text/template.
    • Many built-in helper functions required to define templates are also provided.
  • 🚀 Ready to use
    • You can quickly start using $ scaffdog init.
    • Other useful commands are provided for immediate scaffolding.
  • 💅 Prettier Integration
    • Markdown works very well with Prettier, and the templates maintain beautiful code.
    • We also offer a Prettier Plugin for scaffdog's template engine.


  • Node.js v18.0.0+

Getting Started


scaffdog can be installed globally, but we recommend installing it locally on the project.

$ npm install --save-dev scaffdog

Quick Start

In the following tutorial you can start using scaffdog immediately !


By default, it stores the document file and configuration file in the .scaffdog directory.

Creating directories, configuration file and initial documents can be done with the init subcommand.

$ npx scaffdog init

? Please enter a document name. component

Setup of scaffdog 🐶 is complete!

  ✔ .scaffdog/config.js
  ✔ .scaffdog/

Now you can do scaffold by running `$ scaffdog generate`.

Please refer to the following documents and customize it.

After running the command, the .scaffdog/ file should have been generated. Rewrite that file as follows:

name: 'component'
root: '.'
output: '.'
  name: 'Please enter a component name.'

# `{{ | pascal }}/index.ts`

export * from './{{ }}';

# `{{ | pascal }}/{{ | pascal }}.tsx`

export type Props = React.PropsWithChildren<{}>;

export const {{ | pascal }}: React.FC<Props> = ({ children }) => {
  return (

Let's scaffold using the component document!

$ npx scaffdog generate

? Please select a document. component
ℹ Output destination directory: "."
? Please enter a component name. PrettyDog

🐶 Generated 2 files!

     ✔ PrettyDog/index.ts
     ✔ PrettyDog/PrettyDog.tsx

Congratulations 🎉

The first file was generated.

$ cat PrettyDog/index.ts
export * from './PrettyDog';

$ cat PrettyDog/PrettyDog.tsx
export type Props = React.PropsWithChildren<{}>;

export const PrettyDog: React.FC<Props> = ({ children }) => {
  return (

Check out our documentation site to customize your documentation 👍


There are important changes in the major update.

See Migration Guide.






MIT © wadackel

Thank you for reading!