Skip to content

Repository files navigation

Pinion

CI Download Status

A fast and typesafe code generator

Pinion is a task runner and scaffolding tool that lets you create code generators for any language. Using TypeScript, it gives you full flexibility over what you can do and provides typesafe templating out-of-the box.

Quick start

Install Pinion into your project via:

npm install @featherscloud/pinion --save-dev

Then create a generator file e.g. in generators/readme.tpl.ts like this:

import { type PinionContext, toFile, renderTemplate } from '@featherscloud/pinion'

const readme = () => `
# Hello world

This is a readme generated by Pinion

Copyright (c) ${new Date().getFullYear()}
`

export const generate = (init: PinionContext) =>
  Promise.resolve(init)
    .then(renderTemplate(readme, toFile('readme.md')))

Then run it with npx pinion generators/readme.tpl.ts.

Documentation

The full documentation can be found in the package readme.

License

Copyright (c) 2026 Feathers Cloud Inc.

Licensed under the MIT license.

Releases

Packages

Used by

Contributors

Languages