Metadata-Version: 2.4
Name: qodey
Version: 1.0.0
Summary: Qodey — local-first AI coding agent for your terminal, powered by Ollama.
Author: Qodey
License: MIT
Project-URL: Homepage, https://github.com/qodey/qodey
Project-URL: Issues, https://github.com/qodey/qodey/issues
Keywords: ai,coding-agent,ollama,terminal,llm,vibe-coding
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rich>=13.7.0
Requires-Dist: requests>=2.31.0
Dynamic: license-file

<p align="center">
  <img src="logo.png" alt="Qodey logo" width="480" />
</p>

# Qodey — Local AI Coding Agent

Qodey is a modern, polished terminal-based AI coding agent for Windows (CMD/PowerShell),
powered entirely by **locally installed Ollama models**. No cloud, no API keys — your code
stays on your machine.

```text
qodey
```

…and you immediately start coding with AI.

## Features

- 🎨 Premium terminal UI (Rich panels, markdown, tables, spinners, streaming)
- 🦙 Direct Ollama integration (`http://127.0.0.1:11434`), auto-detect + model picker
- 📂 Any-folder workspace (`/open`), project auto-detection (React, Next.js, Python, Rust, …)
- 🤖 Real agentic loop: inspect → plan → create/edit files → run commands → fix errors
- 🛠️ Tools: read/write/edit/delete/rename files, mkdir, list, search, run shell commands
- 🛡️ Permission modes: `AUTO` / `CONFIRM` / `SAFE`
- 📋 Plan mode, context compaction, conversation history, token estimates
- ⚙️ Local config at `~/.qodey/config.json`

## Requirements

- Python 3.9+
- [Ollama](https://ollama.com) installed and running (`ollama serve`)
- At least one model, e.g. `ollama pull qwen2.5-coder:32b`

## Install

Via npm (no GitHub download needed — still requires Python 3.9+ and Ollama, see below):

```powershell
npm install -g qodey
qodey
```

Or via pip:

```powershell
pip install qodey
qodey
```

Or from source (dev):

```powershell
pip install -e .
python -m qodey
```

Or with pipx / uvx:

```powershell
pipx install qodey
```

## Commands

| Command        | Description                              |
|----------------|------------------------------------------|
| `/help`        | Show commands                            |
| `/open`        | Change workspace                         |
| `/models`      | Show Ollama models                       |
| `/model`       | Change AI model (`/model <name>`)        |
| `/status`      | Show system status                       |
| `/files`       | List project files                       |
| `/tree`        | Show project tree                        |
| `/run`         | Run a terminal command                   |
| `/plan`        | Toggle planning mode                     |
| `/settings`    | Open Qodey settings                      |
| `/permissions` | Configure permissions (auto/confirm/safe)|
| `/compact`     | Compact conversation context             |
| `/clear`       | Clear conversation                       |
| `/exit`        | Exit Qodey                               |

## Config (`~/.qodey/config.json`)

```json
{
  "ollama_url": "http://127.0.0.1:11434",
  "default_model": "qwen2.5-coder:32b",
  "temperature": 0.2,
  "top_p": 0.9,
  "num_ctx": 32768,
  "streaming": true,
  "permission_mode": "confirm",
  "theme": "qodey-dark",
  "workspace": "C:\\Projects\\MyAIApp",
  "plan_mode": true,
  "max_agent_steps": 25
}
```

## How the agent works

1. System prompt includes workspace path, detected stack, and file list (never full dumps).
2. Model replies with text + ` ```tool ` JSON blocks (or native Ollama tool calls).
3. Qodey executes tools (with permission checks), feeds results back, and loops
   (up to `max_agent_steps`) until the task is done.
4. Shell output is captured and fed back so the model can diagnose and fix errors.

## License

MIT
