launcher

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package launcher implements `shim run`: locate `claude`, inject the ANTHROPIC_BASE_URL + ANTHROPIC_API_KEY env vars pointing at the local shim server, and exec it with the user's args. Stdio is wired through.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(opts Options) (int, error)

Run resolves the target binary via exec.LookPath, prints a one-line breadcrumb to Stderr (so users see *something* before the subprocess produces output), then execs the binary with env injected. Returns the subprocess exit code as (code, nil) on a normal-but-non-zero exit, or (0, err) when the launcher itself failed (lookup, fork, IO).

Types

type Options

type Options struct {
	Bin     string
	BaseURL string
	APIKey  string
	Args    []string
	Stderr  io.Writer
}

Options configures a Run invocation. Bin defaults to "claude" when empty. Stderr defaults to os.Stderr; tests inject a buffer.

Jump to

Keyboard shortcuts

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