Skip to content

Add clean cache command#129

Merged
thejchap merged 1 commit into
thejchap:mainfrom
sarvesh1327:feat/clean-cache-command
May 22, 2026
Merged

Add clean cache command#129
thejchap merged 1 commit into
thejchap:mainfrom
sarvesh1327:feat/clean-cache-command

Conversation

@sarvesh1327
Copy link
Copy Markdown
Contributor

Context

Closes #77.

Changes

  • Add a tryke clean subcommand for removing the persistent discovery cache.
  • Use the same project-root resolution as discovery for the default <project-root>/.tryke/cache path.
  • Honor global --cache-dir / [tool.tryke] cache_dir; for custom cache dirs, remove only Tryke-owned cache files (discovery-v1.bin and discovery-v1.tmp) to avoid deleting unrelated user data.
  • Add regression coverage for default cleanup, subdirectory project-root resolution, custom cache-dir safety, and CLI parsing.
  • Regenerate the CLI reference.

Test plan

  • cargo test -p tryke_discovery clean_ -- --nocapture
  • cargo test -p tryke clean_ -- --nocapture
  • cargo clippy -p tryke -p tryke_discovery --all-targets --all-features -- -D warnings
  • Manual default/custom cache smoke checks with cargo run -p tryke -- clean
  • cargo fmt --all --check
  • cargo run -p tryke_dev --bin generate-cli-docs -- --check
  • uv run cargo nextest run --workspace --all-features (687 passed; nextest reported 2 existing leaky tests)
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • uvx prek run -a

@sarvesh1327 sarvesh1327 requested a review from thejchap as a code owner May 21, 2026 05:45
@thejchap thejchap merged commit 6327627 into thejchap:main May 22, 2026
18 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.

Add clean subcommand

2 participants