Auth
Authenticate with the Loop API using the loop CLI. Login, logout, and check authentication status.
Auth
The auth command group manages authentication with the Loop API. It provides interactive login, credential clearing, and status checking.
loop auth login
Interactively authenticate with the Loop API. Prompts for the API URL and API key, validates the credentials against the server, and saves them to the config file.
loop auth loginInteractive prompts
| Prompt | Default | Description |
|---|---|---|
| Loop API URL | http://localhost:5667 | API base URL |
| API key | none | Your Loop API key (starts with loop_) |
The command validates the credentials by making a test request to the API. If validation fails, the credentials are not saved.
Example session
$ loop auth login
? Loop API URL: https://api.looped.me
? API key (starts with loop_): ****
✔ Authenticated successfully
Config saved to ~/.loop/config.jsonError output
$ loop auth login
? Loop API URL: https://api.looped.me
? API key (starts with loop_): ****
✖ Authentication failed. Check your API key and URL.loop auth logout
Clear stored credentials from the config file.
loop auth logoutSample output
Logged out. Credentials cleared.loop auth status
Show the current authentication state, including the configured URL and a masked version of the API key.
loop auth statusSample output (authenticated)
Authenticated
URL: https://api.looped.me
Token: loop_****...abcdSample output (not authenticated)
Not authenticated. Run: loop auth loginTypical authentication workflow
# 1. Log in interactively
loop auth login
# 2. Verify authentication state
loop auth status
# 3. Start using the CLI
loop issues list
# 4. When done, clear credentials
loop auth logoutConfiguration storage
Credentials are stored in ~/.loop/config.json with restricted file permissions (0600). The config file is also used by loop config set and loop config get. See the CLI Reference for details on configuration resolution order.