Claude Code + Obsidian starter kit for AI-powered knowledge management. Features: - PARA method folder structure - Bootstrap initialization system - Pre-configured Claude Code commands and agents - Gemini Vision MCP server with video support - Helper scripts for vault management - Automated release management See README.md for setup instructions.
3.6 KiB
3.6 KiB
name, description, allowed-tools, argument-hint
| name | description | allowed-tools | argument-hint | ||||||
|---|---|---|---|---|---|---|---|---|---|
| release | Automatically bump version, update changelog, commit, tag, and push a new release based on recent changes |
|
(optional) 'major', 'minor', 'patch', or leave blank for auto-detection |
Release Command
Automates the entire release process: analyzes recent commits to determine version bump type, updates version in package.json, moves unreleased changelog entries to the new version, commits everything, creates a git tag, and pushes to GitHub.
Task
- Analyze recent commits since last tag to determine version bump type
- Update version in package.json
- Move "Unreleased" entries in CHANGELOG.md to the new version section
- Commit the changes
- Create an annotated git tag
- Push commits and tags to GitHub
Process
-
Check Prerequisites
- Ensure on main/master branch
- Check for uncommitted changes
- Verify CHANGELOG.md and package.json exist
- Get current version from package.json
-
Determine Version Bump
- If argument provided (major/minor/patch), use that
- Otherwise, analyze commits since last tag:
- Look for "BREAKING CHANGE" or "!" = major bump
- Look for "feat:" = minor bump
- Look for "fix:", "docs:", "chore:" = patch bump
- Calculate new version number
-
Update Files
- Update version in package.json
- Move "Unreleased" section in CHANGELOG.md to new version section
- Add comparison links for the new version
- Create new empty "Unreleased" section
-
Git Operations
- Stage changes:
git add package.json CHANGELOG.md - Commit:
git commit -m "chore: release v{version}" - Create annotated tag:
git tag -a v{version} -m "Release v{version}" - Push commits:
git push - Push tags:
git push --tags
- Stage changes:
-
Provide Next Steps
- Show link to create GitHub release
- Remind to add release notes from changelog
Version Bump Rules
Semantic Versioning (MAJOR.MINOR.PATCH)
MAJOR (1.0.0 → 2.0.0):
- Breaking changes
- Commits with "BREAKING CHANGE" in body
- Commits with "!" after type (e.g., "feat!:")
MINOR (1.0.0 → 1.1.0):
- New features (backward compatible)
- Commits starting with "feat:"
PATCH (1.0.0 → 1.0.1):
- Bug fixes and minor changes
- Commits with "fix:", "docs:", "style:", "refactor:", "test:", "chore:"
Example Usage
# Auto-detect version bump from commits
claude run release
# Force specific version bump
claude run release patch
claude run release minor
claude run release major
# Example output:
# 📦 Current version: 0.1.0
# 🔍 Analyzing commits since last release...
#
# Found commits:
# - feat: add video support to Gemini Vision
# - docs: update README with setup instructions
# - fix: correct attachment link handling
#
# ✨ Detected version bump: MINOR (new features added)
# 📝 New version: 0.2.0
#
# ✅ Updated package.json
# ✅ Updated CHANGELOG.md
# ✅ Committed changes
# ✅ Created tag v0.2.0
# ✅ Pushed to GitHub
#
# 🎉 Release v0.2.0 complete!
#
# Next steps:
# 1. Go to https://github.com/user/repo/releases/new?tag=v0.2.0
# 2. Add release notes from CHANGELOG.md
# 3. Publish the release
Error Handling
- If not on main branch: "Please switch to main branch first"
- If uncommitted changes: "Please commit or stash changes first"
- If no changes since last release: "No changes to release"
- If version already exists: "Version X.X.X already exists"
Safety Features
- Dry run mode: Show what would happen without making changes
- Confirmation prompt before pushing
- Validation of version format
- Check for existing tags before creating