ClaudeCode

works.iterative.claude.kyo.ClaudeCode
object ClaudeCode

Entry point for querying the Claude Code CLI with Kyo.

query streams messages as the CLI produces them; querySync, queryResult and ask collect it. Every operation fails with a typed CLIError through Abort.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ClaudeCode.type

Members list

Value members

Concrete methods

def ask(prompt: String)(using Frame): String < (Async & Abort[CLIError])

Asks with default options, returning the assistant's answer.

Asks with default options, returning the assistant's answer.

Attributes

def query(options: QueryOptions)(using Frame): Stream[Message, Async & Abort[CLIError] & Scope]

Runs a query and streams the CLI's messages as they arrive.

Runs a query and streams the CLI's messages as they arrive.

The CLI is the configured executable, or the one discovery finds. Running the stream starts it, and closing the scope the stream runs in ends it. A consumer that stops pulling early closes that scope to end the CLI at once, as in Scope.run(query(options).take(1).run).

Attributes

def queryResult(options: QueryOptions)(using Frame): String < (Async & Abort[CLIError])

Runs a query to its end, returning the assistant's answer.

Runs a query to its end, returning the assistant's answer.

Attributes

def querySync(options: QueryOptions)(using Frame): Chunk[Message] < (Async & Abort[CLIError])

Runs a query to its end, returning every message.

Runs a query to its end, returning every message.

Attributes