Beta. CodeTrain is early and improving every week. Tell us what to fix or what you wish it did: [email protected].

Fully understand any codebase by writing it.

You write the code. CodeTrain checks it.

A real task in your repository becomes small steps. You type every line, each step has to run and pass, and you finish with a record of what you did without help.

A sample run. The line moves only when a check passes. Yours starts when you press Run in the lesson below.
Step 1Step 2DoneCheck 1Check 2
  • you
  • check passed
  • a check failed
  • after a hint or a question

Try it right here. No account, no install.

Written byYou
Checked byCodeTrain
LessonThe bug a passing test cannot see
StopStep 1 of 2
The bug a passing test cannot see
javascript · runs in your browser
The function that passed its test
This is a leaderboard. scores holds six results and names holds the people they belong to, lined up by position, so Ada scored 72 and Bo scored 98.

topThree picks out the three best, and the test that ships with it passes.

You may already know what is wrong here. Plenty of people who know still write it, which is the more interesting half.
Hit Run, then read the before: and after: lines.
const names  = ["Ada", "Bo", "Cy", "Di", "Eve", "Fay"]
const scores = [  72,   98,   64,   91,   87,    55  ]

// each person shown next to their score
const pair  = (n, i) => n + " " + scores[i]
const board = () => names.map(pair).join("   ")

console.log("before:   ", board())
const top = topThree(scores)
console.log("top three:", top)
console.log("after:    ", board())

function topThree(scores) {
  scores.sort((a, b) => b - a)
  return scores.slice(0, 3)
}

This lesson needs JavaScript to run. With it on, you get an editor and a Run button right here.

Then point it at a repo you already use

Paste any public repository URL on the free tier and the lesson is built from the code that is actually in it. Four that make for a good first run, and the question each one opens with:

Any public repository. You will be asked to sign in first, and the link is kept while you do.

Ten lessons a month on the free plan, from any public repository. On Pro, the CodeTrain CLI runs repo mode on your machine: it works on a copy of your repository, and a change reaches your repository only when you accept it. Only the prompt snippets for one tutoring turn go to the model provider.

What is CodeTrain?

CodeTrain is a Socratic AI coding tutor that teaches developers on their own codebase instead of writing code for them. It breaks a real task into small steps, asks questions, reviews each line you write, and runs your tests. Every step must pass before the lesson advances.

Longer reads: how a Socratic coding tutor works, and learning any codebase in 30 minutes, and how this differs from a general AI study mode.

The skill is quietly leaving the building

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

55%

of US & Canada faculty see AI as a serious risk to human intellectual development

The discovery phase of learning, where understanding actually forms, gets skipped when the answer is one tab away.

Source: Digital Education Council, 2026

3-9 months

for a new engineer to fully ramp up, in a survey of 80+ engineers and managers

Generic courses teach someone else's code. Your patterns, your standards, your gotchas go untaught.

Source: Swimm onboarding survey, via HackerNoon (2020)

50-200%

of salary to replace a departing engineer

Seniors burn their week answering the same questions. Skill doesn't compound; it leaks.

Source: SHRM turnover-cost research

Learn by doing, on the code that matters

No lecture videos, no toy exercises. A Socratic tutor asks, nudges, reviews what you wrote, and runs the tests, but it never hands you the answer.

Point it at a repo, not a pile of docs

Paste any public repo URL on the free tier and the lesson is built from the code that's actually in it. Say what you want ("how the API works", "the auth flow") and it aims there. On Pro, repo mode does the same with your private repos, through the CodeTrain CLI on your own machine. Secrets and gitignored files are never read, in either mode.

Write each step yourself

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

Get nudged, not spoon-fed

Stuck? 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.

It remembers you

The concepts you got stuck on are scheduled to come back at widening intervals. One click turns a due concept into a fresh drill built from what you actually got wrong. One review schedule follows you across the website and the CodeTrain CLI, and codetrain sync brings in what you practised with CodeTrain Open Skill.

