codex

package
v0.0.164 Latest Latest
Warning

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

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

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