ClaudeCode

works.iterative.claude.direct.ClaudeCode
See theClaudeCode companion object
class ClaudeCode(using logger: Logger, ox: Ox)

ClaudeCode instance for async/concurrent operations using Ox structured concurrency. Create instances within supervised scopes for concurrent query execution.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def ask(prompt: String): String

Simple convenience method to ask Claude a question with sane defaults. Returns just the assistant's text response.

Simple convenience method to ask Claude a question with sane defaults. Returns just the assistant's text response.

Attributes

def query(options: QueryOptions): Flow[Message]

Executes a query and returns a Flow of messages from the Claude CLI. Uses Ox direct-style programming for structured concurrency with real streaming.

Executes a query and returns a Flow of messages from the Claude CLI. Uses Ox direct-style programming for structured concurrency with real streaming.

Attributes

def queryResult(options: QueryOptions): String

Executes a query and extracts the text content from AssistantMessage. This is a convenience method for getting just the assistant's response text.

Executes a query and extracts the text content from AssistantMessage. This is a convenience method for getting just the assistant's response text.

Attributes

def querySync(options: QueryOptions): List[Message]

Executes a query and returns all messages as a List. This is a convenience method that collects all messages from the query Flow synchronously.

Executes a query and returns all messages as a List. This is a convenience method that collects all messages from the query Flow synchronously.

Attributes

def session(options: SessionOptions): Session

Starts a long-lived CLI process and returns a Session for multi-turn conversations. The process stays alive until Session.close() is called. Background forks for stderr capture run within the provided Ox scope.

Starts a long-lived CLI process and returns a Session for multi-turn conversations. The process stays alive until Session.close() is called. Background forks for stderr capture run within the provided Ox scope.

Attributes