Skip to content

refactor(cli): flatten keys export/import into dumpkeys/restore#608

Merged
moonD4rk merged 4 commits into
mainfrom
refactor/cli-flat-verbs
Jun 6, 2026
Merged

refactor(cli): flatten keys export/import into dumpkeys/restore#608
moonD4rk merged 4 commits into
mainfrom
refactor/cli-flat-verbs

Conversation

@moonD4rk

@moonD4rk moonD4rk commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Flatten the keys export / keys import noun-group into flat verbs dumpkeys and restore, and drop the keys parent command, so the CLI is uniformly flat verbs: dump / dumpkeys / restore / list / version.

Pure rename — restore keeps the same flags and behavior as the old keys import. No functional change.

Part of the flat-verb CLI redesign for the cross-host decrypt workflow (#587), shipping in three PRs:

  1. this PR — command surface (flat verbs).
  2. cross-platform restore — decrypt browsers absent from the analyst OS (keys import fails for browsers not available on the analyst OS #606).
  3. zip transport — archive + restore --data-zip (Add a command to archive a browser's data files into a zip for cross-host keys import #607).

Refs #587.

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.
Copilot AI review requested due to automatic review settings June 3, 2026 15:50
@codecov-commenter

codecov-commenter commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.63%. Comparing base (8bd7c4e) to head (b0d2b26).
⚠️ Report is 1 commits behind head on main.

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           
Flag Coverage Δ
unittests 73.63% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 keys parent command and rename keys import to the top-level restore command.
  • Introduce a new top-level dumpkeys command (formerly keys 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.

moonD4rk added 2 commits June 4, 2026 00:10
The accepted design doc for the flat-verb CLI redesign and cross-platform restore.
@moonD4rk moonD4rk merged commit 8936c42 into main Jun 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants