Skip to content

a cli tool to ironically skip writing the boilerplate

License

Notifications You must be signed in to change notification settings

ukhirani/boilerplate

Repository files navigation

image

Boilerplate is a CLI tool that lets developers save and reuse file or project templates, including automated setup commands, to quickly generate code structures and eliminate repetitive work.

Find other templates and share your templates at bp-hub

Refer the official documentation for boilerplate at bp-hub/docs

Installation

Using Homebrew :

brew install ukhirani/bp/bp

Linux

curl -fsSL https://raw.githubusercontent.com/ukhirani/boilerplate/main/install.sh | sh

Windows

winget install Ukhirani.Bp

If you have go already installed.

go install github.com/ukhirani/boilerplate/bp@latest

Usage

Get current version

bp --version

See the help guide for bp

bp --help
bp help

List available templates

bp list

Generate from template

bp gen <template>
bp gen <template> <custom-name>  # Custom filename (files only)
bp gen <template> --dir <relative-target-dir>    # Specify relative target directory

Add new template

bp add <file-or-directory> --name <template-name>

Preview template

bp preview <template>
bp preview <template> --config  # Show template configuration including pre and post commands.

Configure a template

bp config <template> # This will open up the config of the template your the default editor (default : vscode)
bp config <template> -e OR --editor <editor-name> # This is to override the default editor for opening configs

Copy template to clipboard (file type only)

bp clip <template>

Clone template to your system locally (from bp-hub)

bp clone <username>/<template> --alias <alias-name> # Here, alias is what you want to call this template in your system

Run the pre and post command of any template (without generating the template)

bp work <template> # By default runs pre and post commands both (sequentially)
bp work <template> --pre # Runs only the pre commands
bp work <template> --post # Runs only the post commands

About

a cli tool to ironically skip writing the boilerplate

Resources

License

Stars

Watchers

Forks

Packages

No packages published