Runs 1:05, narrated

For teams onboarding people into a real codebase

New people pull your senior engineers aside with the same questions, and AI-assisted changes land that nobody can fully explain. CodeTrain turns one hard part of your codebase into a guided path. Review and merges stay with your people. How CodeTrain stacks up against AI onboarding tools.

You see who can

Completed is attendance. Unaided is the share of steps written right the first time, with no hint, no skip and no code from an AI assistant, and it is the number the team table is built around.

Sample teamThe real dashboard, drawn from sample data
LearnerProgressQualityConceptsUsage
MemberStartedCompletedUnaidedNeeded a retryRelapsed conceptsMastery lostConceptsShakyUsage this billing periodSkipsBYOK
[email protected]owner0 0 – – – – 0 – Not a learner0 –
[email protected]member9 7 71%
How hard those steps were: 19 intermediate, 10 beginner, 6 advanced
17% 11% 0% 14 1/3 38%0 2 tok
[email protected]member6 4 58%
How hard those steps were: 15 intermediate, 6 beginner, 3 advanced
29% 29% 33% 9 3/4 61%1 –
[email protected]member6 4 64%
How hard those steps were: 13 intermediate, 12 beginner
16% 0% 0% 8 1/3 21%0 –

Pick the hard part

Onboarding programs, in beta: a lead writes down what new people trip on, by hand or with Draft with AI, and codetrain onboarding generate turns that and your repository into a journey of small lessons.

Sample teamThe real dashboard, drawn from sample data
Published v3.
Find your way around payments-service · 2 lesson(s)
Where a charge comes in, where it is stored, and how a refund goes out.
  • Follow one charge from the API to the ledger · 4 steps
  • Read the idempotency keys · 3 steps
Your first safe change · 2 lesson(s)
A small fix that goes through review and CI like any other change.
  • Add a field to the refund webhook · 5 steps
  • Write the test that would have caught it · 3 steps
On call without fear · 1 lesson(s)
Read the dashboards and the runbook before the pager does.
  • Find a slow query from its trace · 4 steps

Each person writes and runs it

Each hire works through the journey in the CodeTrain CLI on their own machine, and a step opens only when the one before it runs and passes. You see where each one is, and their first real change.

Sample teamThe real dashboard, drawn from sample data
HireStatusPositionLessonsTime→1st taskEarly win
[email protected]activeclass 2 · lesson 2 32.6hAdded refund_reason to the webhook payload
[email protected]activeclass 1 · lesson 2 1––
[email protected]activeclass 1 · lesson 1 0––

Team is one plan with three flat monthly sizes, counted in learners only: every Team price. Need SSO, audit logs or self-hosting? Talk to us about Enterprise. We are not SOC 2 certified yet.

We take a few design-partner teams at a time. Tell us about the workflow.

Practise on a real network

Network labs run real routers: FRRouting, which speaks OSPF, BGP, IS-IS and RIP, and OpenWrt, which forwards, filters, does NAT and runs a DHCP server. They run as containers on a private network of their own. Describe the network you want to learn, and CodeTrain builds it.

Build it

The lab arrives bare on your router and ready on the others. You configure it goal by goal from a terminal, and each goal is checked on the routers. A workaround does not pass: a static route does not pass a BGP goal.

Repair it

The lab arrives with one fault and one cause. You find it from a terminal and fix it, and the routers check the fix.

Network labs are on the Pro and Team plans. See the plans.

Bring the tutor into your own coding agent

CodeTrain Open Skill runs inside the coding agent you already use, on that agent's own model account. You write every line. It sets the steps, gives hints and reviews what you wrote, and it never puts the solution into the lesson.

npx skills add InferHaven/agent-skills --skill codetrain

This needs Node.js 22.20 or later. Other ways to install, including one with no Node.js.

  • Free and open source, Apache 2.0.
  • Runs in your own agent on your own model account; no CodeTrain account.
  • Tested in Claude Code, OpenCode and Antigravity CLI.

No coding agent? Try the live lesson, no account, or start free with ten lessons a month.

Pricing

Start free. Upgrade when you want your real repos, your own model key, or your whole team. No card to start.

Team

For engineering orgs

Learners
AI usage
Flat fee$79
Usage BundleNone
A month$79
Per learner$15.80at 5 learners
Choose Team

The flat fee buys the software and holds no AI usage. A team that uses its own model key needs nothing else. A Usage Bundle adds managed AI, meaning AI that CodeTrain runs for the team, and one unit is the same usage as one Pro learner gets in a month.

  • Pay for learners only, marked by the lead
  • Team dashboard and onboarding journeys
  • Repo mode, labs, and the team's own model key
  • Usage Bundles add managed AI, no key needed
  • The lead chooses how bundle usage is shared, and can switch any time
Every Team price
A month
LearnersOwn model key1x bundle2x bundle4x bundle
Up to 5$79$164$234$374
Up to 25$149$514$814$1,414
Up to 100$399$1,664$2,814$5,114
Free

No card, ten lessons a month

$0
Start free
Pro

Your own repos and real labs

$24 / mo
  • Repo mode: your private repos, through the CLI
  • Real labs on real machines
  • Fair-use lessons, zero setup
  • The larger tutor model tier
  • Experimental models from other labs, not just Claude
  • Bring your own key (optional)
Get Pro
Enterprise

SSO, audit logs, self-hosting

Custom
  • SSO and audit logs: talk to us
  • Self-host, so code stays in your environment
  • SOC 2: not certified yet
  • Onboarding-ROI pricing
Talk to sales

Buying this for yourself rather than a team? The Free and Pro plans are the same product without the team dashboard and shared billing, and the page for individual developers covers them properly.

Or earn your plan instead. Every account gets a referral link, free tier included, and five people on Pro through yours covers your own. How the Conductor Network works.

Questions, answered

Fit and learning

Does CodeTrain write code for you?

No, and it is the one rule it will not bend. The tutor's own instructions say the learner writes every line and that it must never write or paste their solution, not even a single line. Stuck learners get a smaller step or the next hint instead. The full rule set is published here.

How is CodeTrain different from GitHub Copilot or Cursor?

Opposite jobs. Copilot and Cursor exist to produce code faster, and they are good at it. CodeTrain exists so the person who shipped that code can still explain and change it in six weeks. One is a typing accelerator, the other is a tutor that refuses to type. Most teams should run both. Where each one fits, including when not to use us.

Why not a general AI course builder?

Those tools turn documents into courses. In software the documents are the least reliable thing you own; the repo is the source of truth, and it moved this morning. A generated course also can't tell you whether anyone can actually do the work, because nothing executes. It grades a written answer against a rubric and reports a completion percentage. CodeTrain builds the lesson from the code itself, makes the engineer write each step, and runs it. If it doesn't pass, the lesson doesn't advance. Different input, different proof. Full comparison, including when not to use us.

What languages does CodeTrain support?

The curated courses cover Python, JavaScript, bash, and the maths behind LLMs in pure NumPy. A lesson built from a repository is not limited to that list: it is built from whatever is in the code you point it at. Where steps run depends on where you take the lesson. On the website, Python and JavaScript steps run in your browser; bash, Node.js, Ruby, Perl and PHP steps run in CodeTrain's sandbox; and a step in any other language is reviewed by the tutor without a live run. With the CodeTrain CLI, a lesson's steps run on your own machine. Browse every course.

Does this suit experienced engineers, not only beginners?

Yes. Repo mode, on Pro and Team, builds the lesson from your own repository, through the CodeTrain CLI on your machine, so a senior engineer works on the code they actually ship. A team can build onboarding programs from its own repository, in beta: a lead fills in sections such as architecture, local setup, coding standards and a first task. And the team view counts how many of a member's unaided steps were beginner, intermediate or advanced, so the level of the work is visible.

