opencode

package
v0.0.0-...-a7464a5 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package opencode provides a harness.Provider implementation for the opencode CLI agent (https://opencode.ai, https://github.com/sst/opencode).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(model string, opts ...Option) harness.Provider

New creates an opencode harness.Provider for the given model. The model must be in opencode's "provider/model" form, e.g. "anthropic/claude-sonnet-4-6".

Types

type Event

type Event = harness.Event

Event is an alias for harness.Event.

type Option

type Option func(*provider)

Option configures an opencode provider.

func WithAgent

func WithAgent(agent string) Option

WithAgent sets the --agent flag (e.g. "build", "plan", "general").

func WithThinking

func WithThinking() Option

WithThinking enables the --thinking flag so reasoning blocks are streamed.

Jump to

Keyboard shortcuts

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