Skip to content

Commit

Permalink
Merge pull request #48 from sailpoint-oss/feature/webdocs
Browse files Browse the repository at this point in the history
WebDocs update
  • Loading branch information
luke-hagar-sp authored Mar 9, 2023
2 parents eb8a6ad + ec21a69 commit 05ce90e
Showing 1 changed file with 3 additions and 255 deletions.
258 changes: 3 additions & 255 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,261 +27,9 @@
</div>
</div>

<!-- ABOUT THE PROJECT -->
Documentation

# About The Project
The SailPoint CLI is a terminal-based tool you can use to to interact with your IdentityNow (IDN) tenant. The CLI provides a text-based environment you can use to run operations known as "commands" to interact with your tenant however you want.

The SailPoint Command Line Interface (CLI) makes it easy to interact with
SailPoint's SaaS Platform in a programmatic way. Many functions that use to be
accomplished through tools like Postman or from custom scripts can now be done
directly on the command line with minimal setup.
For documentation, please see https://developer.sailpoint.com/idn/tools/cli

Please use GitHub
[issues](https://github.com/sailpoint-oss/sailpoint-cli/issues) to
[submit bugs](https://github.com/sailpoint-oss/sailpoint-cli/issues/new?assignees=&labels=&template=bug-report.md&title=%5BBug%5D+Your+Bug+Report+Here)
or make
[feature requests](https://github.com/sailpoint-oss/sailpoint-cli/issues/new?assignees=&labels=&template=feature-request.md&title=%5BFeature%5D+Your+Feature+Request+Here).

If you'd like to contribute directly (which we encourage!) please read the
contribution guidelines below, first!

# Contents

- [About The Project](#about-the-project)
- [Contents](#contents)
- [Installation](#installation)
- [Homebrew](#homebrew)
- [Manual Installation](#manual-installation)
- [MacOS and Linux](#macos-and-linux)
- [Windows](#windows)
- [Configuration](#configuration)
- [Assisted configuration](#assisted-configuration)
- [Personal Access Token](#personal-access-token)
- [Manual configuration](#manual-configuration)
- [Environment variable configuration](#environment-variable-configuration)
- [Usage](#usage)
- [Discuss](#discuss)
- [License](#license)
- [Contributing](#contributing)
- [Code of Conduct](#code-of-conduct)

<!-- GETTING STARTED -->

## Installation

There are several ways to install the SailPoint CLI, including through a package manager for your OS of choice or manual installation.

### Homebrew

For Mac OS users, you can use [Homebrew](https://brew.sh/) to install the CLI. Please run the following command in your terminal:

```sh
brew tap sailpoint-oss/tap && brew install sailpoint-cli
```

### Manual Installation

Prebuilt binaries for OS X, Windows, and Linux are provided in our [releases](https://github.com/sailpoint-oss/sailpoint-cli/releases) section. If you download the prebuilt binary, you can skip to the [configuration](#configuration) section. If you want to manually build this project, please follow the steps below.

#### MacOS and Linux

Open your terminal app, navigate to the project directory, and run the following
command:

```shell
make install
```

After that, make sure you can run the `sail` command.

```shell
sail
```

<img src="./assets/img/vhs/MacOSAndLinux.gif" alt="linux make gif">

#### Windows

Open PowerShell **as administrator**, navigate to the project directory, and run
the following command.

```bash
go build -o "C:\Program Files\sailpoint\sail.exe"
```

After that, add the following directory to the system PATH parameter. You can
find instructions on how to do this from
[this article](https://medium.com/@kevinmarkvi/how-to-add-executables-to-your-path-in-windows-5ffa4ce61a53).
This will only need to be done the first time you install the CLI.

```
C:\Program Files\sailpoint
```

After setting your environment variable, close all instances of your PowerShell
or Command Prompt, open a new instance, and make sure you can run the `sail`
command.

```shell
sail
```

## Configuration

Before you begin, you will need to do the following .

- [Find your org/tenant name](https://developer.sailpoint.com/idn/api/getting-started#find-your-tenant-name).
<!-- - Pick an Authentication method: -->
- [Create a Personal Access Token](https://developer.sailpoint.com/idn/api/authentication#personal-access-tokens)
<!-- - OAuth: Create an [OAuth Client](https://developer.sailpoint.com/idn/api/authentication/#authentication-details) -->

Whichever authentication method you choose will be used to authenticate the SailPoint CLI to your IdentityNow tenant.
Take note of the **Client ID** and the **Client Secret**.

<!-- If configuring OAuth additionally note the **Redirect Port** and **Redirect Path** -->

### Assisted configuration

After you have created the Auth Method, run the configure command the corresponds to your chosen authentication method to configure the CLI for your tenant.
This command will create a configuration file in your home directory to store your tenant's connection details.

#### Personal Access Token

```shell

sail environment example

sail configure

```

<img src="./assets/img/vhs/configure/configure-pat.gif" alt="configure PAT">

<!-- #### OAuth
```shell
sail configure oauth
```
<img src="./assets/img/vhs/configure/configure-oauth.gif" alt="configure OAuth"> -->

### Manual configuration

Alternatively, you can manually create a configuration file in your home
directory.

On **Linux/Mac**, run:

```shell
mkdir ~/.sailpoint
touch ~/.sailpoint/config.yaml
```

On **Windows PowerShell**, run:

```powershell
New-Item -ItemType Directory -Path 'C:\Users\<username>\.sailpoint'
New-Item -ItemType File -Path 'C:\Users\<username>\.sailpoint\config.yaml'
```

The `config.yaml` file should contain the following information.

```yaml
activeenvironment: example # the key that identifies the currently active environment
authtype: pat # currently only pat and pipeline are supported if the ENV VAR SAIL_AUTH_TYPE is configured to "pipeline" it will override this value
customexporttemplatespath: "" # the path to the users custom export templates file if one is provided
customsearchtemplatespath: "" # the path to the users custom search templates file if one is provided
debug: false # the debug setting for the cli
environments: # the configured environments for the cli
example:
baseurl: https://example.api.identitynow.com
pat:
accesstoken: example-access-token
clientid: example-client-id
clientsecret: example-client-secret
expiry: example-access-token-expiry
tenanturl: https://example.identitynow.com
```
### Environment variable configuration
You may also specify environment variables for your configuration. This can
useful when using the CLI in an automated environment, like a CI/CD pipeline,
where consuming the configuration from environment variables would be easier
than creating the config file. Environment variables take precedent over values
defined in a config file.
On **Linux/Mac**, export the following environment variables:
```shell
export SAIL_BASE_URL=https://{org}.api.identitynow.com
export SAIL_CLIENT_ID={clientID}
export SAIL_CLIENT_SECRET={clientSecret}
```

If you want your environment variables to persist across terminal sessions, you
will need to add these exports to your shell profile, like `~/.bash_profile`.

On **Windows PowerShell** run:

```powershell
$env:SAIL_BASE_URL=https://{org}.api.identitynow.com
$env:SAIL_CLIENT_ID={clientID}
$env:SAIL_CLIENT_SECRET={clientSecret}
```

If you want your environment variables to persist across PowerShell sessions,
then use the following command instead:

```powershell
[System.Environment]::SetEnvironmentVariable('SAIL_BASE_URL','https://{org}.api.identitynow.com')
[System.Environment]::SetEnvironmentVariable('SAIL_CLIENT_ID','{clientID}')
[System.Environment]::SetEnvironmentVariable('SAIL_CLIENT_SECRET','clientSecret}')
```

## Usage

Run the `sail` command for an overview of the available commands and flags. You
can use the `-h` flag with any available command to see additional options
available for each command. You can find more information about each command
below.

- [connectors](./cmd/connector/README.md)
- [configure](./cmd/configure/README.md)
- [environment](./cmd/environment/README.md)
- [transforms](./cmd/transform/README.md)
- [search](./cmd/search/README.md)
- [set](./cmd/set/README.md)
- [spconfig](./cmd/spconfig/README.md)
- [va](./cmd/va/README.md)

## Discuss

[Click Here](https://developer.sailpoint.com/discuss) to discuss this tool with
other users.

<!-- LICENSE -->

## License

Distributed under the MIT License. See [the license](./LICENSE) for more
information.

<!-- CONTRIBUTING -->

## Contributing

Before you contribute you
[must sign our CLA](https://cla-assistant.io/sailpoint-oss/sailpoint-cli).
Please also read our [contribution guidelines](./CONTRIBUTING.md) for all the
details on contributing.

<!-- CODE OF CONDUCT -->

## Code of Conduct

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community. Read our
[code of conduct](./CODE_OF_CONDUCT.md) to learn more.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

0 comments on commit 05ce90e

Please sign in to comment.