mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-03 14:15:19 +02:00
0e60f66604
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
410 B
410 B
Quickstart
Create a client and make your first calls.
from opencode_ai import OpenCodeClient
client = OpenCodeClient(base_url="http://localhost:4096")
# List projects
for p in client.list_projects() or []:
print(p.id, p.directory)
# Get path info
path = client.get_path()
print(path.directory)
# Stream events (sync)
for event in client.subscribe_events():
print(event)
break