Metadata-Version: 2.4
Name: codetrain-cli
Version: 0.2.0
Summary: Installer and launcher for the CodeTrain CLI: a Socratic AI coding tutor that teaches you on your own codebase and never writes your code.
Author-email: CodeTrain by InferHaven <support@codetrain.ai>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://codetrain.ai
Project-URL: Documentation, https://codetrain.ai/developers/
Project-URL: Changelog, https://codetrain.ai/changelog/
Project-URL: Issues, https://codetrain.ai/contact/
Keywords: ai,tutor,learning,socratic,code-review,onboarding,cli
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Education
Classifier: Topic :: Software Development :: Documentation
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# CodeTrain CLI

A Socratic AI coding tutor that teaches you on your own codebase and never writes your code for
you. It breaks a real task into small steps, explains the part you need before you attempt it,
then asks you to write the code. Each step runs. If it does not pass, the step does not advance,
and the tutor asks a question instead of handing over the answer.

```bash
pip install codetrain-cli
codetrain login
codetrain start --mode repo
```

Free for ten lessons a month, no card. https://codetrain.ai

## What this package is

**A launcher, not the tutor itself.** Installing it gives you the `codetrain` command. The first
time you run it, it downloads the agent bundle from `https://codetrain.ai/dist/`, checks it
against the published SHA-256, and unpacks it to `~/.codetrain/agent`. After that it runs
offline, and it checks for a newer bundle at most once a day.

It works this way so there is only ever one copy of the agent on your machine. The other install
route is `curl -fsSL https://codetrain.ai/install.sh | sh`, which puts the same files in the same
place and installs this same launcher. Whichever you use, and even if you use both, the
`codetrain` command runs the same code and there is no version to keep in sync.

Updating is the same story. Once a day the command checks whether the published bundle has
changed and replaces its own copy if it has. `codetrain update` forces the check;
`CODETRAIN_NO_UPDATE=1` switches it off. You do not need to reinstall this package to get a newer
agent, and upgrading this package does not by itself change which agent you run.

If your environment forbids downloads at run time, use the shell installer instead, or unpack the
bundle yourself.

## Where your code goes

Nowhere. The tutor runs on your machine and serves its interface on `127.0.0.1`. What crosses the
network is your API token, and on the managed plan the prompt snippets sent to the model proxy.
Bring your own key and the model calls go straight to your provider instead.

Repository reading refuses anything that looks like a secret, and refuses files your `.gitignore`
already excludes.

## Commands

| Command | What it does |
| --- | --- |
| `codetrain login` | Connect this machine to your account |
| `codetrain status` | Plan, lessons used, managed budget remaining |
| `codetrain start --mode repo` | Learn the repository in the current directory |
| `codetrain start --mode sandbox` | A throwaway practice project |
| `codetrain tutor` | Review what you just wrote |
| `codetrain end` | End the active lesson |
| `codetrain sync` | Sync your learner profile to and from the cloud |
| `codetrain update` | Fetch the newest agent bundle now |

## Requirements

Python 3.9 or newer, and nothing else. No dependencies, by design: this lands on a learner's
machine, and every dependency is one more thing that can refuse to install behind a corporate
proxy.

## Environment

| Variable | Effect |
| --- | --- |
| `CODETRAIN_NO_UPDATE` | Skip the daily bundle check |
| `CODETRAIN_HOME` | Where the agent is installed. Default `~/.codetrain` |
| `CODETRAIN_BASE` | Download origin. Default `https://codetrain.ai` |
| `CODE_TRAINER_HOME` | Where the auth token is stored. Default `~/.config/codetrain` |

## Links

- Documentation: https://codetrain.ai/docs/
- API and CLI reference: https://codetrain.ai/developers/
- Security and data handling: https://codetrain.ai/security
- Support: support@codetrain.ai
