# flashcards-obsidian: Anki cards authored in Obsidian, with Obsidian as the source of truth

> Flashcards is an Obsidian community plugin that turns Markdown notes into Anki cards over the AnkiConnect bridge. It is explicitly one-way authoring, Obsidian owns the card content, type, deck, and tags while Anki owns review history and scheduling, and each Anki card links back to its source note. The v2 rewrite is documented in a wiki, with the v1 branch kept for the previous implementation.

**reuseman/flashcards-obsidian** — 🎴 An Anki plugin for Obsidian.md

- Repository: https://github.com/reuseman/flashcards-obsidian
- Website: https://reuseman.github.io/flashcards-obsidian/card-types.html
- Stars: 1,109 · Forks: 109
- Language: TypeScript
- License: MIT
- Published: 2026-10-19 · Updated: 2026-10-19 · Language: en
- Canonical page: https://hysenlabs.com/projects/reuseman-flashcards-obsidian

## One-way authoring, stated up front

The project summary is unusually clear about its model, and it is worth quoting the shape of it before anything else.

You write and organize cards in Obsidian. The plugin creates or updates the matching notes in Anki. Obsidian owns card content, card type, deck, and authored tags. Anki owns review history and scheduling. Cards created directly in Anki are not changed. Each Anki card links back to its exact source in Obsidian.

And then the sentence that defines the whole tool: this is one-way authoring, not two-way editing. If you change a linked card in Anki, the next update restores the content from Obsidian.

That is a much stronger statement than a plugin that syncs, and it is a design decision rather than a limitation being apologised for. The consequence is that Obsidian is the source of truth for what a card says, and Anki is the source of truth for how you are doing on it. A user who opens a card in Anki, fixes a typo, and saves will see the typo come back on the next update, and the project tells you so in the summary rather than letting you find out.

The two lines about cards created directly in Anki and about the link back to the source are the escape hatches that make this workable. A card you wrote in Anki, outside the plugin's management, is left alone, so you can keep a personal note in the same deck without the plugin touching it. And the link back means you can navigate from a card in Anki to the exact note in Obsidian, which is what makes the round trip workable rather than a trap.

The plugin adds a small `^q-xxxx` anchor and a managed `flashcards` property to the note, and the documentation says not to edit them by hand. That is how the two systems find each other, and the anchor is a block reference, so the mapping is precise rather than a title match.

## The requirements and the install are more specific than most plugins

The requirements list is short and every entry is a hard requirement.

Obsidian 1.13.0 or newer. The desktop version of Anki, which is worth pausing on, because the plugin needs to talk to a running Anki over a local HTTP bridge, and the mobile Anki app does not provide that. The AnkiConnect add-on, and Anki running when you update cards, with the note that if it is closed, Flashcards starts it for you and waits.

The install procedure is six numbered steps and the middle two are the ones people miss. In Obsidian you open Settings, then Community plugins, then Browse, search for Flashcards, and install the plugin, then enable it. In Anki you open Tools, then Add-ons, then Get Add-ons, enter the AnkiConnect code `2055492159`, and restart Anki.

That add-on code is a specific, citable thing, and it is also the number you will need if the connection fails. The troubleshooting section walks through the checks in order: update Flashcards to 2.0.1 or later in the community plugins settings and restart Obsidian, confirm AnkiConnect appears under Tools and Add-ons in Anki, restart Anki if you installed or changed AnkiConnect, then open `http://127.0.0.1:8765` in a browser where it should show `Anki-Connect`.

That last step is the diagnostic worth remembering. Opening the address in a browser and seeing the service name tells you AnkiConnect is running, independently of Obsidian, which separates a plugin problem from an add-on problem in one action.

The project also notes that Flashcards 2.0.1 and later work with AnkiConnect's default settings, so you do not need to add `app://obsidian.md` to `webCorsOriginList`. That is a compatibility note from a version bump, and it means an instruction you may find in older guides is no longer needed.

