auth

sign in to Coder and manage saved server sessions

auth login [--server <server>] [--workspace <workspace>] [--yes] [--device] [--json]

sign in through the browser

Sign in with Wular Auth in your browser. The CLI keeps the tokens in ~/.coder/session.json, and commands that talk to a server then act as you.

  • --server <server> act on the Coder server
  • --workspace <workspace> with --server: the workspace to act in (default: the saved one)
  • --yes with --server: connect to a server used for the first time without asking
  • --device show a code to approve on another device; the default without a local browser
  • --json JSON output

Environment:

coder auth login  # sign in to the hosted service
coder auth login --server https://agents.example.com  # sign in to a self-hosted server

auth logout [--server <server>] [--yes] [--json]

sign out and forget the saved session

Revoke the saved session for that server at Wular Auth and forget its tokens.

  • --server <server> sign out of this Coder server (default: the hosted one)
  • --yes connect to a server used for the first time without asking
  • --json JSON output

auth status [--json]

show where you are signed in

List saved sessions with their server, user, and workspace.

  • --json JSON output

Environment: