refactor(cli): flatten keys export/import into dumpkeys/restore#608
Conversation
The keys noun-group clashed with the flat dump/list verbs; unify on flat verbs and drop the keys parent. Pure rename, no behavior change.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #608 +/- ##
=======================================
Coverage 73.63% 73.63%
=======================================
Files 67 67
Lines 2989 2989
=======================================
Hits 2201 2201
Misses 591 591
Partials 197 197
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR continues the CLI redesign by flattening the former keys export / keys import noun-group into top-level verb commands (dumpkeys and restore), removing the keys parent command to keep the CLI consistently verb-oriented.
Changes:
- Remove the
keysparent command and renamekeys importto the top-levelrestorecommand. - Introduce a new top-level
dumpkeyscommand (formerlykeys export). - Register the new commands in the root command setup.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| cmd/hack-browser-data/restore.go | Removes the keys command group and defines restore as the new top-level replacement for keys import. |
| cmd/hack-browser-data/main.go | Updates root command registration to add dumpkeys and restore and drop keys. |
| cmd/hack-browser-data/dumpkeys.go | Adds the new dumpkeys top-level command (extracted from the prior keys export implementation). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The accepted design doc for the flat-verb CLI redesign and cross-platform restore.
Flatten the
keys export/keys importnoun-group into flat verbsdumpkeysandrestore, and drop thekeysparent command, so the CLI is uniformly flat verbs:dump/dumpkeys/restore/list/version.Pure rename —
restorekeeps the same flags and behavior as the oldkeys import. No functional change.Part of the flat-verb CLI redesign for the cross-host decrypt workflow (#587), shipping in three PRs:
archive+restore --data-zip(Add a command to archive a browser's data files into a zip for cross-hostkeys import#607).Refs #587.