AnkiConnect uses `http://127.0.0.1:8765` by default, and if you set an AnkiConnect API key you select the secret containing that key in the Flashcards settings.

## Five card types, and the syntax for each

The card type system is the part of the plugin you actually write against, and there are five.

Basic is one line, a question, a double colon, and the answer:

```markdown
What is the capital of France?::Paris
```

Reversed uses three colons and creates cards in both directions, and the documentation advises using it only when both directions are useful:

```markdown
TCP:::Transmission Control Protocol
```

Cloze is the standard highlight syntax, and it supports both the automatic numbering and explicit numbers:

```markdown
The mitochondria is the ==powerhouse== of the cell.
The {1:heart} pumps blood through the {1:circulatory system}.
```

`==text==` creates numbered clozes in source order, and `{N:text}` lets you choose the number. Reusing a number when several parts should be hidden together is the point of the explicit form.

Heading cards are a heading with a `#card` marker, and they can hold several paragraphs, lists, code blocks, and lower headings. The next heading at the same or a higher level ends the answer:

```markdown
## What is recursion? #card

A function that calls itself and has a base case.
```

Reminder is a single piece of content with no answer, and it returns through Anki's normal schedule:

```markdown
Prefer reversible decisions when uncertainty is high. #card-reminder
```

And the explicit multi-line card, which uses a fenced `flashcard` block with `front:` and `back:` keys, and a `type` key:

````markdown
```flashcard
front: What does CSS stand for?
back: Cascading Style Sheets
type: reversed
```
````

The default `type` is `basic`, and the other values are `reversed`, `cloze`, and `reminder`. Reminder blocks use `content:` instead of `front:` and `back:`.

The plugin also supports card callouts, cards in lists, and atomic note cards, and the v2 wiki has their exact rules and examples. So the five types are the documented core and the rest are extensions with their own rules elsewhere.

One parsing detail matters for anyone with notes full of code: card markers inside code, math, HTML comments, and ordinary blockquotes are not parsed as new cards.

## What a card can contain, and how decks and tags are decided

Cards can contain more than plain text, and the list is worth reading because it determines what you can put in a note.

Emphasis, links, lists, quotes, and code. LaTeX math. Obsidian wikilinks, including heading and block links. Images and audio attachments.

Those are the things a note-taking user would expect to be able to reuse, and the plugin's job is to carry them across into Anki's note type rather than flattening them to text.

Decks, tags, and context are configured with frontmatter on the note:

```yaml
---
cards-deck: Knowledge::Biology
tags:
  - biology
  - exam
---
```

And the defaults are stated as a list. The note folder selects the deck when `cards-deck` is absent. The fallback deck is `Default`. Every card gets the `obsidian` tag. Parent headings appear as context above the review question. Removing a linked card asks for confirmation before Anki deletes it.

That last default is a good piece of design. A plugin that syncs by deleting what it no longer sees can wipe a deck, and a confirmation step before an Anki delete is exactly the right place for the human to be in the loop.

The parent-headings-as-context behaviour is the other one worth understanding, because it changes how you write. When you review a card in Anki, the headings above it in the note appear above the question, which is how a cloze or a heading card gets its context without repeating it on every card.

All of these defaults can be changed in the Flashcards settings, so the folder-based deck mapping and the automatic `obsidian` tag are starting points rather than fixed policy.

## The commands, the idempotency, and the v2 migration tooling

There are four commands, and two of them exist because v2 changed the syntax.

Flashcards: Update Anki from current note updates the active note. Flashcards: Update Anki from vault updates every eligible Markdown note in the vault. Flashcards: Check vault for v2 syntax migration reports old syntax in eligible notes and opens its source without changing files. Flashcards: Apply v2 Anki card style previews, backs up, and updates compatible managed Anki note types.

The third one is a report, not a fix. It finds notes written in the v1 syntax and opens the source so you can see what needs changing, and it does not modify any files. The fourth one is the only one that changes anything in Anki, and it previews and backs up first.

