Metadata-Version: 2.5
Name: livetally
Version: 0.1.0a1
Summary: Local, private report of how well your Claude Code replies and tools actually did.
Project-URL: Homepage, https://livetally.dev
Project-URL: Documentation, https://livetally.dev
Project-URL: Repository, https://pypi.org/project/livetally/
Author: LiveTally
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: agent,claude-code,eval,local,mcp
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# LiveTally

A private, local report of how well your Claude Code replies and tools actually did.

`livetally report` reads `~/.claude/projects/**/*.jsonl` on your machine, scores each assistant reply from conversation signals and tool outcomes, optionally runs a **local** classifier model as a judge, and writes an evergreen HTML report to `~/.livetally/report.html`. The report opens in your browser. Reruns are incremental: verdicts are cached under `~/.livetally/cache/`.

**This build has no telemetry and never uploads your transcripts, prompts, scores, or the report.** The only network step, if you agree to it (or pass `--yes`), is downloading a pinned local model and its runtime. Those files are checksummed (SHA-256) and stored in `~/.livetally/`.

## Install and run

You need Python 3.10+ and, for the one-liner below, [uv](https://docs.astral.sh/uv/) (or pipx).

If you do not have uv yet:

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

Then, in a terminal on your Mac (or Linux):

```bash
uvx --from livetally==0.1.0a1 livetally report --yes
```

`--yes` accepts the one-time model download without a prompt. Drop it if you want to be asked first.

`0.1.0a1` is a pre-release, so the version has to be spelled out. pipx equivalent:

```bash
pipx run --spec livetally==0.1.0a1 livetally report --yes
```

To keep the command installed (needed for hooks and the daily refresh):

```bash
uv tool install livetally==0.1.0a1
livetally report
```

## What happens on the first run

1. LiveTally scans `~/.claude/projects` and scores every reply with heuristic and outcome signals (no model required, takes a second or two).
2. If **Ollama** is already running and has `qwen2.5:3b` (or `qwen2.5:1.5b` with `--small`), that local server is used. Nothing is downloaded.
3. Otherwise, with `--yes` or your confirmation, it downloads:
   - **Default judge:** official [Qwen2.5-3B-Instruct](https://huggingface.co/Qwen/Qwen2.5-3B-Instruct-GGUF) `Q4_K_M` GGUF, **2,104,932,768 bytes (~2.0 GiB)**.
   - **llama.cpp b12819** runtime for your platform, about 12–23 MiB (Metal on Apple Silicon, CPU otherwise).
4. It starts `llama-server` on `127.0.0.1`, judges uncached replies among the 80 most recent, writes `~/.livetally/report.html`, and opens it. Later runs skip already-cached replies in that window.

On a fast link the 2.0 GiB model took about 25 seconds to download in our test (around 80 MB/s). On a 20 MB/s home connection plan for roughly **two minutes**. Loading the 3B model on an x86-64 CPU took about **3 seconds**; each reply took **about 1.4–3.2 seconds**. Apple Silicon with Metal should be faster; Intel Macs and Linux use the CPU build.

Use `--small` for the official 1.5B GGUF (~1.04 GiB) if you want a smaller download. It is weaker as a judge. `--model 0.5b` exists only as a last resort.

If you decline the download, or no model can be set up, the report is still written from signals and the footer says the judge was skipped.

## Why this model

Ollama is used when it is already there, so people who have it installed do not download a second copy. The fallback is a **pinned llama.cpp binary plus an official Qwen GGUF**, not a compile of `llama-cpp-python` (wheels are incomplete across Python versions) and not a remote API.

Qwen2.5-3B-Instruct Q4_K_M is the default because, in a small hand-labelled smoke test on this machine, it was more reliable than 1.5B or 0.5B on fabricated tool results and honest failures, while still fitting comfortably on a laptop (~2 GiB). It is **not** a perfect judge: in that same test it missed a wrong fact about Python’s sort and a case of test-tampering. Treat it as an extra signal. Strong evidence from your session (a correction, a failed test, a later revert) always wins over the model.

## Optional commands

```bash
livetally install-hooks      # after a persistent install; type +, -, ! or <3 alone to rate a reply
livetally uninstall-hooks
livetally schedule           # daily refresh at 09:15 local (launchd on macOS, systemd --user on Linux)
livetally unschedule
livetally outbox show        # local file only — this build never uploads
```

`install-hooks` and `schedule` are opt-in. For them to survive a reboot, use `uv tool install` (or pipx), not a one-off `uvx`.

## Flags

| Flag | Meaning |
| --- | --- |
| `--yes` / `-y` | Download the model and runtime without asking |
| `--no-judge` | Signals only |
| `--no-open` | Do not open a browser |
| `--judge-limit N` | Judge uncached replies among the N most recent (default 80; `0` skips; `-1` all) |
| `--small` | 1.5B model |
| `--transcripts PATH` | JSONL folder or file, if not `~/.claude/projects` |
| `--model-path` / `--llama-server` | Use files you already have |

Environment: `LIVETALLY_HOME` (default `~/.livetally`), `CLAUDE_CONFIG_DIR`, `LIVETALLY_MODEL_PATH`, `LIVETALLY_LLAMA_SERVER`.

## Privacy

- No telemetry in this build.
- No outbox upload in this build.
- Transcripts, prompts, scores and the HTML report stay on your disk.
- The only outbound network calls are the optional, disclosed downloads (Hugging Face for the official GGUF, GitHub for llama.cpp) or `ollama pull` if you choose that path.
- Talking to Ollama or llama-server on `127.0.0.1` does not leave the machine.

## License

Apache-2.0. Homepage: https://livetally.dev
