Authentication

Before you can manage projects or index code, you need to authenticate the CLI with your DPage account.

Login

Use the login command to start the authentication process:

Terminal
dpage login
1

Run Login Command

The CLI will generate a secure link and attempt to open it in your default browser.
2

Authorize in Browser

A web page will open asking you to sign in to DPage and authorize the CLI. Click 'Authorize' to continue.
3

Confirmation

Once authorized, the browser will display a success message, and the CLI will update to show you are logged in.
The CLI uses OAuth 2.0. Your token is stored securely in an encrypted local configuration file and is never exposed in plain text.

Verify Identity

To check which account is currently logged in, use the whoami command:

Terminal
dpage whoami

Example output:

Text
Logged in as: jane.doe@example.com (User ID: user_12345)

Logout

To sign out and remove your local authentication token, use the logout command:

Terminal
dpage logout
Logging out will immediately revoke your CLI access token. You will need to run dpage login again to perform any authenticated actions.

Manual Token Management

In some environments (like CI/CD), browser-based authentication is not possible. For these scenarios, we support Personal Access Tokens.

Check your Dashboard Settings to generate tokens for automated environments. Use the --token flag with any command to use a specific token.
Terminal
dpage code index --token dpage_pat_your_token_here