Skip to main content

Module codex

Module codex 

Source
Expand description

CLI and desktop presentation of the provider’s Codex sign-in.

Structs§

Prompt
What a sign-in asks the person to do: open url, and whether the browser can return to this machine’s callback (when the port is taken, only a pasted redirect URL finishes it).
Timestamp

Enums§

CallbackPort
The registered redirect, or a private loopback redirect for a test provider.
FileExpiry
Known read-only import fields. Wrong-typed optional fields retain the old missing/null behavior; extra fields are ignored and no credential data is echoed in parse errors. A read-only file can carry a usable token without an expiry claim. An expired file reports no timestamp because the existing reader refuses it before returning a token.
Status
Offline sign-in states: only file states have a path, only stored states have a mandatory expiry, and a storage refusal can only accompany an absent sign-in.
StoredExpiry
Owned credentials always carry the expiry saved by the token exchange.

Constants§

AUTH_FILE_VARIABLE
A Codex auth file (for example ~/.codex/auth.json) to read instead of artifactize’s own tokens. It is never written, copied or refreshed.
AUTH_URL_VARIABLE
A loopback test endpoint replacing the sign-in root, beside the backends’ own.
CALLBACK_PATH
CALLBACK_PORT
Match the localhost callback convention of the Codex public-client flow that Pi also uses; listener and OAuth redirect must agree for browser/pasted-URL interoperability.

Functions§

auth_file
The configured read-only auth file, if any.
auth_root
The sign-in root: its loopback test endpoint, else https://auth.openai.com.
login
Sign in interactively and save artifactize’s own tokens. The sign-in URL goes to stderr, also with –json.
login_with
logout
status