automagent login / logout / whoami

Authenticate with the Automagent Hub

Usage

$ automagent login [options]

Options

FlagDescriptionDefault
--hub-url <url>Hub URLhttp://localhost:3000

How it works

  1. Starts a temporary local HTTP server to receive the OAuth callback
  2. Opens your browser to the Hub’s GitHub authentication page
  3. After you authorize, the Hub redirects back to the local server with a token
  4. Credentials (token, username, Hub URL) are saved to ~/.automagent/credentials.json with restricted permissions (mode 0600)

The login flow has a 120-second timeout. If the browser doesn’t open automatically, the CLI prints the URL so you can open it manually.

Example

$ automagent login
Opening browser to authenticate...

If the browser doesn't open, visit:
http://localhost:3000/auth/github?cli_port=54321

Logged in as alice

automagent logout

Clear stored credentials.

Usage

$ automagent logout

Deletes ~/.automagent/credentials.json. This is a no-op if you are not logged in.


automagent whoami

Show the currently authenticated user.

Usage

$ automagent whoami

Displays your username and the Hub URL you are authenticated with. If you are not logged in, prints a message suggesting automagent login.

Example

$ automagent whoami
alice
Hub: http://localhost:3000

See also