Metadata-Version: 2.4
Name: codebase-receipts-cli
Version: 1.0.0
Summary: Receipts — resume claim verifier & codebase-grounded interview prep CLI
Project-URL: Homepage, https://github.com/Ishaan-1606/receipts-cli
Project-URL: Repository, https://github.com/Ishaan-1606/receipts-cli
Project-URL: Issues, https://github.com/Ishaan-1606/receipts-cli/issues
Author-email: Ishaan Sharma <ishaan406061@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: cli,codebase,interview,llm,resume,verification
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: chromadb>=1.0
Requires-Dist: gitpython>=3.1.50
Requires-Dist: google-genai>=1.0
Requires-Dist: ollama>=0.4
Requires-Dist: pathspec>=1.1.1
Requires-Dist: pypdf>=5.0
Requires-Dist: python-dotenv>=1.0
Requires-Dist: textual>=0.80
Requires-Dist: tiktoken>=0.13.0
Requires-Dist: tree-sitter-language-pack>=1.12.2
Requires-Dist: tree-sitter>=0.26.0
Requires-Dist: typer>=0.12
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.30; extra == 'anthropic'
Provides-Extra: openai
Requires-Dist: openai>=1.30; extra == 'openai'
Provides-Extra: pdf
Requires-Dist: markdown>=3.5; extra == 'pdf'
Requires-Dist: xhtml2pdf>=0.2.16; extra == 'pdf'
Description-Content-Type: text/markdown

<p align="center">
  <h1 align="center">RECEIPTS</h1>
  <p align="center">
    <strong>Your resume said it. Your code proves it.</strong>
  </p>
  <p align="center">
    <a href="#quick-start">Quick Start</a> &bull;
    <a href="#what-it-does">What It Does</a> &bull;
    <a href="#how-it-works">How It Works</a> &bull;
    <a href="#providers">Providers</a> &bull;
    <a href="SETUP.md">Setup Guide</a> &bull;
    <a href="LEARN.md">Deep Dive</a>
  </p>
</p>

<br>

> **The anti-flattery resume tool.** Most resume reviewers feed your bullets
> into an LLM and hand you back compliments. Receipts does the opposite — it
> embeds your actual codebase, searches it for evidence behind every claim you
> made, and tells you the truth. If the code doesn't back it up, you'll know
> before the interviewer does.

<br>

## Quick Start

```bash
pip install codebase-receipts-cli
```

```bash
receipts check                                    # verify provider is working
receipts ingest ./my-project                      # index your codebase
receipts verify resume.tex ./my-project           # verify every claim
receipts verify resume.tex ./my-project --rewrite # + honest rewrites
receipts tui resume.tex ./my-project              # full-screen dashboard
receipts ama resume.tex ./my-project              # mock interview mode
receipts ledger                                   # token usage & costs
```

> [!TIP]
> See **[SETUP.md](SETUP.md)** for the full walkthrough — provider config,
> model setup, and first-run instructions. See **[LEARN.md](LEARN.md)** for
> how every piece works under the hood.

<br>

## What It Does

### Claim Verification

Every bullet in your `.tex` resume gets broken into individual claims —
percentages, counts, latency numbers, technology names — and each one is
checked against the code.

```
Results: 5 verified, 3 plausible, 2 unsupported

UNSUPPORTED CLAIMS:
  [percentage] 40%
    bullet: Reduced API latency by 40% through query optimization...
    reason: No evidence of latency measurement or optimization in codebase
```

**The rule:** if the knowledge base has no relevant code for a claim, it's
marked Unsupported *without even asking the LLM*. The model never gets a
chance to talk itself into justifying something it can't find.

### Honest Rewrites

Weak bullets get rewritten to be exactly as strong as what the code can
actually justify. No invented numbers. No inflated language.

```
ORIGINAL:  Reduced API latency by 40% through query optimization
REWRITTEN: Optimized database queries in the API layer using indexed lookups
```

### Keyword Gap Analysis

Paste a job description. Get back what's addable, what's ungrounded, and
what's missing:

```
Can add (code supports it):
  + Docker — Dockerfile and compose config found in codebase

Ungrounded (resume claims, no code):
  ? Kubernetes — mentioned in resume but no k8s config in codebase

Gaps (JD wants, you don't have):
  - Terraform
```

### Interactive TUI

A full-screen terminal dashboard with a file tree, sortable claims table,
side-by-side rewrite diffs, live LLM activity log, and a running token counter.

| Shortcut | Action |
|----------|--------|
| `c` | Claims tab |
| `r` | Rewrites tab |
| `l` | Log tab |
| `q` | Quit |

### Mock Interview (`ama`)

An AI interviewer that targets your weakest bullets. Unsupported claims get
asked about 3x more often than verified ones. For each bullet:

1. Pointed technical question about the specific claim
2. Your answer
3. Natural follow-up based on what you said
4. Your follow-up answer
5. Assessment: did it hold up?

Ends with a summary of strengths, weaknesses, and overall readiness.

### Token Ledger

Every LLM call is metered and logged — even when the provider is free.
`receipts ledger` shows lifetime totals across all sessions.

<br>

## How It Works

```
receipts/
  cli.py ........................ Typer CLI: check, ingest, verify, tui, ama, ledger
  config.py ..................... BYOK config (env vars / .env, never committed)
  ama/
    interviewer.py .............. Mock-interview loop, weighted toward weak claims
  ingest/
    scanner.py .................. Tree-style walk respecting .gitignore
    git_source.py ............... Clone remote repos to temp dir
    artifact_extractor.py ....... Tree-sitter extraction within a token budget
    secrets_scanner.py .......... Pre-embedding secrets scan + redaction
  ledger/
    token_ledger.py ............. SQLite-backed token/cost log
    pricing_table.py ............ $/1K-token rates per provider/model
  llm/
    provider.py ................. Abstract LLMProvider (complete, embed)
    factory.py .................. Reads config, returns the active provider
    ollama_provider.py .......... Local, free, no key needed
    gemini_provider.py .......... Free-tier Google AI Studio key
    anthropic_provider.py ....... BYOK adapter (paid)
    openai_provider.py .......... BYOK adapter (paid)
    fake_provider.py ............ Deterministic offline stub for tests
  resume/
    tex_parser.py ............... Parse .tex into structured sections/bullets
    claim_extractor.py .......... Extract numeric + technology claims per bullet
  tui/
    app.py ...................... Textual App with panelled layout
    widgets/ .................... StatusBar, ClaimsTable, DiffView
  verify/
    kb.py ....................... ChromaDB-backed vector store over code artifacts
    verifier.py ................. Classify: Verified / Plausible / Unsupported
    rewriter.py ................. Propose honest rewrites for weak bullets
    keyword_gap.py .............. JD keyword gap analysis grounded in code
```

> [!NOTE]
> For a narrative walkthrough of every module — what it does, why it exists,
> and how to explain it in an interview — see **[LEARN.md](LEARN.md)**.

<br>

<h2 id="providers">Provider Support (BYOK)</h2>

| Provider | Default | Key | Install |
|----------|---------|-----|---------|
| **Ollama** | Yes | None | Built-in |
| **Gemini** | No | Free | Built-in |
| **Anthropic** | No | Paid | `pip install codebase-receipts-cli[anthropic]` |
| **OpenAI** | No | Paid | `pip install codebase-receipts-cli[openai]` |

**Zero bundled keys. Zero silent paid API calls. Ever.**

> [!IMPORTANT]
> Anthropic does not offer an embeddings API, so Claude needs a split
> config — chat via Claude, embeddings via a provider that has them:
> `RECEIPTS_PROVIDER=anthropic` + `RECEIPTS_EMBED_PROVIDER=gemini` (or
> `ollama`). The embed provider must match whatever embedded your
> knowledge base — re-ingest if you switch embedding models.

<br>

## Development

```bash
uv sync --group dev          # install everything
uv run pytest -v             # 233 tests, fully offline
uv run ruff check receipts/  # lint
uv run black --check receipts/ tests/  # format check
uv run pre-commit install    # git hooks
```

The entire test suite runs with **zero network access** — a deterministic
fake provider handles all LLM calls in tests.

## Publishing

```bash
git tag v0.1.0
git push origin v0.1.0
```

GitHub Actions runs the full test suite on Ubuntu + Windows (Python 3.10 +
3.12), then publishes to PyPI via trusted publishing. No tokens in secrets.

<br>

## License

[MIT](LICENSE)

---

<p align="center">
  <sub>Built by <a href="mailto:ishaan406061@gmail.com">Ishaan Sharma</a></sub>
</p>
