Administration & Usage from CLI

Once the server is running it’s time to use the management tool. This can be downloaded from the GitHub Release Page or you can use the natsio/nats-box:latest docker image. On OS X homebrew can be used to install the latest version:

  1. $ brew tap nats-io/nats-tools
  2. $ brew install nats-io/nats-tools/nats
  3. $ nats --help
  4. usage: nats [<flags>] <command> [<args> ...]
  5. NATS Utility
  6. Flags:
  7. --help Show context-sensitive help (also try --help-long and --help-man).
  8. --version Show application version.
  9. -s, --server="localhost:4222" NATS servers
  10. --creds=CREDS User credentials
  11. --tlscert=TLSCERT TLS public certifcate
  12. --tlskey=TLSKEY TLS private key
  13. --tlsca=TLSCA TLS certifcate authority chain
  14. --timeout=2s Time to give JetStream to respond to queries
  15. Commands:
  16. help [<command>...]
  17. Show help.
  18. ...

We’ll walk through the above scenario and introduce features of the CLI and of JetStream as we recreate the setup above.

Throughout this example, we’ll show other commands like nats pub and nats sub to interact with the system. These are normal existing core NATS commands and JetStream is fully usable by only using core NATS.

We’ll touch on some additional features but please review the section on the design model to understand all possible permutations.