copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Allow users to set the current working directory via command line flag

Open andyfeller opened this issue 2 months ago • 0 comments

Describe the feature or problem you'd like to solve

When copilot is invoked, the current working directory is where it starts until the user uses the /cwd slash command. This requires users and automation to change directory before invoking copilot.

Proposed solution

One common convention with CLIs is allowing users to provide a flag to change the cwd context. For example, git -C allows users to run commands outside of a local repository or unzip -d allows users to expand archives into a specific directory. Otherwise, users will need to do this 2 step process or some clever shell tricks like (cd /path/to/new/cwd && copilot).

Example prompts or workflows

No response

Additional context

No response

andyfeller avatar Nov 03 '25 18:11 andyfeller