Skip to content
px0-aiPublic

About

Detect coding-agent CLIs (claude, cursor-agent, agy, opencode) installed on this machine and run them headless.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Harness

Detect coding-agent CLIs (claude, cursor-agent, agy, opencode, codex) installed on this machine and run them headless.

go get github.com/px0-ai/harness
// 1. Detect: every known harness and whether it is installed.
for _, h := range harness.Detect(nil) {
	fmt.Println(h.Name, h.Installed) // e.g. claude true
}

// 2. Resolve: pass a harness name and a model. "" lets the harness use its own.
cmd, err := harness.Resolve("claude", "sonnet")

// 3. Run.
res := harness.Run(ctx, cmd, "rename foo to bar", harness.Options{Dir: repo})
fmt.Println(res.Stdout, res.Err)

Built-in: claude, cursor-agent, agy, opencode, codex (details). Any other CLI works with a template like mytool --task {prompt}.

Presets run non-interactively and auto-approve edits.

License

MIT

About

Detect coding-agent CLIs (claude, cursor-agent, agy, opencode) installed on this machine and run them headless.

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages