Skip to content

Add --project-id option to project set command#135

Merged
jahwag merged 2 commits into
jahwag:masterfrom
sgasser:feature/add-project-id-option
Dec 1, 2025
Merged

Add --project-id option to project set command#135
jahwag merged 2 commits into
jahwag:masterfrom
sgasser:feature/add-project-id-option

Conversation

@sgasser

@sgasser sgasser commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

This change adds a --project-id option to 'claudesync project set' that allows non-interactive project selection by UUID. This is useful for automation scripts that need to switch between projects programmatically.

Usage:
claudesync project set --project-id <uuid>

The implementation follows the same pattern as the existing 'organization set' command which already has --org-id for non-interactive selection.

@sgasser sgasser requested a review from jahwag as a code owner November 19, 2025 21:43

@jahwag jahwag left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well!

@jahwag

jahwag commented Nov 26, 2025

Copy link
Copy Markdown
Owner

@sgasser This has been approved.

However in order for this to be merged, please amend your commit to have a verified signature:
https://docs.github.com/en/enterprise-cloud@latest/authentication/managing-commit-signature-verification/about-commit-signature-verification

Thank you!

@jahwag jahwag self-requested a review November 27, 2025 20:37

@jahwag jahwag left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verified signatures required

Adds a --project-id option to 'claudesync project set' command to enable
non-interactive project selection by UUID. This addresses a gap in automation
support where 'organization set' has --org-id but 'project set' lacked an
equivalent option.

Usage:
  claudesync project set --project-id <uuid>

The implementation:
- Follows the same pattern as 'organization set --org-id' for consistency
- Extracts common project selection logic into _save_project_selection()
  helper function to avoid code duplication
- Falls back to interactive mode when option is not provided (backwards
  compatible)
- Provides helpful error message when project not found, suggesting --all
  flag for submodule projects
@sgasser sgasser force-pushed the feature/add-project-id-option branch from 92abd9e to 018df80 Compare December 1, 2025 13:53
@sgasser

sgasser commented Dec 1, 2025

Copy link
Copy Markdown
Contributor Author

Commit has been signed with GPG. Ready to merge.

@jahwag jahwag merged commit b81029c into jahwag:master Dec 1, 2025
3 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.

2 participants