> For the complete documentation index, see [llms.txt](https://docs.scrt.network/secret-network-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scrt.network/secret-network-documentation/secretvm-confidential-virtual-machines/secretvm-cli/authentication-commands.md).

# Authentication Commands

Commands for managing authentication with the SecretVM service.

## auth login

Login to the service using your Keplr wallet.

**Note**: Works only in interactive mode (`-i, --interactive`)

**Usage:** `secretvm-cli auth login`

**Description:** \
Initiates an interactive browser-based login session. This command opens the SecretAI sign-in page for authentication via Keplr wallet and starts a local server to capture the resulting credentials.

## auth logout

Logout from the service and clear the current session.

**Usage:** `secretvm-cli auth logout`

**Description:**\
This command clears the saved session information, effectively logging you out of the service.

## status

**Usage:** `secretvm-cli status`

**Description:**\
This command checks the current session. If you are logged in, it will display your user information (email or sub) and session expiry time. If you are not logged in, it will indicate so.

### API keys

**Usage:** `secretvm-cli -k $YOUR_API_KEY`

**Description:**\
You can use your API key for each `secretvm-cli` command. You can generate your API keys on [devportal](https://secretai.scrtlabs.com/keys).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.scrt.network/secret-network-documentation/secretvm-confidential-virtual-machines/secretvm-cli/authentication-commands.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
