Skip to content

feat(cli): add local cache option#58

Open
EfeDurmaz16 wants to merge 1 commit into
vercel-labs:mainfrom
EfeDurmaz16:efe/local-cache-dir
Open

feat(cli): add local cache option#58
EfeDurmaz16 wants to merge 1 commit into
vercel-labs:mainfrom
EfeDurmaz16:efe/local-cache-dir

Conversation

@EfeDurmaz16

Copy link
Copy Markdown

Summary

Adds a global --local option that makes opensrc use a project-local .opensrc directory instead of the default global cache.

This addresses the workflow in #45 where agents should read sources scoped to the current working tree rather than searching under the user's home directory.

Behavior

  • opensrc --local fetch ... caches under ./.opensrc
  • opensrc --local path --cwd ./apps/web ... caches under ./apps/web/.opensrc
  • opensrc --local list/remove/clean operate on ./.opensrc
  • Existing default behavior and OPENSRC_HOME remain unchanged unless --local is explicitly passed

Validation

  • cargo fmt --manifest-path packages/opensrc/cli/Cargo.toml
  • cargo test --manifest-path packages/opensrc/cli/Cargo.toml
  • cargo clippy --manifest-path packages/opensrc/cli/Cargo.toml -- -D warnings
  • cargo run --manifest-path packages/opensrc/cli/Cargo.toml -- --help

Closes #45.

@vercel

vercel Bot commented May 14, 2026

Copy link
Copy Markdown

@EfeDurmaz16 is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

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.

cli option to clone inside .opensrc in cwd instead of home dir

1 participant