github.com/poscat0x04/hinit

A generic project initialization tool written in Haskell.

Open this visualization on its own page →

Contributors

1

Lines of Code

624

From

2020-12-21

To

2021-02-14

About poscat0x04/hinit

hinit is a command-line tool for initializing new projects from templates, similar to cookiecutter but written in Haskell. It uses Mustache as its templating language and allows users to define custom project structures through template configuration files written in TOML. The tool reads user configuration from XDG-compliant directories and can automatically initialize version control systems like Git, Darcs, Mercurial, or Pijul after project creation.

Templates in hinit are highly configurable, supporting optional parameters with boolean or text types, default values, and conditional file inclusion based on variable expressions. File paths and content are processed as Mustache templates during initialization, allowing dynamic project generation. The tool includes several bundled templates and automatically injects special variables like project name, author email, license information, and system timestamps into the templating context.

Installation is available through both Cabal and Nix, with the Nix option supporting system-wide package installation through Flakes. The project is designed for developers who want a flexible, declarative way to scaffold new projects with customizable templates and automatic version control initialization.

Share this video