🔗 Tsunagi - Modern AnkiConnect alternative

AnkiWeb addon 666370974

Connects Anki to dictionary, mining and script tools through an AnkiConnect-compatible API, adding per-app permissions, selective queries, live change events and undoable writes.
AI-generated summary; may contain mistakes.

sync-integrationdeveloper-toolsbeta

Open on AnkiWeb GitHub Forum topic Find alternatives

AnkiWeb

Votes
1 (👍 1 · 👎 0)
Updated
2026-10-19
Anki versions
26.09.3~
License
MIT (from the license file in the package)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JavaScript, CSS, Verilog, JSON, Common Lisp, YAML, HCL
Description language
en

Maintenance

active

  • Last update or commit: 2026-10-19 (13 days before the snapshot).
  • Test files: 161.
  • GitHub Actions workflows: 6.
  • Commits in the last year: 444.
  • Issues: 1 open, 12 closed.
  • Pull requests: 0 open, 3 merged.

GitHub

Repository
mcgrizzz/tsunagi · more by mcgrizzz
Stars
⭐ 2 · forks 0 · open issues 1
Last commit
2026-10-19
License
MIT
Languages
Python, TypeScript, JavaScript, CSS, HTML, Shell
Tests
161

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
26.0826.09.3+2026-10-19
History across monthly snapshots

Loading…

Similar addons

AnkiConnect archived has 5 forks →

Enables external applications to communicate with Anki over a simple HTTP API, supporting card deck queries, automatic card creation, and more.

card-creationsync-integration

518 votes 84% approval 👍 453 · 👎 65 ⭐ 2.1k Anki 26.08~ Updated 2026-10-15
Auto Translate Batch Creator

Automatically creates language-learning flashcards by translating bracketed words within sentences in batches across 14+ languages, following the i+1 context principle.

card-creationdictionary

2 votes 34% approval 👍 2 · 👎 0 ⭐ 0 Anki 2.1.1~ Updated 2025-11-28

Description

Tsunagi (繋ぎ, “connection”) connects Anki Desktop to dictionary tools, mining apps and scripts. Existing AnkiConnect tools work as they are, and the Tsunagi API gives new apps more to work with.

Features

  • Works with AnkiConnect tools; imports your AnkiConnect port, key and allowed websites
  • A key for each app, with a choice of what it may do; turn an app off without deleting it
  • Ask for just the notes, cards and fields you need, using Anki's search
  • Hear about changes to notes, cards and reviews instead of asking again and again
  • Undo changes made through the API with Edit → Undo
  • Try every request in the interactive API reference

After installing, restart Anki and open Tools → 🔗 Tsunagi. Coming from AnkiConnect? Tsunagi can take over its port, key and allowed websites, and your existing tools generally keep working as they are.

Experimental. Supports Anki 26.08 and 26.09. The Tsunagi API still changes quickly; the AnkiConnect side stays stable.

Documentation and source code

AnkiConnect compatibility

Tested AnkiConnect tools

Report a problem

What's new in v0.7.6

README

Tsunagi

Connect apps to Anki.

Install · Switch from AnkiConnect · Build an integration · API reference · Documentation

Tsunagi (繋ぎ, “connection”) is an Anki desktop add-on that can take over from AnkiConnect while giving new integrations a richer HTTP API.

Already use AnkiConnect?

Install Tsunagi and let it take over AnkiConnect's port, key and allowed websites. Yomitan, asbplayer and your other AnkiConnect tools generally keep working without changes.

Switch from AnkiConnect →

Building an Anki integration?

Ask for the data you need instead of chaining narrow actions. Live change events, undoable writes, per-app permissions, FSRS tools and a typed TypeScript client come with it.

Build your first integration → · Browse the API reference

[!NOTE] Experimental. Supports Anki 26.08 and 26.09 (the current desktop release and the one before it); some features depend on your settings.

Install

  1. In Anki desktop, open Tools → Add-ons → Get Add-ons.
  2. Paste the code 666370974 and click OK (AnkiWeb listing).
  3. Restart Anki.

Or download the .ankiaddon file from GitHub Releases and use Tools → Add-ons → Install from file, then restart Anki.

Quick start

Replace AnkiConnect

  1. Install Tsunagi and restart Anki.
  2. Review the AnkiConnect settings it offers to take over, and click Take over.
  3. Use your tools as before. Tools that were already open may need to reconnect.

