Skip to content

Commit 6a37ea1

Browse files
authored
docs (work,clone) : updated and beautified the readme to include work and clone cmds
1 parent 324b053 commit 6a37ea1

1 file changed

Lines changed: 41 additions & 10 deletions

File tree

README.md

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
<img width="1100" height="409" alt="image" src="https://github.com/user-attachments/assets/5cf7a26d-aaca-489e-84ec-4b54643c92de" />
1+
<img height="409" alt="image" src="https://github.com/user-attachments/assets/31d049e8-c313-46b9-9da7-46c293257f75" />
22

33
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.
44

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+
59
## Installation
610

711
### Using Homebrew :
@@ -25,32 +29,59 @@ go install github.com/ukhirani/boilerplate/bp@latest
2529

2630
## Usage
2731

32+
### Get current version
2833
```bash
29-
# Get current version
3034
bp --version
35+
```
36+
37+
### See the help guide for bp
38+
```bash
39+
bp --help
40+
bp help
41+
```
3142

32-
# List available templates
43+
### List available templates
44+
```bash
3345
bp list
46+
```
3447

35-
# Generate from template
48+
### Generate from template
49+
```bash
3650
bp gen <template>
3751
bp gen <template> <custom-name> # Custom filename (files only)
3852
bp gen <template> --dir <relative-target-dir> # Specify relative target directory
53+
```
3954

40-
# Add new template
55+
### Add new template
56+
```bash
4157
bp add <file-or-directory> --name <template-name>
58+
```
4259

43-
# Preview template
60+
### Preview template
61+
```bash
4462
bp preview <template>
4563
bp preview <template> --config # Show template configuration including pre and post commands.
64+
```
4665

47-
# Configure a template
66+
### Configure a template
67+
```bash
4868
bp config <template> # This will open up the config of the template your the default editor (default : vscode)
4969
bp config <template> -e OR --editor <editor-name> # This is to override the default editor for opening configs
70+
```
5071

51-
52-
# Copy template to clipboard (file type only)
72+
### Copy template to clipboard (file type only)
73+
```bash
5374
bp clip <template>
5475
```
5576

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
87+
```

0 commit comments

Comments
 (0)