AYA

Sign in

How a terminal signs in to AYA, how long the sign-in lasts and how it ends. Generated from the terminal client overlay.

Sign in

Usage: aya login [--profile NAME] [--server URL]

  1. Run aya login. The client prints a web address and a short code.
  2. Open the address in a browser where you are signed in to AYA, and confirm the code.
  3. The tokens go to the OS keychain under service aya-cli (on Linux through secret-tool). They are never printed.

The terminal asks the server for a device code (/api/auth/device/start) and polls /api/auth/device/poll. It waits between 1 and 60 seconds between polls, adds 5 seconds each time the server asks it to slow down, and refreshes a token 60 seconds before it expires (/api/auth/device/refresh).

Sign out

End this terminal's sign-in: the login is revoked on the server and the tokens are removed from your OS keychain. The server revokes the login at /api/auth/device/logout.

Use a key instead of a sign-in

Set AYA_API_KEY to a key and the client presents that key instead of the device session. Profiles: AYA_PROFILE picks one, AYA_CONFIG_DIR moves the config directory, AYA_SERVER_URL sets the server. Profiles are kept in aya/profiles.json, under a profile named default by default.

Sign-in failures

Exit code 30 is a sign-in failure. Its kinds: unauthenticated, invalid_token, device_unknown, client_key_missing, client_required.