Skip to content

Commit 32c2eb1

Browse files
authored
Merge pull request #7 from nowsecure/doc-updates
readme.md updates
2 parents 495ff04 + 429a686 commit 32c2eb1

1 file changed

Lines changed: 44 additions & 6 deletions

File tree

README.md

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ The following is needed to use the ns-cli:
2525

2626
### Install
2727

28-
1. Get binary from [Releases](https://github.com/nowsecure/nowsecure-platform-cli/releases)
29-
2. Right click the .pkg file and select `run`.
28+
The NowSecure CLI currently supports macOS, Debian based Linux distributions (Ubuntu), and Microsoft Windows (beta). Below are the steps to install on each operating system:
29+
30+
1. Navigate to the [Releases](https://github.com/nowsecure/nowsecure-platform-cli/releases) page and download the appropriate binary for your operating system/architecture (32 or 64bit).
31+
2. Install based on your operating system:
32+
1. MacOS: Right click the .pkg file and select `run`.
33+
2. Linux: `sudo dpkg -i ns-cli_<VERSION>.deb`
34+
3. Window: Double-click `ns-cli_<VERSION>.exe`
3035

3136
### Configure
3237

@@ -35,9 +40,9 @@ The following is needed to use the ns-cli:
3540

3641
**Note:** Most users will only need to use the default profile.
3742
3. The next prompt will ask you to enter the Platform API token that you will be using. Paste this into the field provided and hit enter.
38-
4. The next prompt will ask you to enter the Graphql endpoint for the NowSecure Platform. You can just hit enter if you are using the CLI to interact with the default production instance of NowSecure Platform. If you are using a single tenant deployment of NowSecure Platform, you will need to enter the URL of your Graphql endpoint. This URL will be in the format of `api.<tenant>.nowsecure.com`.
39-
5. The next prompt will ask you to enter the REST endpoint for the NowSecure Platform. You can just hit enter if you are using the CLI to interact with the default production instance of NowSecure Platform. If you are using a single tenant deployment of NowSecure Platform, you will need to enter the URL of your REST endpoint. This URL will be in the format of `lab-api.<tenant>.nowsecure.com`.
40-
6. The next prompt and final will ask you to enter the UI Server for the NowSecure platform. You can just hit enter if you are using the CLI to interact with the default production instance of NowSecure Platform. If you are using a single tenant deployment of NowSecure Platform, you will need to enter the URL of your UI Server. This URL will be in the format of `app.<tenant>.nowsecure.com`.
43+
4. The next prompt will ask you to enter the Graphql endpoint for NowSecure Platform. You can just hit enter if you are using the CLI to interact with the default production instance of NowSecure Platform. If you are using a single tenant deployment of NowSecure Platform, you will need to enter the URL of your Graphql endpoint. This URL will be in the format of `api.<tenant>.nowsecure.com`.
44+
5. The next prompt will ask you to enter the REST endpoint for NowSecure Platform. You can just hit enter if you are using the CLI to interact with the default production instance of NowSecure Platform. If you are using a single tenant deployment of NowSecure Platform, you will need to enter the URL of your REST endpoint. This URL will be in the format of `lab-api.<tenant>.nowsecure.com`.
45+
6. The next prompt and final will ask you to enter the UI Server for NowSecure platform. You can just hit enter if you are using the CLI to interact with the default production instance of NowSecure Platform. If you are using a single tenant deployment of NowSecure Platform, you will need to enter the URL of your UI Server. This URL will be in the format of `app.<tenant>.nowsecure.com`.
4146

4247
Once done, verify that the CLI functions as expected by running `ns-cli app list`. A listing of the apps in your platform account will be displayed. If desired, you can run `ns-cli app list --json` to return the results in json format. Example:
4348

@@ -50,6 +55,37 @@ REF TITLE
5055
dcf30d7a-2c16-11eb-80b5-snip Facebook ios com.facebook.Facebook "Cool Group"
5156
9d691706-3181-11eb-80b5-snip Darksky ios com.jackadam.darksky "Auto Group"
5257
```
58+
#### Windows Configuration Note
59+
60+
In some cases, the `ns-cli configure` will return "Error: N ot a valid token" when using CTRL-V to paste a valid token into the Windows Command or Powershell Prompt. If this occurs, paste the token into the command prompt by using right click from your mouse. When you do this, you should see asterisks to represent the token that is being submitted. If this does not work, we recommend manually creating the `.nsclirc` file via the steps in the following section.
61+
62+
63+
64+
#### Manual Configuration of .nsclirc file
65+
66+
The `.nsclirc` file holds the configuration for the ns-cli. If you want to manually configure this file, it should be created in the root of the user's home directory and should be named `.nsclirc` with no extensions (.txt, .env, etc). The contents of this file should be configured as follows:
67+
68+
* `[Profile]`: The ns-cli supports multiple profiles with the default profile being aptly named `[default]`.
69+
* `token`: The token that you are using.
70+
* `graphql` (optional): The graphql API endpoint that will be used. This parameter is optional if you are using the default, https://api.nowsecure.com.
71+
* `rest`: (optional): The rest API endpoint that will be used. This parameter is optional if you are using the default, https://lab-api.nowsecure.com.
72+
* `ui`: (optional): The URL to the UI that will be used. THis parameter is optional if you are using the default, https://app.nowsecure.com
73+
74+
Example of an .nsclirc file supporting a single profile using the default endpoints:
75+
76+
```
77+
[default]
78+
token=eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCJ9.eyTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenwC
79+
```
80+
Example of an .nsclirc file supporting a single profile using single tenant endpoints:
81+
82+
```
83+
[default]
84+
token=eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCJ9.eyTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenTokenwC
85+
graphql=https://api.st1.nowsecure.com
86+
rest=https://lab-api.st1.nowsecure.com
87+
ui=https://rainier.st1.nowsecure.com
88+
```
5389

5490
### Usage
5591

@@ -115,7 +151,9 @@ You can use the `--help` option to get more details on each of the options above
115151

116152
#### autocomplete
117153

118-
Running `ns-cli autocomplete` will provide details on how to integrate the ns-cli into your `.zshrc` to perform autocomplete actions.
154+
Running `ns-cli autocomplete` will provide details on how to integrate the ns-cli into your `.zshrc` to perform autocomplete actions.
155+
156+
**Note:** Autocomplete is not currently supported in Windows
119157

120158
#### configure
121159

0 commit comments

Comments
 (0)