Metadata-Version: 2.5
Name: ottopilot
Version: 0.1.3
Summary: OttoAI — a local-first, extensible coding agent (Copilot-CLI style) with Ollama by default and optional cloud providers.
Project-URL: Homepage, https://github.com/arshad2108/OttoAI
Project-URL: Repository, https://github.com/arshad2108/OttoAI
Project-URL: Issues, https://github.com/arshad2108/OttoAI/issues
Author-email: arshad2108 <warsiarshad384@gmail.com>
License: MIT License
        
        Copyright (c) 2026 arshad2108
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: agent,cli,coding-assistant,llm,local-first,ollama
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27
Requires-Dist: prompt-toolkit>=3.0
Requires-Dist: rich>=13.7
Requires-Dist: tomli-w>=1.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Provides-Extra: embeddings
Requires-Dist: numpy>=1.26; extra == 'embeddings'
Description-Content-Type: text/markdown

# OttoAI

A **local-first, extensible coding agent** for your terminal — think "Copilot CLI, but yours."
Runs on local models (Ollama / Qwen3) by default, works fully offline, and can optionally
use cloud providers (OpenAI, Anthropic, Gemini, Azure, OpenRouter, or any OpenAI-compatible
endpoint) when you choose to turn them on.

## Features

- 🧠 **Local by default** — Ollama + Qwen3 out of the box, no cloud required.
- 🔌 **Cloud-optional & pluggable** — flip to online and use OpenAI / Claude / Gemini / Azure
  / OpenRouter / any OpenAI-compatible server via config.
- 🛠️ **Real agent tools** — shell, file read/write/edit, grep/glob code search, git, web fetch,
  cross-session history search, and MCP (Model Context Protocol) servers.
- 💾 **Sessions + memory** — every conversation is persisted in SQLite, with FTS5 keyword
  search and optional embeddings for semantic recall across past sessions.
- ♻️ **Conversation compaction** — long chats are automatically summarized to stay within context,
  while the full history stays searchable.
- 🧩 **Extensible** — add providers/tools via pip entry points **or** drop a `.py` file in
  `~/.ottoai/plugins/`.

## Install

```bash
pip install ottopilot        # from PyPI (once published)
# or, from source:
pip install -e .
```

Install [Ollama](https://ollama.com) and pull the default model (light,
runs on ~8GB RAM):

```bash
otto pull qwen3:1.7b
```

> On 16GB+ machines you can use a stronger model, e.g. `otto pull qwen3:8b`
> or `otto pull qwen2.5-coder:7b`, then set it via `/model` or `default_model`.

## Usage

```bash
otto                      # interactive REPL (local-first)
otto chat "explain this repo"
otto chat --provider openai --model gpt-4o "review my diff"
otto models               # list models for the default provider
otto catalog              # installable models + specs (size, RAM, best-for)
otto catalog --ram 8      # only models that fit 8GB RAM
otto catalog --coding     # only coding-focused models
otto pull qwen3:8b        # install a model
otto remove qwen3:8b      # delete an installed model (alias: otto rm)
otto sessions             # list past sessions
otto resume               # resume the latest session
otto search "auth bug"    # search across all past sessions
otto config init          # write ~/.ottoai/config.toml to customize
```

### In the REPL

```
/model <name>        switch model
/catalog [ram|coding] installable models + specs (e.g. /catalog 8)
/remove <name>       delete an installed local model
/provider <name> [m] switch provider
/online  /local      toggle cloud access
/stream              toggle streaming output
/think [on|off]      toggle model reasoning (faster vs. higher quality)
/search <query>      recall past sessions
/remember subj | fact store a durable fact
/compact             compress the current conversation
/tools  /sessions  /memory  /help  /quit
```

## Configuration

Config lives at `~/.ottoai/config.toml` (run `otto config init`). Highlights:

```toml
local_only = true          # set false (or /online) to allow cloud providers
default_provider = "ollama"
default_model = "qwen3:1.7b"  # light default; bump on 16GB+ machines
stream = true              # token-by-token output (/stream to toggle)
think = true               # model reasoning: true = higher quality, false = faster (/think)

[compaction]
enabled = true
trigger_messages = 40
keep_recent = 12

[embeddings]
enabled = false            # set true for semantic cross-session search
provider = "ollama"
model = "nomic-embed-text"

[providers.openai]
type = "openai_compatible"
base_url = "https://api.openai.com/v1"
api_key_env = "OPENAI_API_KEY"

[mcp_servers.filesystem]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "/path"]
```

## Extending OttoAI

**Local plugin** — create `~/.ottoai/plugins/my_tool.py`:

```python
from ottoai.tools import Tool

class HelloTool(Tool):
    name = "hello"
    description = "Say hello"
    parameters = {"type": "object", "properties": {"who": {"type": "string"}}}
    def run(self, who="world", **_):
        return f"Hello, {who}!"

TOOLS = [HelloTool]
# PROVIDERS = {"my_type": MyProviderClass}  # providers work the same way
```

**Pip plugin** — expose `ottoai.tools` / `ottoai.providers` entry points in your package.

## License

MIT
