Günther is a command line tool that helps you building Bolt extensions.
Install guenther as global composer package:
composer global require "guenther/guenther"
To use Günther by just running
guenter, you will need to add the installation
directory to your
PATH in your
~/.zshrc) like this:
- bootstrap new extensions
- create classes for service providers, listeners, controllers, etc…
- show you quick descriptions and implementation snippets for several things
For all commands, except
how: ones, it's required that you are in the root folder of your
Bootstrap a New Extension:
cd extensions mkdir -p local/yourname/extensionname cd local/yourname/extensionname guenther init yourname extensionname
Note: Local extensions (often used for testing) will not have their assets auto-copied to the web folder, see the how-to on the subject for more info.
guenther make:listener StorageEventListener
- Command (nut)
Built in Wiki
You can view descriptions and usage examples directly on the command line.
- Command (nut)
Validate an Extension
You can use the validate command to check if your extension is ready to be released. It will mostly check if all the meta data is on it's place, so you still have to check your extensions code and functionality on your own.
Force Command Execution
By default, this command will only run when it detects a local extension.
However, you can force the execution with the
guenther validate --force
The validate command returns proper exit codes which makes it usable in a CI environment.
If all checks passed or even contain a few warnings, it will return with an exit code of
If there are any errors, it will return with an exit code of
Save Result to a File
You can output all the checks + the result to a file of your choice.
Save as Text
To save the results table without the emojis to a file, use the following parameter:
guenther validate --output-text=/path/to/file.txt
Save as Json
To save a json string with all checks, their results and the final result, use the following parameter:
guenther validate --output-json=/path/to/file.json
Save as Yaml
To save a yaml string with all checks, their results and the final result, use the following parameter:
guenther validate --output-yml=/path/to/file.yml
All at Once
Of course, you can also use all three output options at once:
guenther validate --output-text=result.txt --output-json=result.json --output-yml=result.yml
Guenther creates a
.guenther.yml when you initialize a new extension. This
file is used to define the sub folders and sub namespaces of the classes Günther
.guenther.yml looks like this:
controllers: folder: Controller namespace: Controller fields: folder: Field namespace: Field template: folder: fields providers: folder: Provider namespace: Provider commands: folder: Nut namespace: Nut listeners: folder: Listener namespace: Listener
Note: Folders and namespaces are relative to the extension
/src folder and
This tool is open-sourced software licensed under the MIT license.