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.
Install Pinion into your project via:
npm install @featherscloud/pinion --save-devThen 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.
The full documentation can be found in the package readme.
Copyright (c) 2026 Feathers Cloud Inc.
Licensed under the MIT license.