Skip to content

feat: Add Anki integration for card creation#2766

Open
AlexW00 wants to merge 9 commits intobirchill:mainfrom
AlexW00:anki-integration
Open

feat: Add Anki integration for card creation#2766
AlexW00 wants to merge 9 commits intobirchill:mainfrom
AlexW00:anki-integration

Conversation

@AlexW00
Copy link

@AlexW00 AlexW00 commented Feb 8, 2026

Summary

This PR implements integration with Anki via AnkiConnect, allowing users to create cards directly from the popup (similar to how it's possible in Yomitan)

Showcase:

Cap.2026-02-08.at.15.05.30.mp4

Changes

  • Added AnkiConnect client implementation.
  • Added settings for Anki configuration (Deck name, Note type, etc.)
  • Added field mapping support to map dictionary fields to Anki note fields.
  • Disabled feature on iOS as AnkiConnect is not supported there.
  • Added tests
  • Updated docs

Motivation

On Safari (macOS), there is currently no popup dictionary browser extension available, that supports mining cards to Anki:

  • Yomitan does not support Safari (and probably won't any time soon due to their architecture)
  • 10ten doesn't have an Anki integration (until now!)

People have been requesting this feature since 2018 (#44) - now its finally here.

Testing

  • Verified AnkiConnect communication on local machine (Safari, macOS)
  • Tested field mapping with various card types.
  • Confirmed UI gracefully handles connection errors.
  • Ran pnpm test successfully (note: i noticed 2 unrelated tests failing - however, they also fail on the current main branch)

Notes regarding Options

This feature adds a new settings section. These options are necessary to support the wide variety of user Anki configurations (different Note Types and Deck names) which cannot be sensibly defaulted for everyone.

@birtles
Copy link
Member

birtles commented Feb 9, 2026

Thanks for doing this. It looks really good. I'm sorry it's taking me so long to ship this feature, but I'm literally working on it every day I can (which is most days except that this year my family and I have been sick nearly every day which has slowed things down a lot) and looking to hire someone full-time this year to help me push it over the line. You can see some of the work for it in the recent "source context" commits.

I think the approach I've got going is going to be more helpful—ultimately letting you work on any device including iOS, preview the card contents, preserve ruby annotations, customize the card style etc. I think you'll like it and I think the AnkiConnect parts from this patch could be re-based on top once it's done.

You've clearly put a lot of work and thought into this which I really appreciate but do you mind if I don't merge it just yet?

@AlexW00
Copy link
Author

AlexW00 commented Feb 9, 2026

Thanks for doing this. It looks really good. I'm sorry it's taking me so long to ship this feature, but I'm literally working on it every day I can (which is most days except that this year my family and I have been sick nearly every day which has slowed things down a lot) and looking to hire someone full-time this year to help me push it over the line. You can see some of the work for it in the recent "source context" commits.

I think the approach I've got going is going to be more helpful—ultimately letting you work on any device including iOS, preview the card contents, preserve ruby annotations, customize the card style etc. I think you'll like it and I think the AnkiConnect parts from this patch could be re-based on top once it's done.

You've clearly put a lot of work and thought into this which I really appreciate but do you mind if I don't merge it just yet?

hey, awesome to hear it's still being worked on - indeed it sounds like a better version; hope to see it soon; i will just continue using development versions for now on my mac so I can already use the features (I'll check out the source context commits later and if it's not functional yet continue with the version of this branch)

You've clearly put a lot of work and thought into this which I really appreciate but do you mind if I don't merge it just yet?

TBH it really wasn't that much work. I implemented this PR in ~1 hour - no need to feel bad ;)

@AlexW00
Copy link
Author

AlexW00 commented Feb 9, 2026

... looking to hire someone full-time this year to help me push it over the line. You can see some of the work for it in the recent "source context" commits.

thought: I'll be doing a working holiday in Japan starting April - if you're still looking for someone lmk ;)

@birtles
Copy link
Member

birtles commented Feb 9, 2026

thought: I'll be doing a working holiday in Japan starting April - if you're still looking for someone lmk ;)

Sounds very promising! Mind sending me an email at info@birchill.co.jp ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants