Skip to navigation

Sessions

Log in to your AI Agent, check the session, and log out. Device login is the default. For its steps, see Log in. This page covers the login without a browser, and the status command.

Commands

CommandWhat it does
loginLogs in with device login, or with an email and a password.
logoutRemoves the stored session for the AI Agent.
statusShows if the session is valid and adacli can connect to the Agent.

Examples

Log in with an email and a password that adacli reads from stdin:

adacli acme login --email admin@example.com --password-stdin < ~/.ada-password

Log in with ADACLI_EMAIL and ADACLI_PASSWORD set in the environment:

adacli acme login

Check the session as JSON:

adacli acme status --json

Log out:

adacli acme logout

Details

  • adacli takes the email from --email, then from ADACLI_EMAIL. It takes the password from --password-stdin or --password, then from ADACLI_PASSWORD.
  • If adacli finds an email and a password, it logs in without a browser. If it finds neither, it starts device login. If it finds only one, it exits with code 2.
  • --password shows the password in the process list. Use --password-stdin or ADACLI_PASSWORD.
  • An SSO account and an account with MFA must use device login.
  • login --device-code <code> gets a session from a device code that someone already approved. It opens no browser.
  • status exits with code 0 when the session is valid. It exits with code 3 when you are not logged in or the session expired. When the check itself fails, for example because adacli cannot connect to the Ada service, status exits with the code of that failure, such as 8. An AI assistant uses the exit code to check the login before it runs other commands.
  • With --json, status writes its result to stdout, also when there is no working session: not_logged_in or session_invalid. It writes no error to stderr.
  • logout does not log you out of the dashboard.

For every option of a command, run it with --help, for example adacli acme login --help.

  • skills: install the skills that device login offers.
  • session-tracking: log the intent of an AI assistant.
  • upgrade: check for a newer adacli release.