تخطَّ إلى المحتوى

Learning with CodeTutor

هذا المحتوى غير متوفر بلغتك بعد.

CodeTutor includes 43 versioned JavaScript and TypeScript lessons. Lesson files and progress stay on your computer; no account or cloud sync is required.

Before you start

Install the CodeTutor CLI. Bundled lesson validators also need the separate Bun command on your terminal’s PATH; the CLI’s built-in runtime does not install it. Check with:

Terminal window
bun --version

If it is missing, follow the official Bun installation guide, reopen your terminal, and check again. Installation needs internet access. Once installed, local lessons and checks do not need a network connection or account.

Choose your level

On first use, choose beginner, intermediate, or advanced. Change it later:

Terminal window
codetutor learn level intermediate

The tutor asks questions and gives layered hints for beginners, collaborates with partial scaffolding at the intermediate level, and stays concise for advanced learners.

Start a lesson

Terminal window
codetutor learn list
codetutor learn start js-01-values --no-tui

CodeTutor creates an isolated workspace in its platform data directory. Starting the same lesson resumes that workspace.

Open the printed workspace path in your editor. --no-tui keeps this step offline and does not open an AI conversation.

Read README.md, edit index.js (or index.ts for TypeScript lessons), and save your answer in that workspace. Do not edit a different project’s copy of a file.

Inside a tutoring session, use /lesson, /hint, /check, /progress, and /solution. A solution reveal is recorded and displayed without overwriting your code.

Validate your work

Terminal window
codetutor learn check js-01-values

Only the bundled deterministic validator can mark a lesson complete. AI feedback explains failures but cannot override them.

The unfinished starter is supposed to fail. Read the test output, update and save your answer, then check again. Do not change the bundled tests to make an incorrect answer pass. If Bun cannot be found, follow lesson troubleshooting. Using an explicit lesson ID checks that lesson even when your terminal is elsewhere.

Work offline

Catalog listing, scaffolding, validation, progress, hints, and solutions work without a model connection. An AI tutoring conversation requires CodeTutor account sign-in and an explicitly selected model. Set up your account.

Resume, reveal, or reset

Terminal window
codetutor learn resume

resume prints an in-progress lesson and its workspace. If every started lesson is complete, it reports that no lesson is in progress. To revisit a completed lesson, use its ID with codetutor learn start and --no-tui. Starting it again preserves its files; an explicit reset replaces them.

Terminal window
codetutor learn hint js-01-values

Hints reveal progressively, up to three. When you choose to see the full solution:

Terminal window
codetutor learn solution js-01-values

Viewing a solution records the reveal and shows a diff without overwriting your work. Check your progress separately:

Terminal window
codetutor learn status

Reset replaces the lesson workspace with its starter files. Back up any work you want to keep first. Run codetutor learn reset --help to review the reset command and its confirmation requirement.