Documentation
¶
Overview ¶
Package codex runs the official Codex CLI as a child process.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLI ¶
type CLI struct {
Path string
}
CLI is a located codex executable.
func (*CLI) Login ¶
func (c *CLI) Login(home string, opts LoginOptions, stdio Stdio) error
Login runs `codex login` with home as its CODEX_HOME, so the login cannot touch the user's real Codex directory.
func (*CLI) Logout ¶ added in v0.2.0
Logout runs `codex logout` with home as its CODEX_HOME. The caller places the credentials to revoke in that directory, so the user's real Codex directory is never touched.
func (*CLI) RestartDaemon ¶ added in v0.2.1
RestartDaemon runs `codex app-server daemon restart` for the daemon of the Codex home at home, which is the only supported way to make it reload auth.json. It interrupts every session running on the daemon. Codex starts a daemon if none is running, so the caller must first check that one is.
type LoginOptions ¶
LoginOptions selects the `codex login` method. At most one may be set; the zero value is the default browser login.