Skip to Content
AdunemDocs
GuidesCLI referenceHelp

login and logout

Sign this computer in to Adunem by approving it in your browser, and sign it out again.

adunem login connects this computer to your Adunem account. You approve it in the browser, so no password or token is ever typed into the terminal. adunem logout revokes the computer and removes the login.

Most commands need you to be signed in. link and connect --code sign you in on their own when needed, so you often never run login by hand.

login

Usage

adunem login [--gateway <url>] [--no-browser] [--dev]

Options

--gateway, -gtextdefault: your last gateway, else https://api.adunem.com

The Adunem address to sign in to. You only need this for a self-hosted Adunem or a local test server.

--no-browserflagdefault: off

Print the approval link and code but do not open a browser. Use it on a server, over SSH, or anywhere there is no browser to open. Open the link on any device where you are signed in.

--devflagdefault: off

Sign in with a developer token instead of approving in the browser. For development and testing only. It asks for the token without showing it, or reads it from standard input when the input is not a terminal. A token is never accepted as a command-line argument.

What you'll see

The CLI shows a link and a code

It also opens the link in your browser.

To approve this device, open:

    https://app.adunem.com/device

and confirm the code:  WXYZ-1234

Waiting for approval …

You approve in the browser

Check that the code on the page matches the one in your terminal, then approve.

The CLI finishes

✓ logged in to https://api.adunem.com as 3f6c…
→ next: `adunem link claude-code` (or codex), or `adunem init` in an agent's folder

The approval link and code expire after 10 minutes. If you wait too long, you get login timed out; run adunem login again.

What it stores

The login is stored in your operating system's keyring (Keychain on macOS, Credential Manager on Windows, Secret Service on Linux). The CLI keeps a short-lived access token and a longer-lived refresh token, and renews the access token by itself. Only non-secret details, such as which gateway you use, go in the config folder. See Environment and storage.

Each computer you sign in on is a separate device. You can see and revoke them on the Devices page.

On a machine without a keyring (a minimal Linux server, for example), signing in fails with "secure credential storage is unavailable". Install or unlock a keyring, or set ADUNEM_TOKEN for the shell session. See Environment and storage.

Examples

# The usual way
adunem login

# On a server over SSH: print the link instead of opening a browser
adunem login --no-browser

# A self-hosted Adunem
adunem login --gateway https://adunem.example.com

logout

Usage

adunem logout [--gateway <url>]

Options

--gateway, -gtextdefault: your last gateway, else https://api.adunem.com

Which sign-in to remove.

What it does

  1. Revokes this device on Adunem, so its refresh token stops working.
  2. Removes the stored login from the keyring.
  3. Forgets the profile for that gateway in the config folder.
✓ logged out of https://api.adunem.com

If the CLI cannot reach Adunem, it warns could not revoke this device on the server; revoke it in the web app. The local login is still removed. Finish the job on the Devices page.

logout does not unlink Claude Code or Codex. Run adunem unlink for that.

Common problems

MessageWhat to do
not logged in to <gateway>; run adunem loginYou have no login for that gateway. Run adunem login, adding --gateway if you use a self-hosted address.
session expired or device revoked; run adunem loginThe device was revoked, or its refresh token expired. Sign in again.
refusing to send credentials to <gateway> without TLSThe address uses plain http:// on another machine. Use https://, or see ADUNEM_ALLOW_INSECURE in Environment and storage.
cannot reach gatewayCheck your network and the --gateway address.

On this page