codex

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2026 License: MIT Imports: 5 Imported by: 0

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
}

func Find

func Find() (*CLI, error)

func (*CLI) Login

func (c *CLI) Login(home string, opts LoginOptions, stdio Stdio) error

Login uses home as CODEX_HOME, so the real Codex directory is not touched.

func (*CLI) Logout added in v0.2.0

func (c *CLI) Logout(home string, stdio Stdio) error

func (*CLI) RestartDaemon added in v0.2.1

func (c *CLI) RestartDaemon(home string, stdio Stdio) error

RestartDaemon interrupts every session. Codex starts a daemon if none is running, so the caller must check first.

type LoginOptions

type LoginOptions struct {
	DeviceAuth  bool
	APIKey      bool
	AccessToken bool
}

LoginOptions may set at most one method; the zero value is a browser login.

type Stdio

type Stdio struct {
	In  io.Reader
	Out io.Writer
	Err io.Writer
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL