Skip to main content
Save (or update) a named preset from rule flags
Save a set of rules under a name and reuse it with cards create --preset <name> or cards preset --set <name>. Save a name you already use and your change applies to the cards you create from now on; cards you already have keep the rules they were created with. The built-in names daily, weekday_meals, cli_only, and ai_labs cannot be saved over. Pass at least one rule flag. --timezone applies only with --only-days or --only-hours and must be a real IANA zone; a misspelled zone is refused.
The flags mean the same as on cards create. Save the currencies a card may pay in:
A charge in any other currency is refused, and you are told why. Write codes or plain names in any case, comma-separated. If you would rather be told than refused, add --mode watch to the preset. The saved rule reads Currency: USD, EUR in the summary. Captured from a local sandbox:
If you write a name that means several currencies, the save is refused and the message lists what it could mean, so you can pick. A code that is not a currency is refused the same way. agent-cards cards preset save euro-zone --currencies pesos exits 1 with:
With --json the same refusal is one JSON line on stdout: