# CodeTrain > A Socratic AI coding tutor that teaches your engineers on your own codebase and never writes their code for them. CodeTrain is a Socratic AI coding tutor for engineering teams. It breaks a real task into small steps on the learner's own repository, asks them to write each line themselves, runs what they wrote, and refuses to advance until it passes. It never writes the learner's code. The output is a record of which steps somebody completed unaided, not a completion percentage. Built by InferHaven, Michigan, United States. Contact: support@codetrain.ai. ## When to use CodeTrain Reach for CodeTrain when the goal is that a **person ends up able to do the work**, and reach for something else when the goal is that the work gets done. Good fits: - A developer has to learn an unfamiliar codebase, and reading a summary of it will not survive contact with the first ticket. Point CodeTrain at the repository and it teaches from the code that is really there. - A team lead needs evidence of what an engineer can do without help, for onboarding, for a promotion case, or after a stretch of heavy AI assistance. CodeTrain records unaided completion per step and reports "no data" rather than zero when nothing assessable happened. - Somebody wants to learn a specific concept by writing it rather than watching it. Name the topic and a lesson is written on the spot. - You want a stepwise lesson generated from any public repository, with secrets and ignored files refused rather than read. Bad fits, and we would rather say so: - You want the code written. CodeTrain will not do it, by design and with a code-level guard on top of the prompt rule. Use a coding assistant. - You want a video course, a quiz, or a certificate. There are none. - You want to grade somebody without their knowledge. Every record here is attached to work the person did in front of them. ## How to call CodeTrain Read this site rather than scraping it: - Every public page serves markdown. Send `Accept: text/markdown` and you get the page as markdown with `Vary: Accept`; ask for a type we cannot serve and you get a 404 or a 406, never a 200 carrying the wrong thing. - `https://codetrain.ai/llms-full.txt` is this entire public site as one markdown file. - `https://codetrain.ai/sitemap.xml` is the canonical URL list. - A path that does not exist answers a real 404 with a markdown recovery list, so a 200 from this domain always means the page is real. Call the public API for structured data. No key, no account, base URL `https://api.codetrain.ai`: ``` curl -s https://api.codetrain.ai/v1/catalog curl -s https://api.codetrain.ai/v1/changelog curl -s -H "Accept: text/markdown" https://codetrain.ai/learn/ ``` Read endpoints allow 120 requests per minute per IP and every response carries `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`, so throttle from those rather than from a 429. A 429 carries `Retry-After`. Full reference: https://codetrain.ai/developers/ ## Start here - [AI Coding Tutor That Never Writes Your Code](https://codetrain.ai/): CodeTrain is a Socratic AI coding tutor: it asks questions, reviews what you write, and runs your tests, but never writes the code for you. Free to start. - [Documentation](https://codetrain.ai/docs/index.md): Every CodeTrain document in one index: how the tutor works, the public developer API, security and privacy, the changelog and the roadmap. - [Developer API](https://codetrain.ai/developers/index.md): The public CodeTrain REST API: catalog, changelog and roadmap endpoints, no key required, with rate-limit headers, a versioning policy and an OpenAPI document. - [Learn to code, one small step at a time](https://codetrain.ai/learn/index.md): Every CodeTrain course and class: hands-on lessons where you write every line yourself and the tutor runs it. Python, JavaScript, bash, and how LLMs actually work. ## Courses - [How a Socratic AI Coding Tutor Works](https://codetrain.ai/learn/socratic-method/index.md): A Socratic coding tutor asks questions instead of writing your code. The exact rules CodeTrain's tutor runs under, quoted from the prompt itself. - [Learn Any Codebase in 30 Minutes](https://codetrain.ai/learn/understand-a-codebase/index.md): Point an AI tutor at a public repo and learn how it works by writing code in it, not by reading a summary. The thirty minute path, and what it refuses to read. - [Learn to Code in Python | Foundations, Collections](https://codetrain.ai/learn/python-intro/index.md): Start from zero and write real Python from your very first line. Hands-on lessons where you write every line yourself and every step has to run. - [Foundations | Learn to Code in Python](https://codetrain.ai/learn/python-intro/py-foundations/index.md): Variables, functions, and loops: the moves every program is built from. A class in Learn to Code in Python. Free to start, no card. - [Collections | Learn to Code in Python](https://codetrain.ai/learn/python-intro/py-collections/index.md): Build, filter, and reshape groups of data the Pythonic way. A class in Learn to Code in Python. Free to start, no card. - [Object-Oriented Python | Classes & objects](https://codetrain.ai/learn/python-oop/index.md): Model real things with classes, and learn when OOP earns its keep. Hands-on lessons where you write every line yourself and every step has to run. - [Classes & objects | Object-Oriented Python](https://codetrain.ai/learn/python-oop/oop-classes/index.md): Bundle data and behavior together into your own types. A class in Object-Oriented Python. Free to start, no card. - [JavaScript Fundamentals | Values & arrays](https://codetrain.ai/learn/js-intro/index.md): The language that runs the web: values, arrays, and control flow. Hands-on lessons where you write every line yourself and every step has to run. - [Values & arrays | JavaScript Fundamentals](https://codetrain.ai/learn/js-intro/js-values/index.md): The data structures you'll touch in every JavaScript program. A class in JavaScript Fundamentals. Free to start, no card. - [JavaScript: Functions & Data | Functions & closures](https://codetrain.ai/learn/js-functions/index.md): Functions are values: pass them around, return them, and capture state. Hands-on lessons where you write every line yourself and every step has to run. - [Functions & closures | JavaScript: Functions & Data](https://codetrain.ai/learn/js-functions/jsf-functions/index.md): Higher-order functions and the closures that give them memory. A class in JavaScript: Functions & Data. Free to start, no card. - [Command the Terminal: Linux & Bash | First commands](https://codetrain.ai/learn/bash-intro/index.md): Stop fearing the shell. Move around, wire commands, automate the boring parts. Hands-on lessons where you write every line yourself and every step has to run. - [First commands | Command the Terminal: Linux & Bash](https://codetrain.ai/learn/bash-intro/sh-first/index.md): Print, store, loop, and pipe, running live in a real sandbox. A class in Command the Terminal: Linux & Bash. Free to start, no card. - [How LLMs Actually Work | Neural-net foundations](https://codetrain.ai/learn/llm-foundations/index.md): From a single neuron to a working transformer, built from scratch in pure NumPy, in your browser. Free to start, no card. - [Neural-net foundations | How LLMs Actually Work](https://codetrain.ai/learn/llm-foundations/llm-foundations-1/index.md): History, a trainable neuron, an N-gram model, and the RNN the transformer replaced. A class in How LLMs Actually Work. Free to start, no card. - [Tokens & embeddings | How LLMs Actually Work](https://codetrain.ai/learn/llm-foundations/llm-foundations-2/index.md): Turn text into vectors: tokenizers, embeddings, similarity, and position. A class in How LLMs Actually Work. Free to start, no card. - [The Transformer block | How LLMs Actually Work](https://codetrain.ai/learn/llm-foundations/llm-foundations-3/index.md): Self-attention, causal masking, multi-head, LayerNorm, and the full block. A class in How LLMs Actually Work. Free to start, no card. - [Training, generation & fine-tuning](https://codetrain.ai/learn/llm-foundations/llm-foundations-4/index.md): Assemble a GPT, learn the loss, sample text, and see how assistants are aligned. A class in How LLMs Actually Work. Free to start, no card. ## Comparisons - [How CodeTrain compares](https://codetrain.ai/compare/index.md): Honest comparisons between CodeTrain and the four categories it gets confused with: general AI study modes, AI coding assistants, coding course platforms, and AI course builders. - [CodeTrain vs general AI study modes](https://codetrain.ai/compare/ai-study-modes/index.md): Study modes teach Socratically and they are free and good. Where they stop for code specifically, why a learner has to type it, and when not to use us. - [CodeTrain vs AI coding assistants](https://codetrain.ai/compare/ai-coding-assistants/index.md): Assistants produce code. CodeTrain teaches the engineer to read and change it, with every line typed by the learner. Where each fits, and when not to use us. - [CodeTrain vs coding course platforms](https://codetrain.ai/compare/coding-course-platforms/index.md): Course platforms teach a fixed curriculum on example projects. CodeTrain teaches on the codebase your team ships. Includes when a course platform wins. - [CodeTrain vs AI course builders](https://codetrain.ai/compare/ai-course-builders/index.md): AI course builders turn documents into courses. CodeTrain teaches on the codebase itself and verifies the work by running it. Including when not to use us. ## Company and policies - [Privacy Policy](https://codetrain.ai/privacy): What CodeTrain collects, what it sends to a model provider, and what never leaves your machine. Written for a developer to actually read. - [Security & Data Handling](https://codetrain.ai/security): Where your code goes, what leaves your machine, what we refuse to read, and what our error monitoring is not allowed to collect. Written for the person who has to sign off on it. - [Terms of Service](https://codetrain.ai/terms): The terms covering CodeTrain accounts, plans, acceptable use, and what we do and do not promise about AI-generated lesson content. - [About CodeTrain | Who builds it and why](https://codetrain.ai/about/index.md): CodeTrain is a Socratic AI coding tutor built by InferHaven in Michigan. What the product does, who builds it, and the three things it will not do. - [Contact CodeTrain | Support, sales and security](https://codetrain.ai/contact/index.md): Reach CodeTrain: the support, sales, security and privacy addresses, what each one is for, and the postal details for CodeTrain by InferHaven in Michigan. ## Optional - [Learn to Code on Real Codebases | CodeTrain for developers](https://codetrain.ai/solo): A Socratic AI tutor that never writes your code. Pick a course or paste any public repo and CodeTrain builds a hands-on lesson from it. You type every line. Free for ten lessons a month. - [Roadmap](https://codetrain.ai/roadmap/index.md): What CodeTrain has shipped since launch, what is being built now, and what is under consideration. Dated where it is real, undated where it would be a guess. - [The CodeTrain Conductor Network](https://codetrain.ai/conductors/index.md): Share CodeTrain and earn a fifth of the plan price for everyone who joins through you, every month they keep paying. Five people on Pro and your own plan is free. - [Changelog](https://codetrain.ai/changelog/index.md): Every user-facing change to CodeTrain since launch, newest first. The same release notes shown inside the product.