feat(cli): add --local-templates option for local development testing #1386
+111
−20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
--local-templatesCLI option to enable loading templates from a local directory instead of GitHub releases. This improves the development workflow described in the "Testing template and command changes locally" section of CONTRIBUTING.md https://github.com/github/spec-kit/blob/main/CONTRIBUTING.md#testing-template-and-command-changes-locallyMotivation
Currently, testing local template changes requires manually copying packages (step 2 in CONTRIBUTING.md). This feature allows developers to test directly with:
Changes
load_template_from_local()function insrc/specify_cli/__init__.py--local-templatesparameter to theinitcommandREADME.mdwith CLI option documentation and usage exampleCONTRIBUTING.mdlocal testing section with--local-templatesworkflowTesting
I have personally tested these changes:
specify init . --ai claude --local-templates ".genreleases"AI Disclosure
This PR was developed with assistance from Antigravity IDE powered by Claude Opus 4.5 (Anthropic's AI coding assistant).