Skip to content

Repository files navigation

first-commit-ai

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.

60-second start

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.

Real chat (optional)

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."

What you just built

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

Change one thing

  1. Edit DEFAULT_SYSTEM in client.py — make the voice yours
  2. Point OPENAI_BASE_URL at Ollama or another compatible server
  3. Add a second command (e.g. --system "...") and a test for it — see good first issues

Help / good first issues

Scoped tickets live in Issues. Start with CONTRIBUTING.md (fork → test → PR map), then pick an open idea:

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.

Daily builds series

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

Why this exists

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.

License

MIT

About

Day-1 AI build: tiny chat CLI with mock tests (mockable). Clone, run, understand.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages