Manage your Anki collection from the command line or an LLM agent, without opening Anki.
README
Sometimes you want to work on your Anki collection without opening Anki. That's what Shrike is for. It's a command-line client and an MCP server for your collection, so you can manage cards from a terminal or hand them to an LLM agent.
Shrike works directly on the collection's SQLite database, without using the Anki desktop app or relying on the AnkiConnect bridge. You get:
shrike CLI to browse, create, edit, and delete notes and note typescollection.anki2 file)Install Shrike from PyPI:
pipx install shrike-mcp # or: pip install shrike-mcp
The package is shrike-mcp; the command it installs is shrike.
Point Shrike at your collection and start the daemon:
shrike server start --collection ~/path/to/collection.anki2
That starts a background daemon with your collection open. The other shrike commands talk to it, so they don't repeat --collection:
shrike info
shrike note list --deck Default
And when you're done:
shrike server stop
shrike note search finds notes by meaning instead of keywords. You supply an embedding model to turn your notes into vectors, and pick a backend to run it. Shrike has two backends, and which one suits you depends mostly on whether your cards are plain text.
For plain-text cards, which is the common case, the ONNX backend is the simpler choice.