Skip to content

feat: Add --cwd option to specify working directory#62

Open
thoraxe wants to merge 1 commit intovultuk:mainfrom
thoraxe:feature/cwd-option
Open

feat: Add --cwd option to specify working directory#62
thoraxe wants to merge 1 commit intovultuk:mainfrom
thoraxe:feature/cwd-option

Conversation

@thoraxe
Copy link

@thoraxe thoraxe commented Jan 20, 2026

Summary

  • Add --cwd <path> command-line option to specify the working directory for Claude sessions
  • Validates that the path exists and is a directory before starting
  • Updates startup log to show the configured working directory

Use Case

Useful when running cc-web from a different location than where you want Claude to work, or when you want to explicitly set the working directory regardless of where the command is run from.

Usage

cc-web --cwd /path/to/project

Test plan

  • Run cc-web --cwd /some/valid/path and verify it starts with that directory
  • Run cc-web --cwd /nonexistent/path and verify it exits with error
  • Run cc-web --cwd /path/to/file (not a directory) and verify it exits with error
  • Run cc-web without --cwd and verify it uses current directory (existing behavior)

🤖 Generated with Claude Code

Add command-line option to set the working directory for Claude sessions
instead of always using the current directory. This is useful when running
cc-web from a different location than where you want Claude to work.

Usage: cc-web --cwd /path/to/project

The path is validated to ensure it exists and is a directory.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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