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
MTRGen is a CLI tool that can be used in any project and generate files in any language. Create your own templates or use templates from the [online repository](https://www.mtrgen.com/repository). MTRGen is a great tool for generating boilerplate code, but it can also be used to generate any other type of file.
10
16
11
17
## Requirements
12
18
13
-
- PHP >= 7.4
19
+
- PHP >= 8.1
14
20
- Composer
15
21
16
22
## Instalation
17
23
18
24
Install with Composer:
19
25
20
26
```
21
-
composer require matronator/mtrgen --dev
27
+
composer require matronator/mtrgen
22
28
```
23
29
24
30
#### Troubleshooting
@@ -39,13 +45,13 @@ If you can't or don't want to update composer, use version `"^1.0"` of this pack
39
45
40
46
## Documentation
41
47
42
-
[Read the full documentation here.](https://matronator.github.io/MTRGen/)
48
+
[Read the full documentation here](https://www.mtrgen.com/docs/)*- needs to be updated to version 2!*
43
49
44
50
## Quickstart
45
51
46
-
You run the script from terminal using this command:
52
+
Here are some examples of commands you can run with MTRGen:
47
53
48
-
```
54
+
```bash
49
55
# To list all available commands
50
56
vendor/bin/mtrgen list
51
57
@@ -60,21 +66,29 @@ vendor/bin/mtrgen gen -p my/folder/template.json
60
66
# Generate from the global store
61
67
vendor/bin/mtrgen generate TemplateName
62
68
69
+
# Download template from the online repository and save it to the global store
70
+
vendor/bin/mtrgen add vendor/template
71
+
vendor/bin/mtrgen a vendor/template
72
+
63
73
# Save a template to the global store
64
74
vendor/bin/mtrgen save path/to/template.json
65
75
vendor/bin/mtrgen s path/to/template.json
66
76
67
77
# Optionally provide an alias to save the template under
68
78
vendor/bin/mtrgen save path/to/template.json --alias=NewName
This project would not be possible without [Nette](https://nette.org)'s [`php-generator`](https://github.com/nette/php-generator) package, which is used for the final code generation itself to output the finished PHP file.
88
+
# Repair the global store (remove all templates that don't exist)
0 commit comments