Skip to main content

Login

drwn login authenticates the CLI with the Darwinian analyzer through the device flow.

The command requires an analyzer API URL from DRWN_ANALYZER_URL or analyzer.apiUrl in ~/.agents/drwn/config.json:

DRWN_ANALYZER_URL=http://localhost:8787 drwn login
{
"version": 1,
"analyzer": {
"apiUrl": "http://localhost:8787",
"webBaseUrl": "https://darwinian-harness-services.pages.dev"
},
"optional": {}
}

Run without opening a browser automatically:

drwn login --no-browser

Emit machine-readable output:

drwn login --json

In JSON mode, the device sign-in URL and user code are written to stderr while stdout remains the final JSON success object.

On success, credentials are written to ~/.agents/drwn/credentials.json with owner-only permissions.

  • Whoami — validate the current session
  • Logout — revoke best-effort and remove local credentials
  • Analyze — upload session archives after authentication