The CLI is used to perform actions against the Control Plane API. Since most of the CLI commands require the caller to be authenticated and authorized, the CLI profile is used to store the security token and default properties.
After installation, to execute any of the CLI commands, at least one profile must be created and associated with an authenticated user or service account.
To create the profile named default
and authenticate with a user account, follow the
interactive login - default profile instructions.
To create a profile using a custom name and authenticate with a user account, follow the interactive login - custom profile instructions.
After logging in, that profile will be marked as the default and used by any future CLI command.
The following default properties are set on the profile during creation:
true
text
age
https://api.cpln.io
false
30
To override these values, refer to the default properties section.
Executing the command:
copycpln profile login
will launch the login page within a browser. If the authentication is successful, a new profile named default
will be created (if it doesn't already exist). This login targets only the profile named default
. After logging in,
this profile will be marked as the default and used by any future CLI command.
To authenticate to a specific profile, executing the command:
copycpln profile update PROFILE_NAME --login
will launch the login page within a browser. If the authentication is successful, a new profile with the given name will be created (if it doesn't already exist). After logging in, this profile will be marked as the default and used by any future CLI command.
The --org
or --gvc
options are required on a majority of the CLI commands and are set to an empty string by default. The
default org, GVC, and other properties can be set by updating your profile.
The following properties can be updated:
Sample Command:
copycpln profile update PROFILE_NAME --PROPERTY NEW_VALUE
Examples:
Update One Propertycpln profile update my_profile --org test-org
Update Multiple Propertiescpln profile update my_profile --org test-org --gvc test-gvc
If you have multiple profiles, execute the following command to mark a profile as default
:
copycpln profile set-default PROFILE_NAME
Future CLI commands will use this profile. If the profile is not authenticated, follow the instructions here.
Executing the command:
copycpln profile token PROFILE_NAME
will show the JWT token for the given profile if it has a valid authentication token. This token can be used to override any of
the CLI commands by using the --token
option.
If a profile is no longer needed, execute the command:
copycpln profile delete PROFILE_NAME