Describe the problem
After running specify init , changing the configured AI model provider requires re-running init or manual edits. Re-running init can overwrite existing project files (scaffolding, constitution.md, .specify, prompts, or custom templates), risking loss of progress made so far.
Proposed solution
Add a provider-switch command or enhance init to support switching providers safely by:
- Introducing a command like
specify provider switch <provider-name> (or specify switch-provider) that updates provider-specific configuration only.
- Detecting existing files and merging provider-specific changes instead of replacing files. Use a safe merge strategy:
- Update only provider-specific config entries in .specify or equivalent config file.
- Preserve custom files (constitution.md, prompts/, templates/) unless a --force flag is provided.
- When provider-specific template files are missing, create provider variants rather than overwriting the generic ones.
- Add an interactive prompt/confirmation showing which files would be changed and an explicit
--force option to allow overwriting when desired.
- Provide a dry-run mode (
--dry-run) that shows diffs/changes.
Additional context / notes
- Consider supporting provider-specific prompt/template directories to allow coexistence (e.g., .openai/, .anthropic/).
- Ensure migration path for projects that used older init flows—document steps to move provider-specific files into the new layout.
Describe the problem
After running
specify init, changing the configured AI model provider requires re-running init or manual edits. Re-running init can overwrite existing project files (scaffolding, constitution.md, .specify, prompts, or custom templates), risking loss of progress made so far.Proposed solution
Add a provider-switch command or enhance
initto support switching providers safely by:specify provider switch <provider-name>(orspecify switch-provider) that updates provider-specific configuration only.--forceoption to allow overwriting when desired.--dry-run) that shows diffs/changes.Additional context / notes