Idempotency is handled explicitly. Running an update again does not duplicate unchanged cards, and vault updates keep a disposable index to skip unchanged notes, verifying existing cards. The word disposable is the important one, because it means the index is a cache rather than state you need to keep, and a stale or missing index costs time rather than correctness.

The v2 rewrite is the context for all of this. The summary describes Flashcards v2, and the previous implementation and its documentation remain available on the legacy v1 branch. So the project kept the old branch alive for anyone who has not migrated, and the migration commands exist to help people move.

The build and test tooling in the package manifest shows how the project is developed. The build is `tsc --noEmit` followed by an esbuild config run in production mode, and the dev script is the same esbuild config without the production flag. Tests are vitest, with a separate coverage script. There is a check script that chains lint, markdown lint, an architecture check, a dead code check, the tests, and the build, which is a thorough pre-commit pipeline for a plugin.

The architecture tooling is unusual and worth noting. There is a dependency-cruiser config with a `arch:check` script that validates the import graph, an `arch:graph` script that renders the graph as an SVG through dot, and likec4 scripts that serve and build architecture diagrams. So the project maintains a diagram of its own module structure, checked in CI.

There is also a `test-vault/` directory with a reset script, which is how you test a plugin that manipulates real files: a fixture vault with scenarios and features, a script to check the generated ids, and a script to generate fixture media. The reset script uses git checkout to restore the scenarios and removes the plugin's own data file and sync log, and it prints a reminder to reload Obsidian with Cmd or Ctrl+R to pick up the clean state.

## Conclusion

flashcards-obsidian fits a person who writes in Obsidian, reviews in Anki, and wants their notes to be the single source of truth without maintaining two copies of every card. It is the wrong choice for a workflow that needs to edit cards in Anki, because the plugin is one-way and will restore the Obsidian content, and it is the wrong choice if Anki runs somewhere other than your own desktop. Check three things before you set it up: that you are on Obsidian 1.13.0 or newer with the desktop version of Anki, that the AnkiConnect add-on code 2055492159 is installed, and that you accept the Anki-waiting behaviour, because the plugin starts Anki for you and an update that runs while a profile password prompt is open will time out.

## FAQ

### How does flashcards-obsidian sync between Obsidian and Anki?

It is one-way authoring. Obsidian owns the card content, card type, deck, and authored tags, while Anki owns review history and scheduling. The plugin creates or updates the matching notes in Anki, leaves cards you created directly in Anki alone, and if you change a linked card in Anki, the next update restores the content from Obsidian.

### What are the requirements for installing flashcards-obsidian?

Obsidian 1.13.0 or newer, the desktop version of Anki, and the AnkiConnect add-on, whose add-on code is 2055492159. Anki has to be running when you update cards, and if it is closed the plugin starts it for you and waits. Versions 2.0.1 and later work with AnkiConnect's default settings.

### Which card types does flashcards-obsidian support?

Five. Basic uses a question and answer separated by a double colon, reversed uses three colons and creates cards in both directions, cloze uses the equals syntax or explicit numbered braces, heading cards use a `#card` marker on a heading, and reminders use `#card-reminder` with no answer. An explicit fenced `flashcard` block takes `front`, `back`, and a `type` of basic, reversed, cloze, or reminder.

### How do decks and tags get chosen for a card?

By default the note folder selects the deck when `cards-deck` is absent from the frontmatter, the fallback deck is `Default`, every card gets the `obsidian` tag, and parent headings appear as context above the review question. Removing a linked card asks for confirmation before Anki deletes it, and all of these defaults can be changed in the Flashcards settings.

## Sources

- [License: MIT](https://github.com/reuseman/flashcards-obsidian/blob/main/LICENSE)
- [Project website](https://reuseman.github.io/flashcards-obsidian/card-types.html)
- [README](https://github.com/reuseman/flashcards-obsidian/blob/main/README.md)
- [Releases](https://github.com/reuseman/flashcards-obsidian/releases)
- [reuseman/flashcards-obsidian on GitHub](https://github.com/reuseman/flashcards-obsidian)

---

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