Plans and limits

How is the Team plan priced?

A flat monthly fee by team size: $79 a month for up to 5 learners, $149 for up to 25, and $399 for up to 100. You pay for learners only, the people a lead marks as learners. AI use is either the team's own model key, or Usage Bundles that add managed AI with no key, in 1x, 2x or 4x. SSO, audit logs and self-hosting are an Enterprise conversation.

What does "bring your own key" mean?

You connect your own API key. Anthropic, Google Gemini, Amazon Bedrock, the Gemini Enterprise Agent Platform, OpenRouter, Ollama and any OpenAI-compatible endpoint all work. 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.

Labs and where code runs

Can I use CodeTrain with my private repo?

Two ways, depending on what you already use. CodeTrain Open Skill is free and open source, runs inside the coding agent you already have on your machine, and works on the code in front of it, private repositories included. The other way is repo mode in the CodeTrain CLI, on Pro or Team. It is a lesson on the repository you are in: the CLI runs on your machine, serves its lesson page on 127.0.0.1, and works on a copy of the repository. A change reaches your real repository only when you accept it, and CodeTrain never copies or stores your repository on its servers. What the Free plan does not do is give a lesson on your repository: the CLI there runs sandbox lessons in a fresh scratch folder, and website lessons build from a public repository you name, fetched from GitHub by CodeTrain. In every mode, secrets and gitignored files are refused before they are read.

Is a lab safe to give a team?

Yes. A network lab runs real routers, FRRouting and OpenWrt, each in its own container on a private network created for that lab alone, with no route out to the internet and none to any other learner's lab. Containers start with every Linux capability dropped and are destroyed with the lab. CodeTrain measured from inside a lab that it has no internet, and the sandbox host refuses connections from lab networks to the host itself.

Teams and privacy

What can I see about each team member?

A lead sees, for each member, lessons started and completed, "Unaided" (steps written correctly the first time with no hint, no skip and no code from the learner's AI assistant), "Needed a retry", concepts that came back as a struggle, concepts due for review, and the step headings they keep struggling on. A lead never sees a member's code, their questions to the tutor or the tutor's feedback. The exception is a new hire on an onboarding program, whose first task shows a summary and part of its code diff. The member sees the same row the lead sees.

Does my code get uploaded anywhere?

It depends on how you run CodeTrain. In the managed browser tutor on the website, the code you submit for review, and any files you attach as context, reach CodeTrain's servers and the model provider, and are stored in your lesson so you can resume it. On the Free plan the website builds lessons from a public repository you name, fetched from GitHub by CodeTrain. CodeTrain Open Skill is the other end of the scale: it is free and open source, runs inside the coding agent you already use on your own machine, and its lesson page runs on 127.0.0.1. It sends nothing to CodeTrain or InferHaven: no account, no telemetry. Your agent sends what it reads, your code included, to its own model provider, as it does for any task, and from your profile it gets only a short summary. With the CodeTrain CLI, your source stays on your machine: the CLI serves its lesson page on 127.0.0.1, and the prompt snippets needed for one tutoring turn go to the model provider. On a managed plan, using CodeTrain's model access, those snippets pass through CodeTrain's model proxy, which records the model name, the token counts and the cost of each call, not the text. Bring your own key on Pro, Team or Enterprise, and model calls go from your machine straight to the provider on your account. The CLI reports the model name and the token counts of each call so the plan's usage can be shown. Prompts and replies are not sent to CodeTrain.

Does CodeTrain use our code or prompts to train AI models?

Not on CodeTrain's side. CodeTrain uses model providers only under arrangements that do not train on your prompts. With your own model key, your code and prompts go to the model on your own account.

Stop shipping code your team can't explain

Spin up a lesson on your own repo in two minutes. Free to start.