Skip to content

vietmpl/vie

Repository files navigation

Vie

Work in Progress: This project is under active development. The API is not stable and may change at any time.

Vie (French: /vi/, meaning "life") is a lightweight toolkit for code generation, designed to make creating and reusing templates simple and efficient.

You can templatize all boilerplate in your project: new Java classes, API handlers, React components, and more.

For example, when creating a React component:

  • If you create just one file, it's fine.
  • But if you create many files (e.g., tests, Component.props.ts, or additional folders), you can generate a file structure with general parameters and boilerplate in all files using a single command.

Quick start

Create a .vie/ directory. All templates will be stored there. Inside it, create a my-template/ directory. It represents a single template, and all files inside it will be used for rendering output.

Create .vie/my-template/hello.txt.vie with the following content:

Greetings to {{ name }} from Vie!

Render the template using the new command:

vie new my-template src/ name=HappyUser

This generates a file src/hello.txt with the following content:

Greetings to HappyUser from Vie!

Installation

go install github.com/vietmpl/vie@latest

License

vie is distributed under the terms of the MIT License.

About

Vie – CLI for code generation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors 2

  •  
  •  

Languages