Repository navigation
Description
Problem or use case
Orca already exposes Repository Settings / Worktree Shared Paths. The setting is stored per repository as symlinkPaths and materializes selected local files or directories into newly created worktrees.
This is useful for per-developer assets that must stay out of Git but must exist in every worktree, for example a local build.sh or orca.yaml. It is especially important for orca.yaml: the file must be present before Orca loads worktree configuration and setup hooks, so a setup hook cannot reliably bootstrap it.
The public CLI can inspect repository metadata with orca repo show --repo <selector> --json, but orca repo --help currently exposes no supported command to add, remove, or replace Worktree Shared Paths. In a headless orca serve session or an agent-driven environment without a desktop renderer, the UI setter is unavailable.
The current workarounds are to open the desktop settings, modify Orca-managed state directly, or call an internal repository-update RPC. None is a stable automation interface. The result is an existing Orca capability that headless users and agents can read but cannot configure.
Proposed solution
Expose Worktree Shared Paths through a supported, idempotent CLI surface. For example:
orca repo linked-paths list --repo <selector> --json
orca repo linked-paths add --repo <selector> build.sh orca.yaml --json
orca repo linked-paths remove --repo <selector> build.sh --json
orca repo linked-paths replace --repo <selector> build.sh orca.yaml --json
A generic orca repo update --linked-path ... command would also work if that better fits the CLI architecture.
Suggested behavior:
- Use the existing repository selector syntax (
id:,name:, orpath:). - Make
addandremoveidempotent and preserve unrelated entries. - Keep replacement explicit; do not make a routine update silently drop existing paths.
- Validate repository-relative paths and reject path traversal outside the repository.
- Support
--jsonand normal CLI exit codes for agent automation. - Make the updated values immediately visible through
orca repo show --json. - Apply the same semantics as the existing desktop setting when future worktrees are created.
Alternatives or additional context
Related: #7549 proposes a version-controlled .worktreeinclude file. That would solve team-portable configuration and is valuable, but it does not replace a CLI setter for the existing per-user/per-machine setting. Some assets are intentionally local and should never be committed, while headless runtimes still need a supported way to configure them.
This request does not require changing how linked paths are materialized; it only asks for a public mutation surface for the capability Orca already has.
Activity