Skip to content
/ nsc Public
forked from nats-io/nsc

Tool for creating nkey/jwt based configurations

License

Notifications You must be signed in to change notification settings

sdenovan/nsc

 
 

Repository files navigation

NSC

License Apache 2 ReportCard Build Status GoDoc Coverage Status

A tool for creating NATS account and user access configurations

Install

With Python:

curl -L https://raw.githubusercontent.com/nats-io/nsc/main/install.py | python

Without Python and with a more cautious mindset:

curl -LO https://raw.githubusercontent.com/nats-io/nsc/main/install.sh
less install.sh
sh ./install.sh

With Homebrew:

brew tap nats-io/nats-tools
brew install nats-io/nats-tools/nsc

# to uninstall:
brew uninstall nats-io/nats-tools/nsc
brew untap nats-io/nats-tools

Direct Download:

Download your platform binary from here.

Updates are easy

nsc update will download and install the latest version. If you installed using Homebrew, brew update will update.

Documentation

Documentation is here.

Building

NSC uses go modules. If your project source is in $GOPATH, you must define set the environment variable GO111MODULE to on.

Running with Docker

The NATS team maintains a lightweight Docker image with many of the NATS utilities called nats-box where nsc is included. You can mount a local volume to get nsc accounts, nkeys, and other config back on the host using Docker as follows:

docker run --rm -it -v $(pwd)/nsc:/nsc synadia/nats-box:latest

# In case NSC not initialized already:
nats-box:~# nsc init
nats-box:~# chmod -R 1000:1000 /nsc
$ tree -L 2 nsc/
nsc/
 ├── accounts
 │   ├── nats
 │   └── nsc.json
 └── nkeys
    ├── creds
    └── keys

5 directories, 1 file

About

Tool for creating nkey/jwt based configurations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 97.7%
  • Shell 1.2%
  • Other 1.1%