{"slug": "show-hn-codetrain-an-ai-tutor-that-refuses-to-write-code-for-you", "title": "Show HN: CodeTrain – an AI tutor that refuses to write code for you", "summary": "CodeTrain, a new AI tutor from InferHaven, teaches developers on their own codebase by requiring them to type every line themselves, refusing to write code for them. The tool runs locally on the user's machine to keep code private, offers a free GitHub skill and a Pro plan from $24/mo, and aims to prevent the erosion of understanding caused by AI-generated code. It uses a Socratic method to review code, run tests, and track learning gaps with spaced repetition, targeting teams that need to standardize onboarding and measure comprehension.", "body_md": "CodeTrain teaches your developers on their **own codebase**, one small step at a time. They type every line themselves, so you can see what actually stuck, without autocomplete doing the thinking for them.\n\nYour code never leaves your machine. [Free skill on GitHub](https://github.com/InferHaven/agent-skills/tree/main/codetrain) · Pro from $24/mo.\n\nAI can write the code. It can just as easily take a team off the rails.\n\nCodeTrain keeps your engineers on the tracks: they understand what they ship, and you can prove it.\n\nAs AI writes more of the code, the understanding behind it erodes. Juniors ship features they can't debug. Onboarding still takes months. \"It works\" stops meaning \"we know why.\"\n\nThe discovery phase of learning, where understanding actually forms, gets skipped when the answer is one tab away.\n\nGeneric courses teach someone else's code. Your patterns, your standards, your gotchas go untaught.\n\nSeniors burn their week answering the same questions. Skill doesn't compound; it leaks.\n\nNo videos, no toy exercises. A Socratic tutor asks, nudges, reviews what you wrote, and runs the tests, but it never hands you the answer.\n\nRepo mode edits land in your real branch, so finished code is just part of your work. Sandbox mode is a throwaway lesson based on whatever you give/ask the model. Either way it runs on **127.0.0.1**, so your code stays local.\n\nThe tutor breaks the work into tiny steps in a real editor with an instant Run button. You type the line; it reviews what you wrote and explains what changed.\n\nStuck? It shrinks the step or reveals the next hint, never the solution. Failing code is the best teaching moment, so it leans in instead of bailing out.\n\nA small local profile tracks your level, streak, and recurring gaps, then resurfaces what you struggled with later (spaced repetition). Sync it across machines on Pro.\n\nTrained on *your* repo and standards, not generic katas (Codecademy, Scrimba) or someone else's curriculum.\n\nHands-on by design. Reading an explanation isn't learning; producing the code is. That's the difference from AI explainers.\n\nWith the free skill and the `codetrain`\n\nagent your code stays on your machine — only small prompt snippets cross the wire (or, with your own key, nothing but a license check). The managed in-browser tutor sends what you submit; see our [privacy policy](/privacy).\n\nA free tutor helps one dev. A team needs to **standardize and measure** understanding. You onboard everyone on your codebase the same way, and you can prove it stuck.\n\nConfigure your repo, standards, and a safe first task; CodeTrain runs each new hire through an interactive journey to an early win. They ramp in weeks, not months, without tying up your seniors.\n\nA team dashboard shows each member's finished lessons, concepts, and usage at a glance. Per-seat budgets keep spend predictable; bring your own model key for your data on your account. SSO/SCIM, audit logs & self-host are available for Enterprise — [talk to us](/cdn-cgi/l/email-protection#b4c7d5d8d1c7f4d7dbd0d1c0c6d5ddda9ad5dd8bc7c1d6ded1d7c089f7dbd0d1e0c6d5ddda918684f1dac0d1c6c4c6ddc7d1).\n\nStart free. Upgrade when you want your real repos, your own model key, or your whole team. No card to start.\n\nNo. The agent runs on your machine and serves the UI on localhost. On the managed plan, only short prompt snippets go to the model. On Bring-Your-Own-Key (Team/Enterprise), model calls go straight to Anthropic with your key, and nothing but a license check touches our servers.\n\nThe opposite. Explainers do the work for you. CodeTrain makes *you* write every line, reviews it Socratically, runs your tests, and tracks what you didn't get so it can resurface it. You finish able to do it without help.\n\nThose make your team faster at producing code. This makes sure they still understand it, and gives you a way to prove ramp and retention. Different job. They're complements, not competitors.\n\nYou connect your own Anthropic (or Bedrock) API key. Your code and prompts go directly to the model on your account. That is best for security and cost control, and we just provide the software, accounts, and dashboards.\n\nYes. The core tutor is a [free, open skill](https://github.com/InferHaven/agent-skills/tree/main/codetrain) you can run today. Paid plans add zero-setup managed access, your real repos, cross-device sync, and the team layer.\n\nSpin up a session on your own repo in two minutes. Free to start.", "url": "https://wpnews.pro/news/show-hn-codetrain-an-ai-tutor-that-refuses-to-write-code-for-you", "canonical_source": "https://codetrain.ai", "published_at": "2026-07-20 14:01:43+00:00", "updated_at": "2026-07-20 14:26:12.838466+00:00", "lang": "en", "topics": ["ai-tools", "ai-ethics", "developer-tools", "ai-products"], "entities": ["CodeTrain", "InferHaven", "GitHub", "Anthropic", "Bedrock"], "alternates": {"html": "https://wpnews.pro/news/show-hn-codetrain-an-ai-tutor-that-refuses-to-write-code-for-you", "markdown": "https://wpnews.pro/news/show-hn-codetrain-an-ai-tutor-that-refuses-to-write-code-for-you.md", "text": "https://wpnews.pro/news/show-hn-codetrain-an-ai-tutor-that-refuses-to-write-code-for-you.txt", "jsonld": "https://wpnews.pro/news/show-hn-codetrain-an-ai-tutor-that-refuses-to-write-code-for-you.jsonld"}}