Releases: ashwanthkumar/wasp-cli
Releases · ashwanthkumar/wasp-cli
Template rendering using Wasp Configurations
Wasp CLI now supports generating files based on configuration values in WASP. We use the awesome Go Templates as template engine. Let's take a wasp configuration file
// wasp.tmpl
{
"wasp": {
"host": "{{ .wasp.host }}"
}
}
You can now render the tmpl file using the wasp gen
command as
$ wasp put dev.golang.wasp.host "http://localhost:9000"
$ wasp gen dev.golang /path/to/wasp.tmpl > ~/.indix/wasp.json
$ cat /path/to/config.json
{
"wasp": {
"host": "http://localhost:9000"
}
}
Added rmr support
You can now delete configuration keys directly from Wasp CLI using the new rmr
command. Usage be like
$ wasp rmr -h
Delete a config key (recursively)
Usage:
wasp rmr <path> [flags]
Flags:
-y, --yes Don't prompt just delete it
Initial version of Wasp CLI
Wasp CLI supports the following commands
wasp ls
- List the keys against a namespacewasp get
- Get the value of the config key. Watch out, this prints the entire configuration as a JSONwasp put
- Create / Update a value of a key. You can also stream the value from a file like
$ cat sample.json | wasp put test.foo.bar --stdin --raw
All the required configurations like the WASP Host and AuthToken are to be stored in ~/.indix/wasp.json
like
{
"wasp": {
"host": "http://localhost:9000",
"token": "auth-token-for-put"
}
}