Omahub
← All plugins
A

Anki Status

by Aronnax Lin

Anki review load in the bar with a study panel: due cards, forecasts, deck breakdown, sync and review shortcuts.

Security review

Review recommended · 1 finding

Deterministic scan — not a security guarantee

Low
Risk level
Low
Analyzed commit
c545bc6
Scanned
1 month ago
  • low obfuscation bin/anki-status:448

    Augments a command with octal/hex escape sequences.

    \x1fList 30 tree

Automated analysis only — not a security guarantee.

AI advisory review

No obvious issues detected

Language-model assessment · ~deepseek/deepseek-v4-flash-latest — advisory only

None
AI risk level
None
Recommendation
install
Model
~deepseek/deepseek-v4-flash-latest
Analyzed commit
c545bc6
Reviewed
1 month ago

The plugin is a read-only Anki status widget that queries the local Anki SQLite database with strict bounds and deadlines. The only flagged finding is a false positive: the escape sequence in bin/anki-status is a control character in a string, not obfuscation. No destructive, persistent, or network behavior is present.

How this check works

This review combines the deterministic scan (the rule-based results above) with an independent look at the plugin's code by a language model. The model reads a trimmed sample of the repository's files, the manifest, and the README, then gives a plain-language risk level and a recommendation: install (no notable danger), review (look closer first), or avoid (clearly dangerous).

It runs on the same analyzed commit as the deterministic scan and is strictly advisory — it is not a security guarantee and never blocks a plugin by itself. A human moderator still reviews plugins before they are listed.

AI advisory only — automated analysis, not a security guarantee.

Install
$ omarchy plugin add https://github.com/aronnaxlin/omarchy-anki-status-plugin --enable
Widgets #bar #quickshell

Anki Status

Anki review load in the Omarchy bar: an icon with a configurable daily metric and a popup panel with today's queues, the week-ahead forecast, per-deck breakdown, and sync/review shortcuts.

Panel

Install

omarchy plugin add https://github.com/aronnaxlin/omarchy-anki-status-plugin.git --enable --yes

Or by hand: copy this repo into ~/.config/omarchy/plugins/aronnax.anki-status/, then omarchy-shell shell rescanPlugins and omarchy plugin enable aronnax.anki-status.

Requirements

  • Anki installed locally with at least one profile and collection.
  • Python 3. No Python packages beyond the standard library are required.

Remove

omarchy plugin disable aronnax.anki-status
omarchy plugin remove aronnax.anki-status --yes

What it shows

  • Bar pill — The selected daily metric: cards due (default), cards studied, study time, or icon only. With no cards due, it shows only the icon so the interactive display selector remains available.
  • Hero — card count status; trailing buttons for sync, refresh, and opening Anki.
  • Today's queues — a scope picker for all decks or one top-level deck; new / learning / review, cards studied today with time, and 30-day mature retention update for that scope.
  • Forecast — review cards due across the next N days, today highlighted.
  • Decks — one row per top-level deck (subdecks roll up), new · learn · review.

Data source

bin/anki-status (Python, stdlib only) opens ~/.local/share/Anki2/<profile>/collection.anki2 with SQLite's immutable mode — no locks, so it never stalls behind Anki's own writes; the WAL tail (at most the review currently on screen) is skipped. It reads the day-rollover anchor from the collection's rollover / creationOffset config, today's queues from cards, today's studied count and 30-day mature retention from revlog, and the new-card daily caps from the protobuf-encoded deck_config rows (a tiny hand-rolled wire parser, no protobuf dependency).

The snapshot is bounded on every axis, because the shell buffers the whole document the collector prints. Queries run under a 10-second deadline, and the deck roster is read at most 5000 rows deep with names clipped in SQL, so what the collector itself holds never depends on what the collection does.

The per-deck breakdown is capped at 40 rows, heaviest first. Displayed names are clipped by length and by escaped byte cost — a CJK or emoji character costs several bytes once JSON-escaped — and clipped names that collide are numbered, so the scope selector stays unambiguous. The whole report is held under 64 KB: rows are shed, and past that the record is replaced by a minimal one, rather than letting the ceiling be advisory. The panel keeps its own 512 KB ceiling — deliberate slack, so an older collector still works — and refuses to parse anything past it.

Profile totals stay exact, being whole-collection aggregates. A run that overruns its deadline leaves the last good numbers on screen rather than blanking the pill on one slow read, and the deck list says DECKS · TOP n OF m whenever it was cut.

Interactions

  • Bar pill: left = panel, right = sync, middle = refresh.
  • Panel: r refresh, s sync, o open Anki, d cycles the statistics scope, a restores all decks; Tab moves to the neighboring bar panel, Esc closes.
  • IPC: omarchy-shell aronnax.anki-status <open|close|toggle|refresh|sync> — or via the shell target: omarchy-shell shell toggle aronnax.anki-status '{}'.

Settings

Settings are available from the Bar display selector in the Anki popup and are saved to the widget's entry in ~/.config/omarchy/shell.json.

Key Default What it does
refreshIntervalSec 300 How often the status snapshot regenerates
forecastDays 7 How many days the forecast chart covers
barMetric Due cards Bar content: Due cards, Cards studied, Study time, or Icon only

The selector updates immediately. Command-line configuration remains available:

omarchy bar set aronnax.anki-status barMetric 'Study time' --json

Credits

The Anki mark in anki.svg is from Simple Icons, licensed CC0-1.0. Anki is a trademark of its respective owner.

License

MIT