Skip to content

Releases: ashwanthkumar/wasp-cli

Template rendering using Wasp Configurations

28 Jan 16:18
Compare
Choose a tag to compare

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

28 Jan 14:45
Compare
Choose a tag to compare

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

28 Jan 13:09
Compare
Choose a tag to compare
Pre-release

Wasp CLI supports the following commands

  1. wasp ls - List the keys against a namespace
  2. wasp get - Get the value of the config key. Watch out, this prints the entire configuration as a JSON
  3. wasp 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"
  }
}