Skip to content

Introduce cache sub command#19

Merged
abergs merged 3 commits intomainfrom
anders/cache-subcommand
Mar 2, 2026
Merged

Introduce cache sub command#19
abergs merged 3 commits intomainfrom
anders/cache-subcommand

Conversation

@abergs
Copy link
Member

@abergs abergs commented Mar 2, 2026

🎟️ Tracking

📔 Objective

This PR introduces the cache subcommand and removes the list-cache, clear-cache to make the CLI easier to use.
We also introduce to filter on --client-type. This is likely only used on machines where the remote/user side are both present (during development).

We also introduce a way to list identity fingerprints (and delete them) programmatically.


  bw-remote cache [--client-type remote|user] <COMMAND>

  Commands:
    clear [sessions|all]   Clear cached sessions and/or identity keys [default: all]
    list                   List cached sessions and identity info

When no --client-type is specified, both sides (remote + user) are shown/cleared. cache list displays the identity fingerprint and cached sessions for each side, cache clear sessions keeps identity keys but wipes sessions, and cache
clear all wipes everything.

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

abergs added 2 commits March 2, 2026 12:33
Group cache management commands under `bw-remote cache` for better CLI UX:
- `bw-remote clear-cache` → `bw-remote cache clear`
- `bw-remote list-cache` → `bw-remote cache list`
- Show both remote (connect) and user (listen) caches in `cache list`,
  with identity fingerprints and labeled section headers
- Add `--client-type` flag to scope list/clear to remote or user side
- Add `cache clear sessions` to clear sessions only (keeping identity key)
- Add `FileIdentityStorage::load_fingerprint()` and `delete()` methods
@abergs abergs force-pushed the anders/cache-subcommand branch from 067bc08 to d39294b Compare March 2, 2026 11:34
@abergs abergs merged commit 89504e6 into main Mar 2, 2026
10 of 12 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.

1 participant