chera (چرا) answers the WHY of your codebase: it rebuilds the story of an AI-built project from git history and coding-agent sessions, and serves it as a local web app.
Project description
chera · چرا
chera (چرا) means “why” in Persian. It answers the why of your codebase.
You built your project with AI agents (Claude Code, Cursor, Copilot…). It works — but months later nobody remembers why anything looks the way it does. Why redis? Why was the payment flow rewritten? What died along the way?
chera reconstructs the story of your project from evidence that already exists on your
machine — git history and AI coding-agent sessions — and serves it as a local web app:
- Story — the project as a narrated timeline of eras and episodes, each with its evidence (commits, agent prompts) and an honest confidence label.
- Twin — a living map of the codebase: which decisions are still active, which are partial, which are dead.
- Time-travel — scrub through time and watch the project grow.
- Ask — free-form questions (“why do we use redis?”) answered only from evidence. When there is no evidence, chera says so instead of hallucinating.
100% local. Zero runtime dependencies. No API key required.
Install
pip install chera
Requires Python 3.10+ and git. Nothing else.
Quickstart
cd your-project
chera ui # scan + open the web app at http://127.0.0.1:7345
That's it. Other entry points:
| Command | What it does |
|---|---|
chera scan |
Build/refresh the project twin (.chera/twin.json) |
chera ui |
Scan and open the local web app |
chera watch |
Keep the twin updated as you keep committing |
chera ask why redis |
Grounded Q&A in the terminal |
chera timeline --depth decision |
The story as a terminal timeline |
chera learn |
Chaptered Markdown course about your own project |
chera report |
Single-file Markdown report |
How it works
- Ingest — reads
git log(authors, dates, messages, file changes) and, when present, Claude Code session files (~/.claude/projects/…) that overlap your repo. - Episodes — commits are clustered into work episodes by time proximity; agent sessions are attached by time overlap.
- Why classification — every episode gets an evidence class:
documented— a recorded reason exists (commit body / agent prompt), quoted verbatimhypothesis— chera infers a likely reason and labels it as a guessunknown— no evidence; chera admits itanomaly— reverts and suspicious patterns, flagged
- Decisions — each episode becomes a decision node with
status_now(active / partial / dead) computed against today's tree, plus supersedes edges. - Serve — a stdlib HTTP server renders the story locally and keeps it fresh.
Optional: LLM narration (BYOK)
chera is fully useful offline. If you want richer narration, bring your own key — any OpenAI-compatible endpoint (OpenAI, Ollama, LM Studio, OpenRouter…):
export CHERA_LLM_BASE_URL=http://localhost:11434/v1 # e.g. Ollama
export CHERA_LLM_MODEL=llama3
export CHERA_API_KEY=... # if your endpoint needs one
chera scan --narrate
Narration is grounded: the model only sees stored evidence, never invents reasons, and already-narrated episodes are never re-billed (incremental scans carry narration over).
Honesty contract
- Every claim links to commits/sessions you can check.
- Missing evidence is reported as missing — that absence is itself information.
- Everything runs on your machine; nothing is uploaded anywhere.
Development
git clone https://github.com/mohammadpooshesh/chera
cd chera
pip install -e ".[dev]"
pytest
ruff check src tests
See docs/architecture.md, docs/data-model.md and CONTRIBUTING.md.
License
MIT © Mohammad Pooshesh
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chera-0.1.0.tar.gz.
File metadata
- Download URL: chera-0.1.0.tar.gz
- Upload date:
- Size: 34.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
050850b70d9ff8a968ad9d0edf05bd93185a031611a3616cb224355ee17bf614
|
|
| MD5 |
3f1498e0d6b8ce5627c50b8262f20051
|
|
| BLAKE2b-256 |
77cfbd1887bd86a9772741e952330aab7e6f00873b1f21b80c5009ada190e8fa
|
Provenance
The following attestation bundles were made for chera-0.1.0.tar.gz:
Publisher:
publish.yml on mohammadpooshesh/chera
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chera-0.1.0.tar.gz -
Subject digest:
050850b70d9ff8a968ad9d0edf05bd93185a031611a3616cb224355ee17bf614 - Sigstore transparency entry: 2176456849
- Sigstore integration time:
-
Permalink:
mohammadpooshesh/chera@252c23b46fc7a96d2bffe3a32812d225e8b8b45a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mohammadpooshesh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@252c23b46fc7a96d2bffe3a32812d225e8b8b45a -
Trigger Event:
release
-
Statement type:
File details
Details for the file chera-0.1.0-py3-none-any.whl.
File metadata
- Download URL: chera-0.1.0-py3-none-any.whl
- Upload date:
- Size: 31.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
702a8f42abe53db9959c8beaccf4f96af71a0e679da8861857f1d62294538eb4
|
|
| MD5 |
edd494881bc5860aa01751fd3e9a9066
|
|
| BLAKE2b-256 |
dfb9fb9d15e2753ecfffd3d00b62f728fe15c997681cac0a9561e051a4faf41a
|
Provenance
The following attestation bundles were made for chera-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on mohammadpooshesh/chera
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chera-0.1.0-py3-none-any.whl -
Subject digest:
702a8f42abe53db9959c8beaccf4f96af71a0e679da8861857f1d62294538eb4 - Sigstore transparency entry: 2176457021
- Sigstore integration time:
-
Permalink:
mohammadpooshesh/chera@252c23b46fc7a96d2bffe3a32812d225e8b8b45a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mohammadpooshesh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@252c23b46fc7a96d2bffe3a32812d225e8b8b45a -
Trigger Event:
release
-
Statement type: