Skip to content

hulz413/fox-anki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fox-anki

fox-anki is a command-line tool for managing Anki flashcards.

It supports common deck, note, card, tag, media, and import/export workflows for Anki collections.

Quickstart

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e .[dev]
python -m fox_anki --help

Create one basic card:

fox-anki notes add \
  --deck Default \
  --type Basic \
  --field Front="What is TCP three-way handshake?" \
  --field Back="SYN, SYN-ACK, ACK" \
  --collection /path/to/collection.anki2

Development

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e .[dev]

Verification

ruff check .
mypy src tests
pytest
bash scripts/smoke.sh /path/to/collection.anki2
python -m build

Examples

fox-anki collection info --collection /path/to/collection.anki2
fox-anki decks create Spanish --collection /path/to/collection.anki2
fox-anki notes add --deck Default --type Basic --field Front="hello" --field Back="world" --collection /path/to/collection.anki2
fox-anki cards move "deck:Default" --deck Spanish --collection /path/to/collection.anki2
fox-anki media check --collection /path/to/collection.anki2
fox-anki export apkg ./default.apkg --deck Default --collection /path/to/collection.anki2

See docs/cli.md for the full command reference.

Notes

  • import csv is atomic: if any row fails, earlier rows from the same file are rolled back.
  • export csv and export apkg refuse to overwrite an existing file unless --force is passed.
  • Avoid writing to the same collection while the Anki desktop app is actively using it.

About

fox-anki is a command-line tool for managing Anki flashcards

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors