# OpenCode Setup and Usage Guide

## Installation Status

OpenCode has been successfully installed with the following components:
- OpenCode CLI (`oc`) is available at: `/home/wildlama/.hermes/hermes-agent/venv/bin/oc`
- The installation includes both:
  - `opencode_ai` (Python client library)
  - `opencode_cli` (Command-line interface)

## CLI Usage Examples

The OpenCode CLI supports the following commands:

1. **help** - Show help information
   ```bash
   oc --help
   ```

2. **sessions** - List all sessions on the opencode server
   ```bash
   oc sessions
   ```

3. **create** - Create a new session
   ```bash
   oc create --name 'My First Session'
   ```

4. **send** - Send a message to a session
   ```bash
   oc send --session-id <session_id> --message 'Hello from OpenCode CLI'
   ```

5. **messages** - List all messages in a session
   ```bash
   oc messages --session-id <session_id>
   ```

6. **info** - Get detailed info about a session
   ```bash
   oc info --session-id <session_id>
   ```

7. **rename** - Rename a session
   ```bash
   oc rename --session-id <session_id> --new-name 'Updated Session Name'
   ```

8. **delete** - Delete a session
   ```bash
   oc delete --session-id <session_id>
   ```

## Note

To fully use OpenCode, you also need to have the OpenCode server component running on port 36000 (http://localhost:36000). This was not installed or started as part of this setup, since it typically requires a more complex installation with Node.js dependencies.

The CLI is functional and ready for use, but will require a running server instance to perform full operations.