Metadata-Version: 2.5
Name: daari
Version: 1.4.0
Summary: Local-first execution router — cache before cloud
Project-URL: Homepage, https://github.com/naveenreddyalka/daari
Project-URL: Documentation, https://naveenreddyalka.github.io/daari/
Project-URL: Repository, https://github.com/naveenreddyalka/daari
Project-URL: Issues, https://github.com/naveenreddyalka/daari/issues
Author: Naveen Reddy Alka
License: Apache-2.0
License-File: LICENSE
Keywords: ai,cache,developer-tools,ollama,openai,routing
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.12
Requires-Dist: diskcache>=5.6
Requires-Dist: fastapi>=0.115
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic-settings>=2.6
Requires-Dist: pydantic>=2.9
Requires-Dist: pyyaml>=6.0
Requires-Dist: typer>=0.12
Requires-Dist: uvicorn[standard]>=0.32
Provides-Extra: dev
Requires-Dist: openai>=1.40; extra == 'dev'
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.27; extra == 'dev'
Requires-Dist: opentelemetry-sdk>=1.27; extra == 'dev'
Requires-Dist: pyjwt[crypto]>=2.8; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=8.3; extra == 'dev'
Requires-Dist: ruff==0.15.17; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
Provides-Extra: oidc
Requires-Dist: pyjwt[crypto]>=2.8; extra == 'oidc'
Provides-Extra: otel
Requires-Dist: opentelemetry-api>=1.27; extra == 'otel'
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.27; extra == 'otel'
Requires-Dist: opentelemetry-sdk>=1.27; extra == 'otel'
Provides-Extra: postgres
Requires-Dist: psycopg[binary]>=3.1; extra == 'postgres'
Provides-Extra: redis
Requires-Dist: redis>=5.0; extra == 'redis'
Description-Content-Type: text/markdown

# daari

> **Local-first execution router** — cache, tools, and local models before frontier APIs.

**Status:** v1.4.0 — [docs site](https://naveenreddyalka.github.io/daari/) · [tracker](docs/TRACKING.md) · [release notes](docs/RELEASE-v1.4.0.md)

Route Cursor, Claude Code, and any OpenAI-compatible client through local tiers instead of paying frontier for repeat work. **Not a proxy** — a cost optimizer you run. [Apache 2.0](LICENSE).

## Quick start

**pip:**

```bash
pip install daari
daari onboard --yes --serve
```

**Docker (bundles Ollama):**

```bash
docker compose up
```

First start pulls the L3 model (~2 GB), then daari listens on `http://127.0.0.1:11435` (readiness: `GET /ready`). Prebuilt image: `ghcr.io/naveenreddyalka/daari`. Package: [pypi.org/project/daari](https://pypi.org/project/daari/).

**Docs** — **[Developer documentation](docs/developer/index.md)** (install, concepts, guides, reference). Contributors: [docs/DEVELOPING.md](docs/DEVELOPING.md). Community: [Discussions](https://github.com/naveenreddyalka/daari/discussions) ([templates](docs/gtm/discussions/)).

**One-click demo** (install, serve, smoke curl, stats):

```bash
./scripts/demo.sh
```

Manual steps:

```bash
python3.12 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
ollama pull llama3.2:3b
daari serve
```

```bash
curl http://127.0.0.1:11435/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"llama3.2:3b","messages":[{"role":"user","content":"Say hi"}]}'
```

Run the same curl twice — the second response should show `"tier": "L0"` in `daari_meta`.

## Feature snapshot (v1.2.0)

**Routing & caching**
- Local-first routing chain: `L0` exact cache → `L1` semantic cache (with draft injection) → `CCS`/`L2` rules → `Lt` CLI tools → `L3–L5` local models (Ollama or MLX) → `L6` frontier, with confidence-based escalation
- Cache trust you can measure: shadow-sampled **false-hit rate**, response-diversity monitoring, input normalization, per-category TTLs
- Prompt intelligence: category/complexity profiling, per-category policies, latency budgets, warm-model preference, learned routing from your own outcomes

**Learning (on-device)**
- Implicit outcome capture + explicit accept/reject feedback → `daari learn stats/recommend`
- Auto-tuned per-category confidence thresholds, opt-in example capture → `daari learn finetune` (MLX LoRA) → `daari learn deploy`
- Opt-in, review-first anonymized stats export (`daari learn export-stats`) — metadata only, never prompts

**Clients (one-click)**
- Cursor (BYOK via tunnel + API-key auth), Claude Code (full tool passthrough), Claude Desktop (third-party gateway mode), ChatGPT Desktop / JetBrains AI Assistant (Ollama-compatible facade), VS Code, any OpenAI/Anthropic SDK
- Per-project profiles (`.daari.yaml`): tier caps, no-frontier, latency budgets per repo

**Observability & spend**
- Per-request traces (`daari trace`), usage ledger with estimated savings (`daari report`, Markdown export), web dashboard (`daari web-ui serve`)
- Monthly/daily frontier budgets with soft warnings, per-client cost attribution, optional pre-frontier PII scrub

**Platform**
- MCP server at `POST /mcp` (`initialize` / `tools/list` / `tools/call`), Sourcegraph/GHE/GitLab providers, org shared cache + collective learning (tracer), gateway API-key auth, MLX backend for Apple Silicon

## Docs

| Doc | Purpose |
|-----|---------|
| [`docs/developer/`](docs/developer/index.md) | **Start here** — get started, concepts, guides, reference, internals |
| [Docs site](https://naveenreddyalka.github.io/daari/) | Published MkDocs |
| [`docs/DEVELOPING.md`](docs/DEVELOPING.md) | Contributor pickup (clone, pytest, CI) |
| [Discussions](https://github.com/naveenreddyalka/daari/discussions) | Q&A, show-and-tell, announce ([templates](docs/gtm/discussions/)) |
| [`docs/prd/ROADMAP-v2.md`](docs/prd/ROADMAP-v2.md) | Forward roadmap |
| [`docs/TRACKING.md`](docs/TRACKING.md) | Living task tracker (maintainers) |
| [`docs/pitch/DEMO.md`](docs/pitch/DEMO.md) | Demo script |
| [`CONTEXT.md`](CONTEXT.md) | Agent handoff |

## Principles

- **Open source** — Apache 2.0; run it, fork it, sell it
- **Local-first** — on-device by default
- **Cost-minimize** — cheapest capable path for every task
- **AI optional** — many tasks use IDE/CLI tools, not models

## License

Daari is licensed under the [Apache License 2.0](LICENSE). Decision: [ADR-0016](docs/adr/0016-apache-2-relicense.md).

## Repo

https://github.com/naveenreddyalka/daari
