# Otto Code

**Otto** is a powerful, local-first AI coding assistant that runs directly in your terminal. It brings the speed and capabilities of advanced LLMs (like Anthropic, OpenAI, Gemini, and Ollama) right where you write your code, complete with interactive terminal UI, MCP server integration, sandboxed command execution, and remote session pairing.

Get started at [leg3ndy.com.br/otto-code](https://leg3ndy.com.br/otto-code).

---

## Key Features

- **Local-First & Interactive UI**: A full-featured terminal UI powered by React and Ink, providing real-time feedback, interactive dialogs, and a responsive prompt console.
- **BYOK (Bring Your Own Key)**: Bring your own API keys. You only pay for the model tokens you actually use, with full transparency.
- **MCP Integration**: Fully supports the Model Context Protocol (MCP) to plug in custom tools, servers, and data sources dynamically.
- **Secure Sandbox**: Executes terminal and compilation commands within a safe, sandboxed local runtime to protect your system.
- **Auto-Reflect**: Background sessions automatically synthesize, summarize, and consolidate memory logs to continuously improve project context.
- **Remote Session Pairing**: Connect and pair your terminal agent securely with web and mobile workspaces.

---

## Installation

Install Otto globally via npm or bun:

```bash
npm install -g @leg3ndy/otto-code
# or
bun install -g @leg3ndy/otto-code
```

---

## Quick Start

### 1. Initialize and Setup
To authenticate and setup your AI providers:

```bash
otto auth login
```

### 2. Run Interactive Session
Start the interactive terminal UI in your current project folder:

```bash
otto
```

### 3. Diagnose Setup
Run the diagnostic doctor check to ensure everything is set up correctly:

```bash
otto doctor
```

---

## CLI Command Summary

| Command | Description |
|---|---|
| `otto` | Launch the interactive terminal UI |
| `otto auth login` | Authenticate your Otto CLI |
| `otto doctor` | Run environment and installation diagnostics |
| `otto limits` | Show current API usage limits and paired plan |
| `otto mcp` | Manage Model Context Protocol (MCP) servers |
| `otto plugin` | Manage installed developer plugins |
| `otto ssh <host>` | Start an interactive Otto session over SSH |
| `otto --continue` | Continue the most recent session |
| `otto --resume` | Resume a specific session from history |

---

## Resources & Support

- **Homepage**: [https://leg3ndy.com.br/otto-code](https://leg3ndy.com.br/otto-code)
- **License**: SEE LICENSE IN LICENSE
