lawrence-laz/init
A command line tool for initializing files and directories
c0193e9247335a6c1688b946325060289405de2a
.__ .__ __
|__| ____ |__|/ |_
| |/ \| \ __\
| | | \ || |
|__|___| /__||__|
\/
Create custom project templates with ease.
git clone --depth 1 https://github.com/lawrence-laz/init && cd init && zig build --release=safe
alias init="/path/to/init/zig-out/bin/init -c '/path/to/init/config/'"
mkdir -p config/templates/your-template-name
config/templates/your-template-name
|- src/
| |- main.zig
|- build.zig
|- build.zig.zon
mkdir my-project && cd my-project
init your-template-name
Templates can have parameters, which are surrounded by three underscores (ex. ___name___
) in file contents, file and directory names.
Then they can be used by calling init
with -p name=value
For example running:
init your-template-name -p name=my-project -p "description=My very own project."
Would replace:
./your-template-name/dir-___name___/
to ./dir-my-project/
./your-template-name/___name___.txt
to ./my-project.txt
some-file.txt
from This project name is ___name___
to This project name is my-project