automagent login / logout / whoami
Authenticate with the Automagent Hub
Usage
$ automagent login [options]
Options
| Flag | Description | Default |
|---|---|---|
--hub-url <url> | Hub URL | http://localhost:3000 |
How it works
- Starts a temporary local HTTP server to receive the OAuth callback
- Opens your browser to the Hub’s GitHub authentication page
- After you authorize, the Hub redirects back to the local server with a token
- Credentials (token, username, Hub URL) are saved to
~/.automagent/credentials.jsonwith restricted permissions (mode0600)
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
- automagent push — Publish agents (requires authentication)
- automagent pull — Download agents