codex

package
v0.0.169 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2026 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package codex implements the kool codex subcommand (install / ensure Codex CLI).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(args []string) error

Handle runs the kool codex subcommand.

func RunForTest

func RunForTest(args []string, stdout, stderr io.Writer) int

RunForTest runs the codex handler in-process (args after "kool codex"). Example: RunForTest([]string{"install", "--dry-run"}, stdout, stderr)

func SetDepsForTest

func SetDepsForTest(d Deps) (restore func())

SetDepsForTest installs package-level deps for one test invocation. Returns restore; callers should defer restore under a process mutex.

Types

type Deps

type Deps struct {
	LookPath    func(file string) (string, error)
	RunShell    func(ctx context.Context, cmd string) error
	RunVersion  func(ctx context.Context, bin string) (string, error)
	FetchLatest func(ctx context.Context) (string, error)
}

Deps are injectable for L2 doctests (nil fields → production defaults).

Jump to

Keyboard shortcuts

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