Skip to main content
duck-template

New projects from one JSON file

A project scaffolder written in Rust. Templates are JSON, with variants, remote configs, and CLI flags passed straight into your files.

  • JSON templates

    One duck-template.json drives the whole scaffold: files, variables, conditional blocks, and variants.

  • Variants

    One template, many layouts. Run create-variant to save a folder as a reusable variant, like api, web, or cli.

  • Remote templates

    Keep templates in a git repo or at any URL. Point duck-template at the link and it fetches and renders them.

  • Three commands

    init, create, and create-variant. Each has its own flags, and all of them share one template engine.

  • Flag injection

    Any CLI flag lands in the template context. Use {{project_name}} in a file and pass --project_name.

  • Single binary

    One statically linked binary with no Node runtime. Install it with cargo install duck-template.

Install

Install with cargo, run init, and commit your template.

  1. Install

    cargo install duck-template
  2. New project

    duck-template init --name my-app
  3. From a variant

    duck-template create --variant api --name my-api

Free & open source

gentleduck is MIT licensed and will always be free and open source. Every package ships with full source access — fork it, modify it, own it.

Become a Sponsor