You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
4
4
5
+
Find other templates and share your templates at [bp-hub](https://bp-hub.vercel.app)
6
+
7
+
Refer the official documentation for boilerplate at [bp-hub/docs](https://bp-hub.vercel.app/docs)
8
+
5
9
## Installation
6
10
7
11
### Using Homebrew :
@@ -25,32 +29,59 @@ go install github.com/ukhirani/boilerplate/bp@latest
25
29
26
30
## Usage
27
31
32
+
### Get current version
28
33
```bash
29
-
# Get current version
30
34
bp --version
35
+
```
36
+
37
+
### See the help guide for bp
38
+
```bash
39
+
bp --help
40
+
bp help
41
+
```
31
42
32
-
# List available templates
43
+
### List available templates
44
+
```bash
33
45
bp list
46
+
```
34
47
35
-
# Generate from template
48
+
### Generate from template
49
+
```bash
36
50
bp gen <template>
37
51
bp gen <template><custom-name># Custom filename (files only)
38
52
bp gen <template> --dir <relative-target-dir># Specify relative target directory
53
+
```
39
54
40
-
# Add new template
55
+
### Add new template
56
+
```bash
41
57
bp add <file-or-directory> --name <template-name>
58
+
```
42
59
43
-
# Preview template
60
+
### Preview template
61
+
```bash
44
62
bp preview <template>
45
63
bp preview <template> --config # Show template configuration including pre and post commands.
64
+
```
46
65
47
-
# Configure a template
66
+
### Configure a template
67
+
```bash
48
68
bp config <template># This will open up the config of the template your the default editor (default : vscode)
49
69
bp config <template> -e OR --editor <editor-name># This is to override the default editor for opening configs
70
+
```
50
71
51
-
52
-
# Copy template to clipboard (file type only)
72
+
### Copy template to clipboard (file type only)
73
+
```bash
53
74
bp clip <template>
54
75
```
55
76
56
-
Templates are stored in `$HOME/boilerplate/templates/`. Use `bp --help` for more options.
77
+
### Clone template to your system locally (from bp-hub)
78
+
```bash
79
+
bp clone <username>/<template> --alias <alias-name># Here, alias is what you want to call this template in your system
80
+
```
81
+
82
+
### Run the pre and post command of any template (without generating the template)
83
+
```bash
84
+
bp work <template># By default runs pre and post commands both (sequentially)
85
+
bp work <template> --pre # Runs only the pre commands
86
+
bp work <template> --post # Runs only the post commands
0 commit comments