# Learn Anything: a CLI that turns Claude Code, Cursor and Codex into a Socratic tutor

> Learn Anything generates skill and command files for 30+ AI coding tools, then keeps your learning data in a .learn/ directory of knowledge maps, exercises, quizzes and session notes. It is a study workflow for people who already live in a coding assistant, not a course platform.

**ChenChenyaqi/learn-anything** — Learn Anything is an AI-powered recursive learning system — Socratic deep-dives and TDD-style exercises integrated directly into your coding assistant.

- Repository: https://github.com/ChenChenyaqi/learn-anything
- Stars: 470 · Forks: 36
- Language: TypeScript
- License: MIT
- Published: 2026-09-20 · Updated: 2026-09-20 · Language: en
- Canonical page: https://hysenlabs.com/projects/chenchenyaqi-learn-anything

## The gap Learn Anything fills between a chat window and a study plan

Most people who use an AI coding assistant to learn a topic end up with a long, unstructured chat. Nothing persists in a form the next session can build on, and nothing tells you which parts you actually retained. Learn Anything targets that gap. According to the README, it generates skill and command files for more than 30 AI coding tools, including Claude Code, Cursor, Codex and OpenCode, and those files add six slash commands to the assistant you already use.

The audience is narrow and specific: developers who want to master a technical topic and are already comfortable driving an assistant from a terminal. There is no browser-based course, no video, no instructor. The learning loop happens in the same tool where you write code, and the artifacts land in your project directory.

The six commands are /learn:topic, /learn:explain, /learn:practice, /learn:review, /learn:status and /learn:quiz. Each maps to a different mode of study: mapping a subject, going deeper on demand, writing code, reviewing, checking mastery and answering quick questions. The README describes the overall approach as a recursive learning method with Socratic deep-dives and TDD-style exercises.

## How the adapter pattern writes tool-specific files into your project

The mechanism is file generation, not a service. When you run the init command, the CLI writes command and skill files into the directories each assistant expects, using what the README calls an adapter pattern. Claude receives YAML frontmatter files under .claude/commands/learn/ and .claude/skills/. Gemini receives TOML-format commands under .gemini/commands/learn/. Cursor receives Markdown under .cursor/commands/. Codex receives prompt files under .codex/prompts/.

Your learning data is kept separate from those generated files. It lives under .learn/topics/<topic>/, and the README shows the layout for a TypeScript topic: state.json, knowledge-map.md, plus sessions/, exercises/ and quizzes/ subdirectories. The README calls state.json the single source of truth and says knowledge-map.md is auto-rendered from it. That separation matters: the generated tool files are disposable output, while the topic directory is the record you keep.

Sessions feed spaced repetition, exercises hold TDD-style coding work, and quizzes are saved as reusable question decks. The repository layout confirms the implementation path: packages/cli/src/core/ holds init, config, command generation and templates, packages/cli/src/i18n/ holds the en and zh-CN locales, and packages/cli/bin/ holds the learn-anything binary. A second workspace package, learn-anything-gui, is listed in the README as coming soon and has only a README in the repository.

## Installing learn-anything-cli and running your first topic

The README gives three ways in. The quickest runs the published package without a global install, and interactive mode auto-detects which AI tools are present on your machine before prompting you to choose. Node.js 20 or newer is required, per the engines field in the repository package.json.

```bash
npx learn-anything-cli init
```

If you would rather not rely on detection, name the tool explicitly. The README uses claude as the example value for the --tools flag.

```bash
npx learn-anything-cli init --tools claude
```

For repeated use, the README offers a global install through pnpm or npm, after which the binary is invoked as learn-anything.

```bash
pnpm add -g learn-anything-cli
learn-anything init
```

During init or update you are prompted about Context7, an optional integration for documentation verification. The README states that when it is enabled, the AI fetches official docs and cross-references its explanations against authoritative sources. Setup is handled separately with npx ctx7 setup. This is the one part of the flow that depends on an outside service, so treat it as optional unless teaching accuracy on fast-moving APIs matters to you.

Once init finishes, the six slash commands are available in the assistant. The README's table maps /learn:topic to initializing a topic and generating a knowledge map, /learn:explain to recursive explanations, /learn:practice to TDD-style coding exercises with structured feedback, /learn:review to spaced repetition, /learn:status to a knowledge map heatmap, and /learn:quiz to graded text Q&A. A typical first session is to run /learn:topic with a subject name, read the generated knowledge map, then pick one branch and run /learn:explain on it. To browse what accumulates, the README documents a pre-built dashboard that ships with the CLI.

```bash
npx learn-anything-cli serve
```

The command accepts --port and --no-open, so a custom port and a suppressed browser launch are both supported. The README states the dashboard is pre-built and requires no extra npm install, and that it offers a knowledge map view, session notes, an exercise viewer with syntax highlighting, dark mode, English and Chinese interfaces, and hot reload when topic files change.

## Where Learn Anything stops being the right tool

Everything the project produces is text the assistant writes. The README describes quizzes as graded and exercises as carrying structured feedback, but the grading is performed by the model reading your answers, not by a test runner or a locked answer key. If you need a credential, an exam result or a score that an employer will accept, this is the wrong category of tool entirely.

The second constraint is structural. The generated files are written into tool-specific directories inside your repository: .claude/, .cursor/, .gemini/, .codex/ and similar. The README documents init and update, and it does not document an uninstall or a rollback for those generated files. On a shared team repository, that means a contributor can commit assistant configuration that other people did not ask for. Nothing in the README describes a dry-run mode or a way to preview what init will write before it writes it.

