CLI Reference
Commands
- infra login
- infra logout
- infra list
- infra use
- infra destinations list
- infra destinations remove
- infra grants list
- infra grants add
- infra grants remove
- infra users add
- infra users edit
- infra users list
- infra users remove
- infra keys list
- infra keys add
- infra keys remove
- infra providers list
- infra providers add
- infra providers remove
- infra info
- infra version
- infra about
infra login
Login to Infra
infra login [SERVER] [flags]
Examples
# By default, login will prompt for all required information.
$ infra login
# Login to a specific server
$ infra login infraexampleserver.com
# Login with a specific identity provider
$ infra login --provider okta
# Login with an access key
$ infra login --key 1M4CWy9wF5.fAKeKEy5sMLH9ZZzAur0ZIjy
Options
--key string Login with an access key
--non-interactive Disable all prompts for input
--provider string Login with an identity provider
--skip-tls-verify Skip verifying server TLS certificates
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra logout
Log out of Infra
Synopsis
Log out of Infra Note: [SERVER] and [--all] cannot be both specified. Choose either one or all servers.
infra logout [SERVER] [flags]
Examples
# Log out of current server
$ infra logout
# Log out of a specific server
$ infra logout infraexampleserver.com
# Logout of all servers
$ infra logout --all
# Log out of current server and clear from list
$ infra logout --clear
# Log out of a specific server and clear from list
$ infra logout infraexampleserver.com --clear
# Logout and clear list of all servers
$ infra logout --all --clear
Options
--all logout of all servers
--clear clear from list of servers
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra list
List accessible destinations
infra list [flags]
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra use
Access a destination
infra use DESTINATION [flags]
Examples
# Use a Kubernetes context
$ infra use development
# Use a Kubernetes namespace context
$ infra use development.kube-system
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra destinations list
List connected destinations
infra destinations list [flags]
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra destinations remove
Disconnect a destination
infra destinations remove DESTINATION [flags]
Examples
$ infra destinations remove docker-desktop
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra grants list
List grants
infra grants list [flags]
Options
--destination string Filter by destination
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra grants add
Grant an identity access to a destination
infra grants add IDENTITY DESTINATION [flags]
Examples
# Grant an identity access to a destination
$ infra grants add [email protected] docker-desktop
# Grant a group access to a destination
$ infra grants add group-a staging --group
# Grant access with fine-grained permissions
$ infra grants add [email protected] staging --role viewer
# Assign a user a role within Infra
$ infra grants add [email protected] infra --role admin
Options
-g, --group Required if identity is of type 'group'
--role string Type of access that identity will be given (default "connect")
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra grants remove
Revoke an identity's access from a destination
infra grants remove IDENTITY DESTINATION [flags]
Examples
# Remove all grants of an identity in a destination
$ infra grants remove [email protected] docker-desktop
# Remove all grants of a group in a destination
$ infra grants remove group-a staging --group
# Remove a specific grant
$ infra grants remove [email protected] staging --role viewer
# Remove adminaccess to infra
$ infra grants remove [email protected] infra --role admin
Options
-g, --group Group to revoke access from
--role string Role to revoke
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra users add
Create a user.
Synopsis
Create a user.
Note: A new user must change their one time password before further usage.
infra users add USER [flags]
Examples
# Create a user
$ infra users add [email protected]
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra users edit
Update a user
infra users edit USER [flags]
Examples
# Set a new one time password for a user
$ infra users edit [email protected] --password
Options
--non-interactive Disable all prompts for input
-p, --password Set a new one time password
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra users list
List users
infra users list [flags]
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra users remove
Delete a user
infra users remove USER [flags]
Examples
# Delete a user
$ infra users remove [email protected]
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra keys list
List access keys
infra keys list [flags]
Options
--user string The name of a user to list access keys for
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra keys add
Create an access key
Synopsis
Create an access key for a user.
infra keys add USER [flags]
Examples
# Create an access key named 'example-key' that expires in 12 hours
$ infra keys add example-key [email protected] --ttl=12h
Options
--extension-deadline duration A specified deadline that the access key must be used within to remain valid (default 720h0m0s)
--name string The name of the access key
--ttl duration The total time that the access key will be valid for (default 720h0m0s)
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra keys remove
Delete an access key
infra keys remove KEY [flags]
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra providers list
List connected identity providers
infra providers list [flags]
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra providers add
Connect an identity provider
Synopsis
Add an identity provider for users to authenticate. PROVIDER is a short unique name of the identity provider being added (eg. okta)
infra providers add PROVIDER [flags]
Examples
# Connect okta to infra
$ infra providers add okta --url example.okta.com --client-id 0oa3sz06o6do0muoW5d7 --client-secret VT_oXtkEDaT7UFY-C3DSRWYb00qyKZ1K1VCq7YzN
Options
--client-id string OIDC client ID
--client-secret string OIDC client secret
--url string Base URL of the domain of the OIDC identity provider (eg. acme.okta.com)
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra providers remove
Disconnect an identity provider
infra providers remove PROVIDER [flags]
Examples
$ infra providers remove okta
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra info
Display the info about the current session
infra info [flags]
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra version
Display the Infra version
infra version [flags]
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")
infra about
Display information about Infra
infra about [flags]
Options inherited from parent commands
--help Display help
--log-level string Show logs when running the command [error, warn, info, debug] (default "info")