feat(cli): add --local-templates option for local development testing
Summary
Adds a --local-templates CLI 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-locally
Motivation
Currently, testing local template changes requires manually copying packages (step 2 in CONTRIBUTING.md). This feature allows developers to test directly with:
specify init . --local-templates ".genreleases"
Changes
- Added
load_template_from_local()function insrc/specify_cli/__init__.py - Added
--local-templatesparameter to theinitcommand - Local template files are preserved after extraction (not deleted)
- Updated
README.mdwith CLI option documentation and usage example - Updated
CONTRIBUTING.mdlocal testing section with--local-templatesworkflow
Testing
I have personally tested these changes:
- ✅ Verified with
specify init . --ai claude --local-templates ".genreleases" - ✅ Confirmed template extraction works correctly
- ✅ Confirmed local zip files are preserved after use
- ✅ Tested error handling with invalid directory paths
AI Disclosure
This PR was developed with assistance from Antigravity IDE powered by Claude Opus 4.5 (Anthropic's AI coding assistant).
This pull request has been automatically marked as stale because it has not had any activity for 150 days. It will be closed in 30 days if no further activity occurs.