Log in to Olares
Before olares-cli can act on behalf of an Olares user, log in once to create a profile. A profile is one Olares instance plus one user identity. After you log in, the CLI refreshes your tokens automatically, so you only log in again when the refresh token becomes invalid.
This page covers the user-mode login. It does not apply to host mode, which uses root and kubeconfig and needs no login.
Log in for the first time
Run the following command to start the login. Replace
[email protected]with your own Olares ID.basholares-cli profile login --olares-id [email protected]When the CLI prompts
password for <id>:, type your Olares password and press Enter. The input is hidden.If two-factor authentication is enabled on your Olares, the CLI prompts again with
two-factor code for <id>:. Enter the 6-digit code from LarePass and press Enter.Verify that the profile is created and logged in.
basholares-cli profile listExample output:
textNAME OLARES-ID STATUS [email protected] [email protected] logged-in * [email protected] [email protected] logged-inThe leading
*marks the current profile.
Manage profiles
If you work with more than one Olares instance or identity, each login adds a profile. Use these commands to move between them.
| Task | Command |
|---|---|
| List all profiles | olares-cli profile list |
| Show the current identity | olares-cli profile whoami |
| Switch to another profile | olares-cli profile use <name> |
| Switch back to the previous profile | olares-cli profile use - |
| Remove a profile and its stored token | olares-cli profile remove <name> |
Where tokens are stored
Tokens are stored automatically after a successful login. You don't need to manage them by hand. To clear them, use olares-cli profile remove rather than editing files directly.
| OS | Storage |
|---|---|
| macOS | Keychain |
| Linux | AES-encrypted file under ~/.local/share/olares-cli/ |
| Windows | DPAPI |
Next step
Install the Agent Skills into your agent to drive Olares from natural language.