Metadata-Version: 2.4
Name: askme-rag
Version: 0.1.3
Summary: CLI RAG tool for local codebases
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: qdrant-client==1.19.0
Requires-Dist: openai==3.8.0
Requires-Dist: rich==14.3.4
Requires-Dist: python-dotenv==1.2.3
Requires-Dist: prompt-toolkit==3.0.53
Requires-Dist: python-docx
Requires-Dist: pypdf==6.17.0
Requires-Dist: tqdm==4.70.0
Requires-Dist: distro==1.9.0

# askme - Codebase RAG CLI

A Command Line Interface (CLI) tool for local Retrieval-Augmented Generation (RAG) over your codebase. It scans,
indexes, and lets you chat with your project using local LLMs (via an OpenAI-compatible API) and a Qdrant vector
database, returning context-aware answers with source citations.

The Python package is named `askme` and exposes a single `askme` console script.

---

## Quickstart

### Prerequisites

- Python 3.11+
- An OpenAI-compatible LLM and embeddings endpoint (e.g. Ollama)
- Qdrant vector database — either:
    - `server` mode: running Qdrant instance (Docker/remote)
    - `local` mode: file-based store on disk, no server required (quick start)

### 1. Prepare models (example with Ollama)

```bash
ollama pull llama3
ollama pull embeddinggemma:300m
```

### 2. Install

```bash
# Using uv (recommended)
uv sync
uv run askme

# Or with pip
pip install .
askme
```

### 3. Run

Inside the codebase you want to query:

```bash
askme
```

On first launch, the tool guides you through configuration, scans the project, and builds the Qdrant collection.
Subsequent runs reuse the existing index and only re-embed changed files.

---

## Key Commands

| Command              | Description                                |
|----------------------|--------------------------------------------|
| `/new`               | Start a fresh conversation                 |
| `/history`           | List, load, or delete saved sessions       |
| `/reindex`           | Clear collection and re-embed from scratch |
| `/index`             | Show currently indexed files               |
| `/multiline` or `/m` | Toggle persistent multiline input          |
| `/paste`             | One-shot multiline input                   |
| `/exit` or `/quit`   | End the session                            |

---

## Configuration

On first run inside a project directory, `askme` prompts for configuration and stores it in `./.cfg/settings.json`.
Conversation histories are stored under `./.cfg/history/`.

Key options:

- `qdrant_mode`: `server` (remote/Docker) or `local` (file-based)
- `qdrant_local_path`: on-disk path for local mode (default `./data/vector_store`)
- `llm_api_base`: OpenAI-compatible LLM API base URL
- `embedding_model`: embedding model name
- `chunk_size` / `chunk_overlap`: chunking parameters
- `file_extensions` / `excluded`: file and directory filtering

---

## Documentation

Full documentation with setup details, storage schema, development guide, and contributing guidelines is available in
/doc directory.
