DeckConfig
Every scheduler option ankipack can set, with its type, default and the range it enforces, mapped to the section of Anki's manual that explains what the option actually does.
DeckConfig
A deck options preset. Each deck references exactly one.
import { DeckConfig, Deck } from "ankipack";const my_config = new DeckConfig({ name: "Cramming", desiredRetention: 0.85, newPerDay: 100,});const my_deck = new Deck({ name: "Exam", config: my_config });Every table below links to Anki's
deck options documentation, which
explains what the options do. The options themselves are the
DeckConfigOptions interface.
A DeckConfig copies its options at construction, so mutating the object
afterwards does not change the preset.
Presets are imported only if the recipient ticks the deck presets option in
the import dialog, and fsrsParams additionally requires importing
learning progress. Nothing in a package can enable FSRS itself, which is a
collection-wide setting. See
what Anki does on import.
Options
All 39 are top-level keys on DeckConfigOptions. The groups below exist to make
them readable and mean nothing structurally.
Most tables have a Range column. A value outside it throws at construction, because Anki would replace it with its own default rather than clamping it. Whole-number options refuse a fraction, list options refuse anything not finite, and an empty cell means nothing is enforced.
Identity
| Option | Type | Default | Range |
|---|---|---|---|
id |
number |
from the clock | Safe integer |
name |
string |
"Preset <id>" |
No NUL or lone surrogate |
Pin id if you ship updates, or each import leaves
another preset behind in the recipient's list. Presets are deduplicated by id
and never by name.
name is more permissive than a note type or deck name: empty, leading
whitespace and : are all accepted, because Anki matches presets on id rather
than on name. Two presets in one package whose names fold alike are still
refused, with name-conflict, since the recipient would be left unable to tell
them apart.
Learning
Manual: Learning Steps, Graduating Interval, Easy Interval, Relearning Steps.
| Option | Type | Default | Range |
|---|---|---|---|
learnSteps |
number[] |
[1, 10] |
Minutes, no negatives |
relearnSteps |
number[] |
[10] |
Minutes, no negatives |
graduatingIntervalGood |
number |
1 |
1 to 36500, whole |
graduatingIntervalEasy |
number |
4 |
1 to 36500, whole |
Daily limits
Manual: New Cards/Day, Maximum Reviews/Day.
| Option | Type | Default | Range |
|---|---|---|---|
newPerDay |
number |
20 |
0 to 9999, whole |
reviewsPerDay |
number |
200 |
0 to 9999, whole |
Intervals
Manual: Maximum Interval, Minimum Interval.
| Option | Type | Default | Range |
|---|---|---|---|
maximumReviewInterval |
number |
36500 |
1 to 36500, whole |
minimumLapseInterval |
number |
1 |
1 to 36500, whole |
FSRS
Used only when FSRS is on, which is a collection-wide setting the recipient controls. Manual: Desired Retention, FSRS Parameters, Historical Retention, Ignore Cards Reviewed Before.
| Option | Type | Default | Range |
|---|---|---|---|
desiredRetention |
number |
0.9 |
0.7 to 0.99 |
fsrsParams |
number[] |
[] |
Empty, or at least 21 finite values |
historicalRetention |
number |
0.9 |
0.7 to 0.97 |
ignoreRevlogsBeforeDate |
string |
"" |
YYYY-MM-DD, not validated |
A shorter fsrsParams than 21 entries is refused because Anki reads index 20
as the FSRS-6 decay, so a shorter vector is silently downgraded to FSRS-5. The
values themselves are not checked, by ankipack or by the importer.
Display order
Manual: Insertion Order, New Card Gather Order, New Card Sort Order, Review Sort Order, New/Review Order, Interday Learning/Review Order.
| Option | Type | Default |
|---|---|---|
newCardInsertOrder |
NewCardInsertOrder |
"due" |
newCardGatherPriority |
NewCardGatherPriority |
"deck" |
newCardSortOrder |
NewCardSortOrder |
"template" |
reviewOrder |
ReviewCardOrder |
"day" |
newMix |
ReviewMix |
"mixWithReviews" |
interdayLearningMix |
ReviewMix |
"mixWithReviews" |
Each is an exported union of string literals:
| Type | Values |
|---|---|
NewCardInsertOrder |
"due", "random" |
NewCardGatherPriority |
"deck", "deckThenRandom", "lowestPosition", "highestPosition", "randomNotes", "randomCards" |
NewCardSortOrder |
"template", "noSort", "templateThenRandom", "randomNoteThenTemplate", "randomCard" |
ReviewCardOrder |
"day", "dayThenDeck", "deckThenDay", "intervalsAscending", "intervalsDescending", "easeAscending", "easeDescending", "retrievabilityAscending", "retrievabilityDescending", "relativeOverdueness", "random", "added", "reverseAdded" |
ReviewMix |
"mixWithReviews", "afterReviews", "beforeReviews" |
Burying and leeches
| Option | Type | Default | Range |
|---|---|---|---|
buryNew |
boolean |
false |
|
buryReviews |
boolean |
false |
|
buryInterdayLearning |
boolean |
false |
|
leechAction |
LeechAction |
"tagOnly" |
"suspend" or "tagOnly" |
leechThreshold |
number |
8 |
1 to 9999, whole |
Timers and audio
Manual: Audio, Internal Timer, On-screen Timer, Auto Advance.
| Option | Type | Default | Range |
|---|---|---|---|
disableAutoplay |
boolean |
false |
|
waitForAudio |
boolean |
true |
|
skipQuestionWhenReplayingAnswer |
boolean |
false |
|
capAnswerTimeToSecs |
number |
60 |
1 to 9999, whole |
showTimer |
boolean |
false |
|
stopTimerOnAnswer |
boolean |
false |
|
secondsToShowQuestion |
number |
0 |
Unbounded. 0 disables |
secondsToShowAnswer |
number |
0 |
Unbounded. 0 disables |
waitForAudio is the one option with no entry in the manual. It sits in Anki's
Auto Advance panel.
SM-2 fallback
Used only when FSRS is off. Manual: Starting Ease, Easy Bonus, Hard Interval, New Interval, Interval Modifier.
| Option | Type | Default | Range |
|---|---|---|---|
initialEase |
number |
2.5 |
1.31 to 5.0 |
easyMultiplier |
number |
1.3 |
1.0 to 5.0 |
hardMultiplier |
number |
1.2 |
0.5 to 1.3 |
lapseMultiplier |
number |
0.0 |
0.0 to 1.0 |
intervalMultiplier |
number |
1.0 |
0.5 to 2.0 |
Easy days
Manual: Easy Days.
| Option | Type | Default | Range |
|---|---|---|---|
easyDaysPercentages |
number[] |
[] |
Exactly 0 or 7 finite values |
Anki's load balancer parses every preset in the collection and errors on any other length, which stops the recipient studying any deck at all, not just yours.
Did this work on your setup?
Not rated yet