Skip to content

Sign in and switch accounts

Sign in to AlisX from the terminal, check which user you are, and choose the account your Build usage is measured against and that is invoiced for it each month.

Prerequisites

Sign in

  1. Start the browser flow:

    alis login --open
    

    The sign-in page opens in your browser and the terminal waits for a code.

  2. Sign in, copy the code the page shows, paste it into the terminal and press Enter.

  3. Confirm:

    alis whoami
    
    ana@example.com (<user-id>)
    

An agent must never run bare alis login: it blocks on stdin. It asks for the URL, hands it to you, and finishes with the code you paste back:

alis login --json
JSON
{"url": "https://identity.alisx.com/authorize?redirect_uri=offline", "agent": "Ask the user to open url in a browser, sign in, and paste the code back to you; then run `alis login <code> --json`."}
alis login <code> --json

Choose the active account

Every command that touches the platform needs an active account. A fresh sign-in may have none, and you may belong to several.

  1. List the accounts you can choose from:

    alis accounts list --json
    
    JSON
    {
      "accounts": [
        {"name": "accounts/<id>", "display_name": "Acme", "active": true},
        {"name": "accounts/<other-id>", "display_name": "Acme Labs", "active": false}
      ]
    }
    
  2. Select one. Your session is refreshed with it:

    alis accounts select accounts/<other-id> --json
    

From now on the usage you generate is measured against that account, and it receives the invoice for its users' spend at the end of the month. alis ideate also reads and creates projects in this account, and the console switches to it too. In the TUI, CtrlA opens the same picker.

Recognise a signed-out session

Any command that exits with code 4 means the session has expired or you are signed out. Run alis login again and retry. A command that returns ACTIVE_BUILD_ACCOUNT_REQUIRED (exit 1) needs an account selected first. An agent that sees either code must hand the step to you: it never picks a billing account on your behalf.

Sign out

In the TUI, press Z. There is no CLI sign-out command.

Related: alis login, alis accounts, Accounts and billing.