Third, the learning record is only as durable as the directory. There is no sync, no export format and no account in the README. If .learn/ is not committed or backed up, the sessions, exercises and quiz decks are gone with the working copy. The dashboard reads those files; it does not store them.

Finally, the project assumes an assistant that supports project-level command or prompt files. The README lists over 30 supported tools, but coverage is per-adapter, and a tool that changes its own file format can break generation until the adapter is updated. The last push to the repository was on 2026-08-29, and the most recent release listed is v1.6.3 from 2026-07-21.

## Learn Anything compared with Anki and NotebookLM

The obvious alternative for retention is Anki. Both use spaced repetition, and the difference is where the cards come from. Anki is a dedicated application with its own scheduler, its own sync service and a large ecosystem of shared decks; you create or import cards and review them in Anki. Learn Anything keeps review inside the assistant, with /learn:review generating a personalized next-step plan from your session history, and the quiz decks stored as files under .learn/topics/<topic>/quizzes/. If you want a mature scheduler and a mobile review habit, Anki is the stronger choice. If you want the review to be generated from the same conversation where you just struggled with a concept, Learn Anything is the closer fit.

NotebookLM is the other comparison people reach for. It is a hosted research and synthesis tool built around source documents you upload, and it answers questions grounded in those sources. Learn Anything does no source ingestion. It builds a knowledge map for a topic you name, then teaches through dialogue and code. Context7 is the only documentation-aware piece, and it is optional. The trade-off runs the other way too: NotebookLM requires an account and a browser, while Learn Anything writes plain files into a repository you control.

One more difference worth stating plainly. Anki and NotebookLM are products you use directly. Learn Anything is a generator. Its output is configuration for someone else's assistant, which means its quality is partly the quality of the model you point it at.

## Maintenance, licence and what upgrading costs you

The repository is MIT licensed, and the LICENSE file sits at the top level alongside README.md and README.zh-CN.md. MIT is permissive, so the practical implication for a team is that generated files and any adapted templates can be used in a commercial repository without a separate agreement. That is a statement about the licence text, not legal advice; if your organisation has a policy on copyleft or attribution, check the LICENSE file itself rather than this summary.

The workspace is a pnpm monorepo. The root package.json is marked private and declares engines.node as >=20.0.0. Build, dev, test and lint are all delegated with pnpm -r, so a contributor working on the CLI needs pnpm rather than plain npm. Husky, commitlint with the conventional config, lint-staged and Prettier are wired into the repository, which means commits are checked before they land.

Upgrade cost for users is low in one sense: the CLI is published to npm as learn-anything-cli, so npx picks up the latest version each run, and the three most recent releases listed are v1.6.1, v1.6.2 and v1.6.3, all within July 2026. The cost that is not visible is regeneration. The README mentions an update flow alongside init, and since generated command and skill files are overwritten by that flow, any local edits you make to files under .claude/commands/learn/ or the equivalent directories for other tools are at risk. Keep customisations in .learn/ or in your own files, not in generated output.

## Conclusion

Adopt Learn Anything if you already work inside Claude Code, Cursor, Codex or a similar assistant and want your learning history to live in the repository as plain files under .learn/topics/. Do not adopt it if you want a hosted course with video or graded credentials, or if you cannot run Node.js 20 or newer. Before committing, run npx learn-anything-cli init --tools claude in a scratch repository and inspect the generated .claude/commands/learn/ files and the .learn/ directory layout, since the README does not document an uninstall or rollback path for generated tool files.

## FAQ

### What is Learn Anything and which AI coding tools does it work with?

It is an AI-powered recursive learning system that generates skill and command files for more than 30 AI coding tools, including Claude Code, Cursor, Codex and OpenCode. Once generated, your assistant gains six slash commands for topics, explanations, practice, review, status and quizzes.

### How do I install and start using Learn Anything?

Run npx learn-anything-cli init for interactive mode, which auto-detects your AI tools, or pass --tools claude to target one explicitly. The README also documents a global install with pnpm add -g learn-anything-cli followed by learn-anything init. Node.js 20 or newer is required.

### How accurate is Learn Anything?

The README does not state an accuracy figure. It describes an optional Context7 integration that, when enabled, fetches official documentation and cross-references the AI's explanations against authoritative sources. Explanations and quiz grading otherwise come from the model you are using.

### Where does Learn Anything store my learning data?

Under .learn/topics/<topic>/ inside your project, with state.json as the single source of truth, knowledge-map.md rendered from it, and sessions, exercises and quizzes in their own subdirectories. The README does not describe any sync or export, so the directory itself is the record.

### Is there a visual interface for browsing what I have learned?

Yes. The README documents npx learn-anything-cli serve, a pre-built dashboard that ships with the CLI and needs no extra npm install. It shows the knowledge map, session notes and exercises, with dark mode, English and Chinese interfaces, and hot reload. It accepts --port and --no-open.

## Sources

- [ChenChenyaqi/learn-anything on GitHub](https://github.com/ChenChenyaqi/learn-anything)
- [Issues](https://github.com/ChenChenyaqi/learn-anything/issues)
- [License: MIT](https://github.com/ChenChenyaqi/learn-anything/blob/main/LICENSE)
- [README](https://github.com/ChenChenyaqi/learn-anything/blob/main/README.md)
- [Releases](https://github.com/ChenChenyaqi/learn-anything/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/chenchenyaqi-learn-anything
