chr-git
v0.1.0
Published
Git branch strategy CLI tool for Chronnote
Readme
chr-git
Git branch strategy CLI tool for Chronnote.
Installation
# From the monorepo root
pnpm install
# Or install globally
npm install -g @chronnote/chr-gitUsage
# Create a new feature branch
chr-git branch --type feat --issue CHR-123 --description add-user-login
# Validate current branch name
chr-git validate-branch
# Bump version
chr-git version bump patch
# Create release branch
chr-git release 0.4.0
# Create hotfix branch
chr-git hotfix fix-critical-bugCommands
branch- Create a new branch following naming conventionsvalidate-branch- Validate branch name against naming conventionsversion- Manage version numbersrelease- Create a release branchhotfix- Create a hotfix branch
Configuration
Create a .chr-git.json file in your project root:
{
"linearTeam": "CHR",
"defaultBranch": "dev",
"protectedBranches": ["main", "dev"],
"branchRetentionDays": 30
}Branch Naming Conventions
| Type | Format | Example |
|------|--------|---------|
| Feature | feat/{description}-CHR-{id} | feat/add-user-login-CHR-123 |
| Fix | fix/{description}-CHR-{id} | fix/image-upload-error-CHR-456 |
| Refactor | refactor/{description} | refactor/optimize-queries |
| Docs | docs/{description} | docs/update-readme |
| Chore | chore/{description} | chore/update-deps |
| Experimental | exp/{description}[-CHR-{id}] | exp/try-new-framework |
| Release | release/v{version} | release/v0.4.0 |
| Hotfix | hotfix/v{version}-{description} | hotfix/v0.3.9-fix-crash |
Development
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Type check
npm run typecheck