Browserless CLI Login


You can use the CLI without an interactive login by using a service account.


Required Steps

To set up a service account used by the CLI to perform a browserless login:

  1. Using the console:


If you wish, the CLI can be used instead of using the console.

See service account create, service account add-key, policy create, policy add-binding

  1. To configure the CLI to use the service account, run the following command (choose your own PROFILE_NAME):
cpln profile update PROFILE_NAME --token SERVICE_ACCOUNT_KEY_FROM_STEP_1
  1. To set the profile as the default, run the following command:
cpln profile set-default PROFILE_NAME

Once the profile is set as the default, subsequent CLI commands will run as the service account with its permissions.


If logging in with a service account using the steps above is not executing the CLI commands as expected, add the service account to the superusers group.

This group will give full access to the service account. If the CLI commands are now returning as expected, additional permissions will need to be added to the service account using policies.

If it is still not working, ensure that the default profile is set to PROFILE_NAME.

Copyright © 2024 Control Plane Corporation. All rights reserved. Revision ba5c0f81