CodexWrapper.Commands.Auth (CodexWrapper v0.4.0)

Copy Markdown View Source

Authentication commands -- login, logout, status.

Wraps codex login, codex logout, and codex login status.

Summary

Functions

Login to Codex.

Logout from Codex.

Check login status.

Functions

login(config, opts \\ [])

@spec login(
  CodexWrapper.Config.t(),
  keyword()
) :: {:ok, String.t()} | {:error, term()}

Login to Codex.

Options

  • :with_api_key - Use API key authentication (boolean)
  • :with_access_token - Use access token authentication (boolean)
  • :device_auth - Use device authorization flow (boolean)

logout(config)

@spec logout(CodexWrapper.Config.t()) :: {:ok, String.t()} | {:error, term()}

Logout from Codex.

status(config)

@spec status(CodexWrapper.Config.t()) :: {:ok, String.t()} | {:error, term()}

Check login status.