The authentication commands allow you to register, log in, log out, and reset your password, as well as create tokens for CI/CD.
liblab is currently in beta. Sign up now to get started with our beta.
|Log in to your account|
|Log out of your account|
|Change your password|
|Create a long-lived token to be used in a CI/CD pipeline|
Register a new account, or Log in to an existing account.
This will launch your default browser where you can register or log in, either using your email address and password, or using a Google account. If you are part of an organization that has a liblab account, then your email address, or the email address for your Google account, must match that organization.
The CLI will provide you with a code, and you will need to verify that this code matches the one shown in your browser:
A browser will now open, confirm the code and login
The confirmation code is WNCZ-KDDP
If you have any issues you may also use the link: https://auth.liblab.com/activate?user_code=WNCZ-KDDP
Waiting for confirmation and login at browser... ⣽
This output will also contain a browser link that you can use if your browser does not open automatically, or if you want to use a different browser, or different browser profile.
Once you have verified the code on screen matches the one given by the CLI, select Confirm, then sign up or log in.
From the log in screen, you can also reset your password if you need to. Your browser should remember your login details, so if you log in again from the CLI, you will be automatically logged in once you have confirmed th device code.
Once you are successfully registered or logged in, you will get a confirmation message.
You can now close your browser window and return to the CLI, which will now be logged in.
Logged in successfully with account: firstname.lastname@example.org
You will also be sent an email to verify your account. You will need to select the Verify Your Account button in the email to verify your account. This email may take a few minutes to arrive, and may end up in your junk mail folders.
If you run other commands such as
liblab init without logging in, you will be prompted to log in first.
Log out of your account.
This will log you out of your account. You will need to log in again to use the CLI.
User logged out successfully
This command allows you to change your password. It will launch your default browser where you can enter a new password.
The CLI output will also contain a browser link that you can use if your browser does not open automatically, or if you want to use a different browser, or different browser profile.
A browser will now open where you can change your password
If you have any issues you may also use the link: https://auth.liblab.com/u/reset-password?ticket=****
You have been logged out. Please log in again.
Once you run this command, you will be logged out of the CLI, and will need to log in again once you have changed your password.
Create a long-lived token. Long lived tokens allow you to use the CLI without logging in, such as in a CI/CD pipeline.
liblab token [create/revoke/list]
|Create a new named long lived token.|
|Revoke a long lived token.|
|List all long lived tokens.|
liblab token create
This command creates a new long lived token with the given name.
liblab token create <name>
<name> to the name for your token. For example, to create a token for a GitHub action called
liblab token create LIBLAB_GITHUB_TOKEN
When you run this command, you will need to log in again to confirm your identity.
$ liblab token create LIBLAB_GITHUB_TOKEN
Token successfully generated, it will be valid for 90 days
The token is just the string between the
------- lines. You do not need to include the lines themselves.
You will need to copy the token and store it somewhere safe. It will only be shown once, and you will not be able to retrieve it again. If you lose this token, you can revoke it using
liblab token revoke <name>, and create a new one.
These tokens last 90 days by default, so you will need to generate a new token before this time. You can change this from 1 to up to 364 days using the optional
You also can generate multiple tokens, all with different names.
To use this token, set an environment variable called
LIBLAB_TOKEN to the value of this token. You can then use the CLI without logging in, such as in a CI/CD pipeline.
If your token is not working, make sure you have just included the token itself, and not the surrounding
For an example of using a token in a GitHub action, check out our GitHub actions tutorial.
|The lifespan of the token from 1 to 364 days.|
Use this optional parameter to set the lifespan of the token. The default is 90 days, and the maximum is 364 days.
liblab token create LIBLAB_GITHUB_TOKEN --durationInDays=364
liblab token revoke
This command revokes the long lived token with the given name.
liblab token revoke <name>
For example, to revoke the
liblab token revoke LIBLAB_GITHUB_TOKEN
This will revoke the token immediately.
Token revoked successfully
liblab token list
This command lists all long lived tokens that you have created.
liblab token list
This will output a list of all the tokens you have created. You will only see the tokens by name, not the actual value of the token.
Here are all of your active tokens