Getting started¶
Installation¶
You can install the CLI via go modules. For private repositories, configure Git credentials:
# Requires Go 1.24+ and git 2.24+
export GOPRIVATE=github.com
git config --global url."https://<username>:<token>@github.com".insteadOf "https://github.com"
go install github.com/cyberark/idsec-cli-golang/cmd/idsec@latest
Make sure that the PATH environment variable points to the go binary path, for example:
export PATH=$PATH:$(go env GOPATH)/bin
CLI Usage¶
The CLI supports profiles, which can be configured as needed and used for consecutive actions.
The CLI has the following basic commands:
- configure: Configure profiles and their authentication methods (see Configure)
- login: Log in using the configured profile authentication methods (see Login)
- exec: Execute commands for supported services (see Exec). You can also skip
execand invoke services directly, e.g.idsec sia sso short-lived-password - profiles: Manage multiple profiles on the machine (see Profiles)
- cache: Manage idsec cache on the machine (see Cache)
- upgrade: Upgrade the CLI to the latest version (see Upgrade)
Basic flow¶
-
Configure a profile (either silently or interactively):
idsec configure --silent --work-with-isp --isp-username myuser -
After the profile is configured, log in:
idsec login --silent --isp-secret mysecret -
Execute actions (such as generating a short-lived SSO password):
idsec sia sso short-lived-passwordYou can also use
idsec exec sia sso short-lived-password— both forms are equivalent.