All Projects → nats-io → nsc

nats-io / nsc

Licence: Apache-2.0 License
Tool for creating nkey/jwt based configurations

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].