You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44-6Lines changed: 44 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,13 @@ The following is needed to use the ns-cli:
25
25
26
26
### Install
27
27
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`
30
35
31
36
### Configure
32
37
@@ -35,9 +40,9 @@ The following is needed to use the ns-cli:
35
40
36
41
**Note:** Most users will only need to use the default profile.
37
42
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`.
41
46
42
47
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:
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:
0 commit comments