Skip to content

piazzatron/anki-smart-notes

Repository files navigation

Smart Notes - Anki + AI generated fields ✨


💬 Use AI to automatically generate any field.

For example, use ChatGPT or Claude to automatically generate example sentences for vocab cards in nearly any language in bulk.

🗣️ Speak your notes with Text to Speech (TTS) from Google, OpenAI, and ElevenLabs.

Smart Notes supports 250+ voices in 50+ languages.

💳 Smart Notes is a paid add-on (with a free trial)

Set up your trial inside Anki.

If you are unable to afford Smart Notes due to financial hardship, please get in touch at support@smart-notes.xyz.


💡 Check out the Roadmap to see where we're headed.

And leave feedback to help steer development!


⚠️ Smart Notes only supports Anki Qt6.


Usage


🚧 These docs are under construction / outdated since v2.0 🚧

(New docs soon)

Write a prompt, associate it with a note type and field, and Smart Notes will automatically generate that field for you at review time – or generate groups of notes with a single click





1. Installation:

Tools > Addons > Get Addon, paste in plugin id 1531888719. Restart Anki.

2. Start your free trial:

Tools > Smart Notes.

3. Add Smart Fields


Smart fields are AI generated fields associated with a particular card type. They may reference other fields, and you can have as many smart fields as you like.


  1. Click Tools > Smart Notes.

  2. Pick the card type and target field you want to automatically generate.

  3. Then, write the prompt that will be automatically sent to Claude/ChatGPT to generate the target field.


💡 Tip: Uncheck "Always Generate Smart Field" if you don't want the smart field generated by default, and prefer to generate it manually by right clicking the field in the editor.


Writing a Prompt

A prompt may reference any other field on the card via {{double curly braces}}.

For example, if you're studying a language and want to generate a mmemonic to aid in memorization, you might make a prompt like this (assuming you have a field called "vocab"):

Create a simple, memorable mmemonic in Japanese for the word {{vocab}}. Reply with only the mmemonic.

It's often useful to tell language model to "only reply" with the phrase you care about.

You can't reference the target field, or other smart fields – but the addon will validate your prompt, so don't worry!


4. Automatically generate notes 😎

Generate smart notes during review, in edit or add flows, or batched in the card browser.



Generate during review

Smart fields are automatically generated in the background at review time.

This is approach is super useful if you import notes via AnkiConnect (Yomichan, etc) - simply set up your smart fields and no further effort required.

A sparkle emoji will briefly show (we love sparkle).

Note that you can turn automatic generation off in Smart Notes > Advanced.



Generate when adding or editing cards

Smart fields can also be generated prior to review. To generate all smart fields on a note, press ctrl+shift+g (on Mac: cmd+shift+g) or click the ✨ button in the editor:

Clicking ✨ a single time will generate only empty smart fields. Click it a second time to regenerate the entire note.



To (re)generate a single smart field, right click it in the editor and click "Generate Smart Field":



Generating Multiple Notes

In the notes browser, select a group of notes and then right click > generate smart fields to generate multiple notes.

Generate an entire deck or note type by right clicking it in the browser.


Additional Features

Select New Models

  • Tools > Smart Notes > Language Models: to select a different language model
  • Tools > Smart Notes > TTS: to select a different TTS model.

Create complex prompts

Smart fields can reference as many other fields on your card as you like, including other smart fields. Set up complex pipelines!


Support

Found a bug or want to request a feature? File an issue on Github or email support@smart-notes.xyz

Enjoying this addon? Please rate it to help others find it.👍


Contributing

PRs are welcome! See this PR for a great example.

Cost

Using OpenAI, Anthropic, and TTS models all cost money, so Smart Notes is a paid plugin.

Learn More about Smart Notes Plans.


Changelog

V2.0

  • Add Text to Speech from Google, ElevenLabs, and OpenAI
  • Add Anthropic models: Claude 3.5 Sonnet, Claude 3.0 Haiku
  • Add chained smart fields
  • Move to subscription model

v1.6.0

  • Add support for new gpt-4o-mini model, removing the old gpt-3.5-turbo. Users on gpt-3.5-turbo are automatically migrated to 4o-mini.
  • Stability & UX improvements.

v1.5.0

  • Prompts may now reference empty fields. Control this behavior in settings > advanced.

v1.4.0

  • Manual fields: uncheck "Always Generate Smart Field" when creating a field to leave it empty by default. Editor > Right Click to generate it.
  • Set a custom OpenAI endpoint via Settings > Advanced. Supports users who are unable to access the official OpenAI API.

v1.3.0

  • Improved regenerating smart field behavior:
    1. For partially filled notes, the editor ✨ button will now only generate empty fields. Click ✨ a second time to regenerate the card from scratch.
    1. Batch processing will now only generate empty fields by default. Configurable via Settings -> Advanced to regenerate the entire note.

v1.2.0

  • Support batch processing huge decks.
  • Right click on a deck or note type in the browser and generate all notes.
  • Fix bugs.

v1.1.0

  • Add ctrl+shift+g(cmd+shift+g) hotkey to generate fields in the editor.
  • Clarify that this add-on requires a paid OpenAI API key (no free tier 🥺).
  • Fix bugs.



Smart Notes owes a debt of gratitude for inspiration to Intellifiller.