anki-xml
v0.0.3
Published
XML-first CLI for importing Anki flashcards via AnkiConnect. Streaming, validated, recoverable.
Maintainers
Readme
anki-import (anki-xml)
XML-first CLI for importing Anki flashcards via AnkiConnect.
Current release: 0.0.3
XML is the source of truth. JSON is used only for logs, diagnostics, and checkpoints.
Install
npm install -g [email protected]
# or
npx [email protected] doctorBins: anki-import and anki-xml.
From source (contributors)
pnpm install
pnpm build
node dist/cli.js doctorRequires Node 20+ and pnpm 10+. Package installs enforce a 14-day minimum release age.
Quick start
anki-import doctor
anki-import validate cards.xml
anki-import import cards.xml --dry-run
anki-import import cards.xml --stream --batch-size 500XML example
<anki version="1">
<deck name="Spanish">
<note type="Basic">
<field name="Front"><![CDATA[<h1>Hola</h1>]]></field>
<field name="Back"><![CDATA[Hello]]></field>
<tag>language</tag>
</note>
</deck>
</anki>Legacy short tags (<front>, <back>) still work.
Commands
| Command | Purpose |
|---|---|
| doctor | Environment check |
| validate <file> | Local XML validation |
| import <file> | Import to Anki |
| checkpoint list | List checkpoints |
| rollback <id> | Undo an import |
| benchmark <file> | Throughput report |
Changelog
See CHANGELOG.md for 0.0.3 release notes.
License
MIT
