Metadata-Version: 2.4
Name: plato-ask
Version: 0.1.0
Summary: Query your PLATO tile corpus from the command line
License: MIT
Keywords: plato,cocapn,knowledge-base,search,cli
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# plato-ask

Query your PLATO tile corpus from the command line. No API keys, no network — pure local search over your knowledge tiles.

## Install

```bash
pip install plato-ask
```

## Usage

```bash
# Ask a question
plato-ask "What is priority inversion in RTOS?"

# Search for multiple matches
plato-ask --search "quantum error correction" --top 5

# List domains
plato-ask --domains

# Corpus statistics
plato-ask --stats

# Custom tile directory
plato-ask "How does TCP work?" --tiles-dir /path/to/tiles
```

## How It Works

Builds an inverted index over all `.jsonl` tile files in the corpus directory. Each tile's `question` and `answer` fields are tokenized and indexed. Queries are scored by term overlap with ranking.

**Performance:** 5447 tiles indexed in <1 second, queries return in <10ms.

## Tile Format

Expects JSONL files with tiles in this format:

```json
{"id": "...", "question": "...", "answer": "...", "domain": "...", "difficulty": "advanced"}
```

## Part of PLATO

PLATO is a knowledge framework for AI fleets. See [cocapn/fleet-knowledge](https://github.com/cocapn/fleet-knowledge) for the full tile corpus.
