Skip to content

clear-note

Remove the note attached to a card in a deck, collection, or wanted list.

This is the dedicated counterpart to add-note. Card resolution (name fuzzy match, --card-id, ambiguity errors, interactive prompts) is identical. There is no --note flag — the command always clears.

Terminal window
./ritual clear-note [listName] [cardName...] [options]

[listName] is resolved across all three list types (see List Resolution); pass a --deck, --collection, or --wanted flag to pin the type or disambiguate. If invoked with no list name, the command runs interactively, prompting you to pick a list (filtered by the type flag if given) and the card. Any argument or option you supply skips the corresponding prompt.

ArgumentDescriptionRequired
[listName]Name of the deck, collection, or wanted list (case-insensitive, no extension)No
[cardName...]Card name whose note should be cleared (fuzzy match)No
OptionDescriptionDefault
--deckResolve the name as a deck
--collectionResolve the name as a collection
--wantedResolve the name as a wanted list
--card-id <id>Disambiguate by card ID (the &N suffix in list files). Required when name search hits multiple printings.
--output <format>Output format: text, json, or ndjsontext
--quietSuppress non-essential outputfalse

Clear a note on a deck card (name resolved across all list types):

Terminal window
./ritual clear-note "My Deck" "Sol Ring"

Disambiguate by card ID (and pin the list type):

Terminal window
./ritual clear-note --deck "My Deck" --card-id 17

Pipe a JSON record for scripting:

Terminal window
./ritual clear-note --collection main "Sol Ring" --output json

Clearing a card that has no note is a successful no-op. The file is not rewritten, and no changelog entry is appended. JSON output reports { "cleared": false, "previousNote": null } for this case so scripts can distinguish a real clear from an idempotent run.

When a note is removed, the response includes the removed text:

{
"type": "deck",
"list": "my-deck",
"cardName": "Sol Ring",
"cardId": 17,
"cleared": true,
"previousNote": "starts the engine"
}

[listName] is matched case-insensitively across all list types (exact name first, then a unique substring), with ambiguous names rejected unless pinned by --deck, --collection, or --wanted. See List Resolution.

Identical to add-note.

A successful clear is recorded in the list’s .changes.md changelog as Cleared note on "<Card>" &N.

CodeMeaning
0Success (note cleared, or no-op when no note existed)
2Usage error (conflicting type flags, ambiguous list name, ambiguous card match, malformed --card-id)
3Not found (missing list file, missing card, missing card ID)
1Runtime error (file changed concurrently, etc.)