The learn command
Courses, lessons, exercises, checks and progress from your terminal, and the tools for authors.
On this page
npx @sypnia/learn nextIt uses the session of npx @sypnia/app login, shared by every Sypnia command line. With your own engine, sign in once with npx @sypnia/learn login --server <url>.
For learners
| Command | Does |
|---|---|
learn courses, learn course <id> | the courses, and one course with your progress |
learn next | the next lesson of your path |
learn lesson <id> [--level] [--lang] | read a lesson in the terminal |
learn start <lesson> [--project <ref>] [--path <dir>] | start its exercise: the branch and LEARN.md; --project defaults to the project of the folder’s sypnia.toml |
learn check [--watch] | run the checks on your last commit; --watch checks on every commit |
learn hint | one hint, at your level |
learn status | the exercise you are on and its last results |
learn finish --keep | --drop | keep the branch with a pull request, or delete it |
learn explain <file[:lines]>, --case <id>, --trace <id>, --problem <id> | an explanation at your level |
learn progress [--json] | what you have done |
learn progress export, learn progress delete | download, or delete, all your progress |
For authors
| Command | Does |
|---|---|
learn lint <dir> | check a course folder against the format |
learn preview <lesson> [--level] [--project sample|<ref>] [--lang] | the lesson as one learner would see it |
learn courses add <dir> [--org <org>] | publish a course, or a new version of it |
learn courses remove <id> | take a course down; learners keep their progress |
Exit codes
| Code | Meaning |
|---|---|
| 0 | done |
| 1 | an error |
| 2 | wrong use of the command |
| 3 | not signed in |
| 4 | not allowed |
| 5 | the checks ran, and at least one failed |