Missed the offer? Open Tools → 🔗 Tsunagi → Server → Take over from AnkiConnect…

Tested tools: Yomitan, asbplayer, Obsidian_to_Anki and 24 more are checked against Tsunagi request by request on every change.

Connect a tool without AnkiConnect

  1. Check that the server is on in Tools → 🔗 Tsunagi → Server.
  2. Set the tool's AnkiConnect address to http://127.0.0.1:7777.
  3. Use the tool; Recent requests shows its requests.

Keep Anki open with a profile loaded. Programs on this computer need no key by default (app keys).

Build an integration

curl http://127.0.0.1:7777/v1/health

Browse the API reference, or open http://127.0.0.1:7777/ while Anki runs to send real requests.

Build your first integration →

What you gain with existing tools

  • Compatibility you can check. All 122 AnkiConnect actions, with the known differences listed in the compatibility notes.
  • A key and a role for each tool. Limit a tool to reading, adding notes, opening Anki's windows or more (roles).
  • A log of every request. See which tool asked for what, and why a request was refused.
  • Undo. Edit → Undo reverts most changes your tools make.

Recent requests in Tsunagi's settings: Yomitan and asbplayer's AnkiConnect requests, and two refused requests with the reason

What the Tsunagi API adds

Take a note-type picker. With AnkiConnect, fetch modelNames, then call modelFieldNames for each type you need. With Tsunagi, ask for both together:

curl --get 'http://127.0.0.1:7777/v1/note-types' \
  --data-urlencode 'select=id,name,fields[].name'

Each note type comes back with its ID, name and field names. Notes, cards, reviews and decks are queried the same way.

Fewer requests add up: in one measured Yomitan workflow, mining ten words, the Tsunagi API made 40 requests in 326 ms where AnkiConnect made 80 in 2,875 ms (benchmarks).

Undoable writes Edit → Undo reverts most API changes.
Safe retries A write retried with the same Idempotency-Key happens once.
Live changes An event stream of what changed in the collection.
A key per app Separate credentials and permissions for each integration.
FSRS Compute and evaluate parameters, and simulate study workload.
OpenAPI Browse every operation in the API reference.

Build your first integration → · Yomitan case study: a real AnkiConnect integration, request by request, on the Tsunagi API.

TypeScript client

Field names and values checked as you type, and queries that stay current as Anki changes. Install it with npm install tsunagi-client (npm).

const anki = new Tsunagi({ baseUrl: "http://127.0.0.1:7777" });

// Anki's states by name, checked as you type: is("suspended"), is("due")...
const suspended = await anki.cards.search("deck:Mining").is("suspended").count();

// Keep a list of the deck's notes current as Anki changes, whoever changes it.
await anki.notes.search("deck:Mining").select("id", "firstField").watch({
  added: notes => show(notes),
  updated: notes => show(notes),
  removed: ids => hide(ids),
});

Client guide →

Built to be checked

  • Compatibility: every AnkiConnect action listed and checked in CI (compatibility notes).
  • Benchmarks: real clients' requests on Anki desktop, slower cases included (benchmarks).
  • Security: only your computer by default, websites refused unless allowed, a role per app (security model).
  • Tests: both supported Anki versions on every push, plus checks in a real (offscreen) Anki.
  • Releases: notes for each one (GitHub Releases).

Help

Everything is in Tools → 🔗 Tsunagi; the settings reference describes each page. If a tool can't connect, check that Anki is open and the tool uses the same port and key: Recent requests shows whether its requests arrive and why any were refused.

For other problems, open an issue with your Anki version, operating system, the tool or request involved, and Tsunagi's log file from Anki's logs/addons/ folder. Remove API keys and private note content first.

Learn more

Using AnkiConnect tools Building an integration
Compatibility notes Build your first integration
Settings reference API reference (in Anki)
Security model Creating notes · Events
Benchmarks Yomitan case study · TypeScript client

All documentation · Working on Tsunagi

Licence

MIT (LICENSE). The AnkiConnect Shim reproduces AnkiConnect's API, by Alex Yatskov (GPL-3.0): its actions, parameters and error messages, so tools built for it keep working. The libraries Tsunagi bundles keep their own licences, shipped beside them in lib/shared/. Kiso, bundled in tsunagi/_kiso/, is by the same author and also MIT.