github.com/nats-io/nsc@v0.0.0-20221206222106-35db9400b257/README.md (about)

     1  # NSC
     2  
     3  [![License Apache 2](https://img.shields.io/badge/License-Apache2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
     4  [![ReportCard](https://goreportcard.com/badge/nats-io/nsc)](https://goreportcard.com/report/nats-io/nsc)
     5  [![Build Status](https://github.com/nats-io/nsc/actions/workflows/pushes.yaml/badge.svg)](https://github.com/nats-io/nsc/actions/workflows/pushes.yaml)
     6  [![GoDoc](http://godoc.org/github.com/nats-io/nsc?status.svg)](http://godoc.org/github.com/nats-io/nsc)
     7  [![Coverage Status](https://coveralls.io/repos/github/nats-io/nsc/badge.svg?branch=main&service=github)](https://coveralls.io/github/nats-io/nsc?branch=main)
     8  
     9  A tool for creating NATS account and user access configurations
    10  
    11  ## Install
    12  
    13  With Python:
    14  
    15  ```bash
    16  curl -L https://raw.githubusercontent.com/nats-io/nsc/main/install.py | python
    17  ```
    18  
    19  Without Python and with a more cautious mindset:
    20  
    21  ```bash
    22  curl -LO https://raw.githubusercontent.com/nats-io/nsc/main/install.sh
    23  less install.sh
    24  sh ./install.sh
    25  ```
    26  
    27  With Homebrew:
    28  
    29  ```bash
    30  brew tap nats-io/nats-tools
    31  brew install nats-io/nats-tools/nsc
    32  
    33  # to uninstall:
    34  brew uninstall nats-io/nats-tools/nsc
    35  brew untap nats-io/nats-tools
    36  ```
    37  
    38  Direct Download:
    39  
    40  Download your platform binary from
    41  [here.](https://github.com/nats-io/nsc/releases/latest)
    42  
    43  ## Updates are easy
    44  
    45  `nsc update` will download and install the latest version. If you installed
    46  using Homebrew, `brew update` will update.
    47  
    48  ## Documentation
    49  
    50  [Documentation is here.](https://nats-io.github.io/nsc/)
    51  
    52  ## Building
    53  
    54  NSC uses go modules. If your project source is in `$GOPATH`, you must define set
    55  the environment variable `GO111MODULE` to `on`.
    56  
    57  ## Running with Docker
    58  
    59  The NATS team maintains a lightweight Docker image with many of the NATS
    60  utilities called [nats-box](https://github.com/nats-io/nats-box) where `nsc` is
    61  included. You can mount a local volume to get `nsc` accounts, nkeys, and other
    62  config back on the host using Docker as follows:
    63  
    64  ```sh
    65  docker run --rm -it -v $(pwd)/nsc:/nsc synadia/nats-box:latest
    66  
    67  # In case NSC not initialized already:
    68  nats-box:~# nsc init
    69  nats-box:~# chmod -R 1000:1000 /nsc
    70  $ tree -L 2 nsc/
    71  nsc/
    72   ├── accounts
    73   │   ├── nats
    74   │   └── nsc.json
    75   └── nkeys
    76      ├── creds
    77      └── keys
    78  
    79  5 directories, 1 file
    80  ```