Ask AI to explain the word in sentence and save definition to Anki.
- Node.js >=20.12.0
- LLM API Key
- Open terminal, set environment variables
- OpenAI, Deepseek, etc.
export OPENAI_BASE_URL=https://api.deepseek.com/v1; export OPENAI_API_KEY=sk-***; export OPENAI_MODEL=deepseek-r1
- Ollama
export OPENAI_BASE_URL=http://localhost:11434/v1; export OPENAI_API_KEY=ollama; export OPENAI_MODEL=gemma3:27b
- OpenAI, Deepseek, etc.
- Run command
npx ai-dictionary
- Paste sentence and word into command line
- press
Enter
to ask AI - press
Ctrl+L
to clear console - press
Ctrl+C
to exit program
- press

- Anki Desktop
- AnkiConnect
- Open Anki, create deck
AI Dictionary
.

- Click
Tools
->Manage Note Types
from Anki menu, add note typeAI Dictionary
.

- Add card template.

