21 RFCs repeated the code's names, steps, lists, and version history, so one rename touched eleven of them; eight short ones now keep only what was decided and why, and change only when a decision does.
1.4 KiB
RFC-006: CLI
A frozen surface
The commands and their flags — names, shorthands, types, and defaults — are a contract: they do not change, and anything added is opt-in. The command line is the specification, and the architecture was derived backward from it.
Validate first
Nothing with a side effect runs until the request is valid. An unknown browser, category, or format, an unusable output directory, or an unreadable keys file fails before discovery and before any password prompt.
Keychain password
- Explicit input wins. A flag or standard input comes first, then a no-echo prompt when stdin is a terminal, then none. With no password, keychain-protected data is exported as metadata only.
- Opening is the check. The keychain is the password's only destination, and opening it decides whether the password works.
- No environment variable. Every child process would inherit it.
Reporting and stopping
A summary of every outcome goes to stderr. It is not part of the contract, and it never changes the exit status. Ctrl-C ends a run cleanly: copies are removed, the terminal is restored, and no half-written keys file is left behind. The process still ends the way the signal would end it.
Restore
restore works from its keys file, not from the local browser table: its browser filter selects the keys file's entries, which may name browsers this OS does not have.