Your first AI GitHub repo — tiny chat CLI with mock tests. Clone, run, understand.
Karpathy energy for regular people: one idea, runnable in a minute, tests that pass with no API key.
git clone https://github.com/primeodin/first-commit-ai.git
cd first-commit-ai
pip install -e ".[dev]"
pytest
python -m first_commit_ai --mock "hi"Expected stdout (deterministic on --mock — yours should match):
# pytest
....... [100%]
7 passed
# mock ask
[mock] canned reply | system='You are a clear shop-style teacher. Keep answers short, concrete, and honest.' | you said: 'hi'
That [mock] line means the wiring works before you spend a token. If the system string drifts, DEFAULT_SYSTEM in client.py changed — open an issue before "fixing" mock text by eye.
export OPENAI_API_KEY=sk-...
# optional local / compatible servers:
# export OPENAI_BASE_URL=http://localhost:11434/v1
# export OPENAI_MODEL=llama3.2
python -m first_commit_ai "Explain Git remotes like a shop dad."| File | Job |
|---|---|
src/first_commit_ai/cli.py |
Args + exit codes |
src/first_commit_ai/client.py |
OpenAI-compatible HTTP + --mock |
tests/ |
Proof it works offline |
.github/workflows/ci.yml |
Same checks on every push |
- Edit
DEFAULT_SYSTEMinclient.py— make the voice yours - Point
OPENAI_BASE_URLat Ollama or another compatible server - Add a second command (e.g.
--system "...") and a test for it — see good first issues
Scoped tickets live in Issues. Start with CONTRIBUTING.md (fork → test → PR map), then pick an open idea:
- #5 —
--jsonCLI output for reply + mock/real mode - #6 — Ollama / local server walkthrough under
docs/
Shop note (why the dry-fit comes first): docs/why-mock.md — hand-worked mock vs live doors, CI without secrets, when not to delete --mock.
Claim one in a comment, ask questions in the thread, ship it. Docs count.
Tiny, tested teaching repos — starter → mid. Ship one, read it, then climb:
| Lane | Repo | Why open it |
|---|---|---|
| Starter (this) | first-commit-ai | Mock-first chat CLI + pytest |
| Starter RAG | notes-rag | Retrieve, cite, answer over Markdown notes |
| Starter tokenizer | tiny-bpe-tokenizer | Watch text become token IDs — train, encode, decode |
| Mid tool agent | tiny-tool-agent | ReAct: Thought, Action, Observation, Final Answer |
| Mid prompt lab | prompt-lab | A/B eval: two prompts, fixed cases, score, winner |
| Starter embeddings | embedding-playground | Cosine nearest neighbors you can see |
| Attention mid | attention-warrior | Transformer attention you can hold in one hand |
| Shop skills | mister-jay | Interactive DIY drills (vehicle, electrical, plumbing) — live |
| Literacy (Sinhala) | jay-ai-sinhala | Friends 70+ learning GitHub + AI — live |
| Systems DIY | camera-selector | NVR/Frigate camera planning — live |
Weekday cadence, in order: chat CLI → RAG → tokenizer → tool agent → prompt lab → embedding playground (shipped) → vision → memory → shop-skill explainer.
Profile forge: github.com/primeodin
Most "AI starter" repos bury you under frameworks. This one is small enough to read on a coffee break, then push as your first public AI commit.
Deeper shop note: why --mock exists — same prompt through two doors; green CI without a key is proof of plumbing, not model vibes.
MIT