# Changelog

All notable changes are documented in [GitHub Releases](https://github.com/DaveDev42/claude-worktree/releases).

This file is automatically generated from GitHub Release notes. To update, run:
```bash
python scripts/changelog_sync.py
```

For older releases (v0.1.0 - v0.9.2), see the [Archived Changelog](#archived-changelog) below.

---


## [0.10.27] - 2025-11-09

## Release v0.10.27

## [0.10.26] - 2025-11-09

## Release v0.10.26

## [0.10.25] - 2025-11-09

## Release v0.10.25

## [0.10.24] - 2025-11-08

## Release v0.10.24

## [0.10.23] - 2025-11-08

## Release v0.10.23

## [0.10.22] - 2025-11-08

## Release v0.10.22

## [0.10.21] - 2025-11-08

## Release v0.10.21

## [0.10.20] - 2025-11-06

## Release v0.10.20

## [0.10.19] - 2025-11-04

## Release v0.10.19

## [0.10.18] - 2025-11-04

## Release v0.10.18

## [0.10.17] - 2025-11-03

## Release v0.10.17

## [0.10.16] - 2025-11-03

## Release v0.10.16

## [0.10.15] - 2025-11-03

## Release v0.10.15

## [0.10.14] - 2025-11-03

## Release v0.10.14

## [0.10.13] - 2025-11-03

## Release v0.10.13

## [0.10.12] - 2025-11-02

## Release v0.10.12

## [0.10.10] - 2025-11-02

## [0.10.9] - 2025-11-02

## Patch Release v0.10.9

This patch release syncs PyPI with the repository state and adds release workflow documentation.

### Changes
- **Documentation**: Added release workflow guide to CLAUDE.md for repositories with branch protection
  - Documents the PR-based release process
  - Explains why this workflow is necessary
  - Provides step-by-step instructions for future releases

### Why this release?
- Repository version was at 0.10.8, but PyPI was at 0.10.6
- This release publishes 0.10.9 to PyPI to fix the version discrepancy
- README.md badge will show the correct version after PyPI publish

### Full Changelog

## [0.10.8] - 2025-11-02

## What's Changed

### Bug Fixes
- **Fixed `cw upgrade` failure for pip-installed packages** (#42)
  - When claude-worktree was installed via `pip install` but `uv` was available on the system, the upgrade command incorrectly detected the installation as `uv-pip` and failed with "No virtual environment found" error
  - Improved installer detection to verify actual installation method via `pip show`
  - Added `--system` flag to uv pip upgrade commands for non-venv installations
  - Added comprehensive tests for installer detection logic

## Installation

```bash
# Using pip
pip install --upgrade claude-worktree

# Using uv tool
uv tool install --upgrade claude-worktree

# Using pipx
pipx upgrade claude-worktree
```

## Upgrade

If you already have claude-worktree installed, you can now upgrade using:

```bash
cw upgrade
```

This release fixes the upgrade issue, so future upgrades will work correctly!

## [0.10.7] - 2025-11-02

## 🎉 Highlights

**Windows AI Tool Launch Fix** - Resolves #39 where Windows users with WSL installed were unable to launch AI tools (Claude Code, Happy, etc.) after creating worktrees. The tool now correctly handles Windows shell environments and no longer attempts to run commands in WSL bash when it should use Windows.

## 🐛 Bug Fixes

- **fix: Windows AI tool launch fails when WSL is installed** (#40)
  - Added platform-specific shell handling to avoid WSL bash on Windows
  - New `_run_command_in_shell()` helper function for cross-platform compatibility
  - Windows now uses `shell=True` for natural shell selection
  - Unix/macOS continues using `bash -lc` for login shell behavior
  - Fixes the `/mnt/c/nvm4w/nodejs/claude: 15: exec: node: not found` error

## 🔧 CI/CD Improvements

- **refactor(ci): Use official GitHub Actions** (#40)
  - Replaced custom scripts with `astral-sh/setup-uv@v7` for uv installation
  - Replaced manual test parsing with `pavelzw/pytest-action@v2`
  - Simplified workflow from 189 lines to 59 lines (40% reduction)
  - Better test reporting with GitHub Job Summaries

- **ci: Add Windows testing** (#40)
  - Added `windows-latest` to CI matrix
  - Ensures Windows compatibility is tested on every PR
  - Prevented future Windows-specific regressions

- **test: Improved test isolation** (#40)
  - Fixed tests to not modify user's local config file
  - Added autouse fixture for isolated config directories
  - Disabled AI tool launching during tests

## 📦 What's Changed

This is a **patch release** with bug fixes and CI improvements. No breaking changes or new features.

## [0.10.6] - 2025-10-31

## 🎉 What's New in v0.10.6

### New `cw shell` Command

Execute commands or open interactive shells in worktrees without manual navigation! This feature streamlines quick operations across multiple worktrees.

## ✨ Features

### Interactive Shell
Open an interactive shell in any worktree:
```bash
cw shell fix-auth              # Open shell in fix-auth worktree
cw shell                       # Open shell in current worktree
```

### Command Execution
Execute commands directly in worktrees:
```bash
cw shell fix-auth git status   # Run git status in fix-auth
cw shell fix-auth npm test     # Run tests in fix-auth
cw shell git log --oneline     # Run in current worktree
cw shell ls -la                # List files in current worktree
```

### Smart Argument Parsing
The command automatically detects whether the first argument is a branch name or a command:
- If the argument matches an existing worktree, it's treated as the target worktree
- Otherwise, it's treated as the command to execute in the current directory

## 🔧 Technical Details

**Core Implementation**:
- `shell_worktree()` function in `core.py` handles shell and command execution
- Uses `subprocess.run()` for command execution with proper exit code handling
- Respects user's `$SHELL` environment variable for interactive shells
- Validates worktree existence before execution

**CLI Integration**:
- Smart argument parsing using Typer's context settings
- Auto-completion for worktree branch names
- Flexible interface supporting multiple usage patterns

## 💡 Use Cases

1. **Quick inspections**: `cw shell fix-auth git diff` - check changes without cd
2. **Running tests**: `cw shell feature-api npm test` - test in another worktree
3. **Interactive debugging**: `cw shell bug-fix` - open shell for exploratory work
4. **CI/CD scripts**: Execute commands in specific worktrees programmatically

## 🚀 Benefits

- **No manual navigation**: Skip the `cd` or `cw-cd` step
- **Faster workflow**: One-liner for common operations
- **Multi-worktree friendly**: Quickly switch contexts
- **Shell agnostic**: Works with bash, zsh, fish, or your custom shell

## 📦 Installation

```bash
# Using uv (recommended)
uv tool install --upgrade claude-worktree

# Using pipx
pipx upgrade claude-worktree

# Using pip
pip install --upgrade claude-worktree
```

## 🔗 Related

- Complements the existing `cw-cd` shell function for directory navigation
- Works seamlessly with `cw resume` for AI-assisted development
- Integrates with all existing worktree management commands

## [0.10.5] - 2025-10-31

## 🎉 What's New in v0.10.5

### Streamlined Cleanup Workflow

This release simplifies worktree cleanup by merging the functionality of `cw prune` into `cw clean`. Users no longer need to remember to run two separate commands!

## ✨ Changes

- **Auto-prune after cleanup**: `cw clean` now automatically runs `git worktree prune` after deleting worktrees
- **Removed `--stale` flag**: The `--stale` option has been removed from `cw clean` as it's now handled automatically by the prune step
- **Deprecated `cw prune`**: The standalone `cw prune` command is now deprecated (but still works with a warning for backward compatibility)

## 📖 Migration Guide

**Before (v0.10.4 and earlier):**
```bash
cw clean --stale  # Delete stale worktrees
cw prune          # Clean up metadata
```

**After (v0.10.5):**
```bash
cw clean --merged      # Automatically prunes after cleanup
cw clean --older-than 30
cw clean -i

# For manual prune only:
git worktree prune
```

## 🔧 Technical Details

- Automatic pruning runs after successful cleanup (unless `--dry-run` is used)
- Prune failures are shown as warnings and don't stop the cleanup process
- All related tests have been updated and pass

## 📦 Installation

```bash
# Using uv (recommended)
uv tool install --upgrade claude-worktree

# Using pipx
pipx upgrade claude-worktree

# Using pip
pip install --upgrade claude-worktree
```

## [0.10.4] - 2025-10-30

## What's Changed

### Bug Fixes
- **Critical**: Fixed incorrect flag in `claude-yolo` preset (#36)
  - Changed from `--yolo` (invalid) to `--dangerously-skip-permissions` (correct)
  - This fixes the default AI tool configuration to work properly

### Details
The `claude-yolo` preset introduced in v0.10.3 was using an incorrect flag that would cause the CLI to fail. This patch release corrects the flag to use Claude Code's actual permission-skipping flag.

## [0.10.3] - 2025-10-30

## 🎉 New Features

### Change Base Command
**Add `cw change-base` command** to change the base branch of an existing worktree after creation!

This solves the common problem: "Oops, I should have based this feature on `master` instead of `develop`!"

#### Usage
```bash
# Change base branch for current worktree
cw change-base master

# Change base for specific worktree
cw change-base develop -t fix-auth

# Interactive rebase
cw change-base main -i

# Preview changes
cw change-base master --dry-run
```

#### Features
- ✅ Change base for current or specific worktree (--target)
- ✅ Interactive rebase support (--interactive/-i)
- ✅ Dry-run mode to preview changes (--dry-run)
- ✅ Comprehensive error handling
- ✅ Automatic metadata update after rebase

### Sync AI Merge
**Add `--ai-merge` flag to `cw sync` command** for AI-assisted conflict resolution!

When rebase conflicts occur during sync, get interactive AI help to resolve them.

#### Usage
```bash
# Sync with AI assistance for conflicts
cw sync --ai-merge

# Sync specific worktree with AI help
cw sync fix-auth --ai-merge
```

#### Features
- ✅ AI assistance for rebase conflicts during sync
- ✅ Conflict detection and interactive prompt
- ✅ Context file with conflict summary
- ✅ Helpful hints when conflicts occur

## 🧪 Testing

**Both features thoroughly tested:**
- ✅ 6 comprehensive tests for change-base functionality
- ✅ 2 comprehensive tests for sync --ai-merge
- ✅ All tests pass on Ubuntu & macOS with Python 3.11 & 3.12
- ✅ CI passed for both features

## 📝 Implementation Details

**PR #32 (change-base):**
- New `change_base_branch()` function in `core.py`
- Command added to "Worktree Management" category
- Full test coverage with 6 test cases

**PR #34 (sync --ai-merge):**
- Updated `sync_worktree()` with `ai_merge` parameter
- Conflict detection via `git diff --name-only --diff-filter=U`
- Interactive AI tool launcher with context

## 📦 Installation

```bash
# Using uv
uv tool install claude-worktree

# Using pipx
pipx install claude-worktree

# Using pip
pip install claude-worktree
```

## 🔄 Upgrade

```bash
cw upgrade
```

## [0.10.2] - 2025-10-30

## [0.10.1] - 2025-10-30

## 🎨 Improvements

### Categorized Help Output
Reorganized the `cw --help` output into logical categories for better discoverability and usability!

**New Command Organization:**
- **Core Workflow** (4 commands) - `new`, `pr`, `merge`, `resume`
- **Worktree Management** (6 commands) - `list`, `status`, `prune`, `clean`, `delete`, `sync`
- **Inspection & Analysis** (4 commands) - `doctor`, `diff`, `tree`, `stats`
- **Maintenance** (1 command) - `upgrade`
- **Configuration** (6 command groups) - `cd`, `export`, `import`, `template`, `config`, `stash`
- **Backup & Recovery** (1 command group) - `backup`
- **Deprecated** (1 command) - `finish`

**Benefits:**
- ✨ Core workflow commands are now prominently displayed at the top
- 📚 Related commands are grouped together logically
- 🎯 Easier for new users to understand the tool's capabilities
- 🔍 Deprecated commands are clearly separated

**Before**: 23 commands in a single flat list
**After**: 23 commands organized into 7 logical categories

### Documentation Updates
- Added comprehensive **Release & Versioning Policy** to `CLAUDE.md`
  - Patch versions (x.x.N): Default for all releases
  - Minor versions (x.N.0): Require explicit approval
  - Major versions (N.0.0): Require explicit approval
  - Clear guidelines for semantic versioning

## 📦 Installation

```bash
# Using uv
uv tool install claude-worktree

# Using pipx
pipx install claude-worktree

# Using pip
pip install claude-worktree
```

## 🔄 Upgrade

```bash
cw upgrade
```

## [0.10.0] - 2025-10-29

## 🎉 What's New

### Backup & Restore Functionality
Create backups of your worktrees with full git history and uncommitted changes, then restore them later or on different machines!

#### New Commands
- `cw backup create [branch]` - Create backup of current or specific worktree
- `cw backup create --all` - Backup all worktrees
- `cw backup list [branch]` - List available backups
- `cw backup restore <branch>` - Restore from latest backup
- `cw backup restore <branch> --id <timestamp>` - Restore from specific backup

#### Implementation
- **Storage**: `~/.config/claude-worktree/backups/<branch>/<timestamp>/`
- **Backup contents**:
  - `bundle.git` - Full git repository using `git bundle create --all`
  - `metadata.json` - Worktree metadata (branch, base_branch, timestamps, paths)
  - `stash.patch` - Uncommitted changes (if any) using `git diff HEAD`

#### Use Cases
1. **Before risky operations** - Create safety backups before rebases or merges
2. **Archive completed work** - Preserve final state of completed features
3. **Transfer between machines** - Move worktrees between development environments
4. **Disaster recovery** - Restore worktrees after accidental deletion
5. **Experimentation** - Try destructive changes with easy rollback

### Testing
- ✅ 15 comprehensive tests added in `tests/test_backup_restore.py`
- ✅ All tests passing across Ubuntu & macOS with Python 3.11 & 3.12
- ✅ Fixed pytest monkeypatch test interference issues

### Documentation
- Added comprehensive **Backup & Restore** section to README.md
- 5 detailed use cases with code examples
- Full API documentation for all backup commands

## 📦 Installation

```bash
# Using uv
uv tool install claude-worktree

# Using pipx
pipx install claude-worktree

# Using pip
pip install claude-worktree
```

## 🔄 Upgrade

```bash
cw upgrade
```

## [0.9.8] - 2025-10-29

## 🎉 What's New

### Configuration Portability
Export and import your worktree configurations across machines for seamless workspace migration and team collaboration.

**New Commands:**
- `cw export [-o <file>]`: Export configuration and worktree metadata to JSON
- `cw import <file> [--apply]`: Import configuration with preview/apply modes

**Features:**
- 📤 **Export**: Create timestamped JSON exports with all worktree metadata
- 📥 **Import**: Preview changes before applying with safe restoration
- 🔄 **Cross-machine sync**: Share configurations across development environments
- 👥 **Team onboarding**: Standardize team worktree setups

### Use Cases

**Backup workspace:**
```bash
cw export -o backup-$(date +%Y%m%d).json
```

**Share across machines:**
```bash
# Machine 1
cw export -o ~/Dropbox/cw-config.json

# Machine 2
cw import ~/Dropbox/cw-config.json --apply
```

**Team onboarding:**
```bash
# Team lead
cw export -o team-setup.json

# New team member
cw import team-setup.json --apply
```

## 🐛 Bug Fixes
- Fixed test compatibility across different Git environments
- Ensured consistent 'main' branch naming in test fixtures for CI/CD

## 🧪 Testing
- Added 13 new comprehensive tests for export/import functionality
- All 195 tests passing on Ubuntu and macOS (Python 3.11/3.12)

## 📦 Installation

```bash
# Using uv (recommended)
uv tool install claude-worktree

# Using pip
pip install --upgrade claude-worktree

# Using pipx
pipx upgrade claude-worktree
```

## [0.9.7] - 2025-10-29

## [0.9.6] - 2025-10-29


---

## Version Comparison Links

[Unreleased]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.27...HEAD
[0.10.27]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.26...v0.10.27
[0.10.26]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.25...v0.10.26
[0.10.25]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.24...v0.10.25
[0.10.24]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.23...v0.10.24
[0.10.23]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.22...v0.10.23
[0.10.22]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.21...v0.10.22
[0.10.21]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.20...v0.10.21
[0.10.20]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.19...v0.10.20
[0.10.19]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.18...v0.10.19
[0.10.18]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.17...v0.10.18
[0.10.17]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.16...v0.10.17
[0.10.16]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.15...v0.10.16
[0.10.15]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.14...v0.10.15
[0.10.14]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.13...v0.10.14
[0.10.13]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.12...v0.10.13
[0.10.12]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.10...v0.10.12
[0.10.10]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.9...v0.10.10
[0.10.9]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.8...v0.10.9
[0.10.8]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.7...v0.10.8
[0.10.7]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.6...v0.10.7
[0.10.6]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.5...v0.10.6
[0.10.5]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.4...v0.10.5
[0.10.4]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.3...v0.10.4
[0.10.3]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.2...v0.10.3
[0.10.2]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.1...v0.10.2
[0.10.1]: https://github.com/DaveDev42/claude-worktree/compare/v0.10.0...v0.10.1
[0.10.0]: https://github.com/DaveDev42/claude-worktree/compare/v0.9.8...v0.10.0
[0.9.8]: https://github.com/DaveDev42/claude-worktree/compare/v0.9.7...v0.9.8
[0.9.7]: https://github.com/DaveDev42/claude-worktree/compare/v0.9.6...v0.9.7
[0.9.6]: https://github.com/DaveDev42/claude-worktree/releases/tag/v0.9.6

---

## Archived Changelog (v0.1.0 - v0.9.2)

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- **Slash command support for Happy, Claude Code, and Codex**: Use `/cw` commands directly in AI sessions
  - Automatic installation prompt on first run (detects installed AI tools)
  - Manual installation: `cw slash-command-setup`
  - Installs to `~/.claude/commands/cw.md` for all AI tools
  - Works with Happy, Claude Code, and Codex
  - Examples: `/cw new feature-name`, `/cw list`, `/cw resume fix-auth`

## [0.9.2] - 2025-10-27

### Fixed
- **PyPI CDN propagation delay handling**: Intelligent retry logic for `cw upgrade`
  - New `check_package_available()` function verifies version is downloadable before upgrade
  - Automatically waits 30 seconds and retries if version not yet available on CDN
  - Clear user messaging about CDN propagation delays
  - Prevents "Nothing to upgrade" failures immediately after release
  - Resolves race condition between PyPI JSON API and package download index

### Summary
This patch release fixes the frustrating upgrade experience that occurs immediately after a new release. When `cw upgrade` detects a new version but the package isn't yet available due to CDN caching, the tool now intelligently waits and retries instead of failing. Users no longer need to manually retry the upgrade command.

## [0.9.1] - 2025-10-27

### Added
- **`cw cd` command**: Print path to a worktree directory
  - `cw cd <branch>` shows the worktree path with installation hints for `cw-cd` shell function
  - `cw cd <branch> --print` outputs path only for scripting
  - Complements the `cw-cd` shell function for actual directory navigation
- **`cw finish --interactive/-i` flag**: Interactive mode with step-by-step confirmations
  - Pause before each major operation (rebase, merge, cleanup)
  - Options at each step: continue (y), skip (n), or quit (q)
  - Useful for reviewing changes before proceeding
- **`cw finish --dry-run` flag**: Preview merge operations without executing
  - Shows all operations that would be performed
  - No actual changes made to repository
  - Helpful for understanding workflow before committing
- **`cw sync` command**: Synchronize worktree(s) with base branch changes
  - `cw sync` - Sync current worktree
  - `cw sync <branch>` - Sync specific worktree
  - `cw sync --all` - Sync all worktrees
  - `cw sync --fetch-only` - Fetch without rebasing
  - Automatically rebases feature branches onto latest base branch
- **`cw clean` command**: Batch cleanup of worktrees based on criteria
  - `cw clean --merged` - Delete branches already merged to base
  - `cw clean --stale` - Delete stale worktrees (missing directories)
  - `cw clean --older-than N` - Delete worktrees older than N days
  - `cw clean -i/--interactive` - Interactive selection UI
  - `cw clean --dry-run` - Preview without deleting
  - Supports multiple criteria combinations

### Summary
This release focuses on workflow enhancement and productivity features. The new `cw sync` command keeps long-running feature branches up-to-date, while `cw clean` helps maintain a tidy workspace by removing old or merged worktrees in batch. Interactive and dry-run modes for `cw finish` provide safer, more controlled merge workflows.

## [0.9.0] - 2025-10-26

### Fixed
- **`happy-yolo` preset**: Now uses correct `--yolo` flag instead of `--permission-mode bypassPermissions`
  - The `--yolo` flag is Happy's sugar syntax for `--dangerously-skip-permissions`
  - Updated tests to match correct behavior

### Added
- **Configurable auto-update checks**: Users can now disable automatic daily update checks
  - New config option: `update.auto_check` (default: `true`)
  - Set with: `cw config set update.auto_check false`
  - Manual `cw upgrade` command always works regardless of setting
  - Useful for corporate environments, air-gapped systems, or CI/CD pipelines

### Documentation
- **Comprehensive TODO.md rewrite**: Complete audit and reorganization of project tasks
  - Added "Bug Fixes & Corrections" section with actionable items
  - Added "Documentation Sync Issues" section tracking doc/code mismatches
  - Separate "Documentation Tasks" and "Testing Tasks" sections
  - New "Known Issues" section for transparent issue tracking
- **Fixed shell function installation docs**: Corrected CHANGELOG.md installation command
  - Changed from non-existent `cw config install-shell-function` to actual `source <(cw _shell-function bash)`
  - Added zsh to supported shells list
- **Removed deprecated features from README.md**:
  - Removed `--no-ai` flag documentation (removed in v0.7.0)
  - Removed `cw attach` command documentation (removed in v0.8.0)
  - Added `--iterm-tab` flag that was missing from docs
  - Updated all examples to use current syntax
- **Updated preset documentation**: Corrected preset lists across all files
  - Removed non-existent presets: `happy-sonnet`, `happy-opus`, `happy-haiku`
  - Documented actual presets: `no-op`, `claude`, `codex`, `happy`, `happy-codex`, `happy-yolo`
  - Added descriptions and use cases for each preset
- **Updated CLAUDE.md**: Moved completed features from "In Progress" to "Completed"
  - AI session context restoration (v0.4.0)
  - Shell function for worktree navigation (v0.6.0)

### Summary
This release focuses on fixing documentation drift between code and documentation, correcting the `happy-yolo` preset bug, and adding user control over automatic update checks. All high-priority documentation sync issues identified in the TODO.md audit have been addressed.

## [0.8.2] - 2025-10-24

### Fixed
- **GitHub Actions publish workflow**: Fixed workflow to trigger on tag pushes
  - Changed trigger from `release: types: [published]` to `push: tags: v*`
  - Workflow now automatically publishes to PyPI when version tags are pushed
  - GitHub Releases are now created automatically with changelog notes
  - Resolves issue where releases weren't published to PyPI since v0.6.1

## [0.8.1] - 2025-10-24

### Improved
- **Enhanced shell completion**: Added autocompletion for better user experience
  - `cw config use-preset <TAB>`: Now autocompletes preset names (claude, codex, happy, happy-codex, happy-yolo, no-op)
  - `cw _path <TAB>`: Now autocompletes worktree branch names (internal command used by shell functions)
  - Updated preset documentation to reflect current available presets

## [0.8.0] - 2025-10-24

### Removed
- **Deprecated `cw attach` command**: Removed after deprecation period
  - The command was deprecated in v0.4.0 and has now been fully removed
  - Use `cw resume` instead for better context management and session restoration
  - Breaking change: `cw attach` will no longer work

## [0.7.0] - 2025-10-24

### Changed
- **Refactored AI tool launch control**: Removed `--no-ai`/`--no-claude` flags in favor of preset-based approach
  - Old approach: `cw new my-feature --no-ai`
  - New approach: `cw config use-preset no-op && cw new my-feature`
  - More consistent with overall configuration design
  - Added `no-op` preset (empty array) for disabling AI tool launching

### Breaking Changes
- **Removed `--no-ai` and `--no-claude` command-line flags** from all commands (`cw new`, `cw resume`, `cw attach`)
  - Migration: Use `cw config use-preset no-op` to disable AI tool launching
  - Affects users who relied on these flags in scripts or workflows
- **Simplified Happy presets to 3 variants**: Removed model-specific presets
  - Removed: `happy-sonnet`, `happy-opus`, `happy-haiku` (added in 0.6.2)
  - Kept: `happy`, `happy-codex`, `happy-yolo`
  - Migration: Use `happy` preset and configure model via Happy's own flags

### Added
- **New `no-op` preset**: Explicitly disable AI tool launching via configuration
  - `cw config use-preset no-op`
  - Cleaner than using empty string or dummy commands
- **Happy-yolo preset**: `happy` with `--permission-mode bypassPermissions` for faster iteration
- **Updated Happy-codex preset**: Now includes `--permission-mode bypassPermissions` flag

### Documentation
- Added comprehensive pre-commit hook workflow to CLAUDE.md
  - Proper sequence: commit → check hook modifications → amend if needed → push
  - Prevents force push conflicts from code formatting hooks

## [0.6.2] - 2025-10-24

### Fixed
- **Happy-CLI preset commands**: Corrected Happy-CLI integration
  - Removed incorrect `--backend` option (not supported by Happy)
  - Renamed `happy-claude` → `happy` (Claude Code is the default mode)
  - Fixed `happy-codex` to use correct subcommand syntax: `happy codex`

### Added
- **New Happy presets with model selection**:
  - `happy-sonnet`: Happy with Sonnet model (`happy -m sonnet`)
  - `happy-opus`: Happy with Opus model (`happy -m opus`)
  - `happy-haiku`: Happy with Haiku model (`happy -m haiku`)

### Documentation
- Added comprehensive Happy-CLI integration guide to README
  - Installation instructions
  - Quick start guide
  - Model selection examples
  - Codex mode usage
  - Advanced configuration options
- Added custom AI tool configuration examples
- Updated CLAUDE.md with corrected preset information
- Improved preset usage documentation

### Changed
- **Breaking**: Removed `happy-claude` preset (use `happy` instead)
  - Note: This preset was non-functional in previous versions, so impact is minimal

## [0.6.1] - 2025-10-24

### Fixed
- **`uv tool upgrade` command fix**: Removed unsupported `--refresh` flag from `uv tool upgrade` command
  - `uv tool upgrade` doesn't support `--refresh` option
  - The command now works correctly: `uv tool upgrade claude-worktree`
  - `uv pip install --upgrade` still uses `--refresh` which is supported

## [0.6.0] - 2025-10-24

### Added
- **Shell function for worktree navigation**: New `cw-cd` shell function for quick directory navigation to worktrees
  - Enables `cw-cd <branch>` to jump directly to a worktree directory
  - Supports bash, zsh, and fish shells
  - Install with: `source <(cw _shell-function bash)` for bash/zsh, or `cw _shell-function fish | source` for fish

## [0.5.0] - 2025-10-24

### Added
- **iTerm2 tab support**: New `--iterm-tab` flag for `cw new`, `cw resume`, and `cw attach` commands
  - Opens AI tool in a new iTerm2 tab instead of a new window
  - Available on macOS with iTerm2 installed
  - Comprehensive test coverage for iTerm tab functionality

## [0.4.0] - 2025-10-24

### Added
- **Multi-AI tool support**: Full configuration system for different AI coding assistants
  - Support for Claude Code (default), Codex, Happy (with Claude or Codex backend), and custom commands
  - New `cw config` commands: `show`, `set`, `use-preset`, `list-presets`, `reset`
  - Environment variable override: `CW_AI_TOOL`
  - AI tool presets for quick configuration
- **Session context restoration**: New `cw resume` command for resuming AI work with conversation history
  - Automatically restores previous AI session state
  - Optional branch argument to switch worktrees before resuming
  - Session storage in `~/.config/claude-worktree/sessions/<branch>/`
  - Support for background, iTerm, and tmux launch modes
- **Remote worktree completion**: New `target` argument for `cw finish` command
  - Complete work on a different worktree from current directory
  - Useful for managing multiple worktrees

### Changed
- **Renamed AI-tool-specific terminology**: All Claude-specific functions and flags renamed for tool agnostic use
  - `--no-claude` deprecated in favor of `--no-ai`
  - Help text updated to use generic AI tool terminology
- **Deprecated `cw attach` command**: Use `cw resume` instead for better context management
  - `cw attach` now shows deprecation warning and redirects to `cw resume`
  - Will be removed in v2.0

### Documentation
- Added comprehensive documentation for `cw resume` with session restoration
- Updated CLAUDE.md with mandatory local testing requirements before commits
- Added TODO.md for tracking planned features

### Development
- Added test report summary to GitHub Actions
- Improved test suite with fixes for help text and color code handling
- Better editable install documentation for modern Python (PEP 668)

## [0.3.2] - 2025-10-22

### Fixed
- **Cache-busting for upgrade consistency**: Added cache bypass flags to prevent version inconsistency
  - Added `--refresh` flag to `uv tool/pip upgrade` commands
  - Added `--no-cache-dir` flag to `pip upgrade` command
  - Added cache-busting headers to PyPI API calls
  - Ensures users get the exact version detected during update check
  - Prevents issues from CDN propagation delays and local caching

## [0.3.1] - 2025-10-22

### Fixed
- **Improved upgrade command**: Better detection of upgrade status and output display
- **License badge**: Fixed README badge to show BSD-3-Clause instead of MIT

### Removed
- Removed obsolete RELEASING.md file

## [0.3.0] - 2025-10-22

### Changed
- **Expanded worktree status types**: Now shows more informative status indicators in `cw list`:
  - `active` (bold green) - Currently in this worktree directory
  - `clean` (green) - No uncommitted changes
  - `modified` (yellow) - Has uncommitted changes
  - `stale` (red) - Directory deleted but admin data remains (affected by `cw prune`)
- **Improved status display**: Status column now uses color coding for better visibility

## [0.2.2] - 2025-10-22

### Fixed
- **Fixed `uv tool install` support**: Now correctly detects and upgrades packages installed via `uv tool`
- **Improved upgrade command output**: Shows current and latest versions before attempting upgrade
- **Better error handling**: Clear messages for unknown installation methods and source installs

### Added
- Support for `uv tool upgrade` command for uv-tool installations
- Friendly guidance for editable/source installations
- Detailed version information in `cw upgrade` command

## [0.2.1] - 2025-10-22

### Changed
- Test release for auto-update functionality verification

## [0.2.0] - 2025-10-22

### Added
- **Self auto-update functionality**: Automatically checks for updates on first run each day
- **`cw upgrade` command**: Manually upgrade to the latest version
- Smart installer detection (pipx, pip, or uv)
- Update check caching to avoid unnecessary network requests
- Graceful handling of network failures during update checks

### Dependencies
- Added `httpx>=0.27.0` for HTTP requests to PyPI
- Added `packaging>=24.0` for version comparison

## [0.1.4] - 2025-10-22

### Changed
- **License changed from MIT to BSD-3-Clause**

## [0.1.3] - 2025-10-22

### Changed
- **Single source of truth for version**: Now `pyproject.toml` is the only place where version is defined
- `__init__.py` now dynamically reads version from package metadata using `importlib.metadata`
- This eliminates version management overhead and prevents version mismatches

## [0.1.2] - 2025-10-22

### Fixed
- Fixed version string in `__init__.py` to match package version (was stuck at 0.1.0)

## [0.1.1] - 2025-10-22

### Fixed
- Fixed GitHub Actions workflow to properly handle asset uploads with `--clobber` flag
- This prevents workflow failures when re-running releases with existing assets

### Changed
- Renamed workflow from "Publish to PyPI" to "Publish" for simplicity

## [0.1.0] - 2025-01-22

### Added
- Initial release of claude-worktree CLI tool
- `cw new` command to create worktrees with automatic Claude Code integration
- `cw finish` command to rebase, merge, and cleanup worktrees
- `cw attach` command to reattach Claude Code to current worktree
- `cw list` command to display all worktrees with status
- `cw status` command to show current worktree information
- `cw delete` command to remove worktrees with optional branch/remote cleanup
- `cw prune` command to clean up stale worktree metadata
- Automatic shell completion for bash/zsh/fish
- Rich terminal output with colored status indicators
- Type-safe implementation with full mypy strict mode compliance
- Comprehensive test suite with 47 tests achieving 79% coverage
- Pre-commit hooks for code quality (ruff, mypy, basic git checks)
- GitHub Actions CI/CD pipeline testing on Ubuntu and macOS
- Support for Python 3.11 and 3.12

### Features
- Clean worktree naming: `../<repo>-<branch>` (no timestamps)
- Metadata storage via git config for tracking base branches
- Claude Code integration with multiple launch modes:
  - Background mode
  - iTerm window (macOS)
  - tmux session
- Automatic rebase and fast-forward merge workflow
- Origin remote detection and smart rebase target selection
- Protection against deleting main repository
- Support for custom worktree paths
- Optional remote branch deletion

### Documentation
- Comprehensive README with usage examples and troubleshooting
- CLAUDE.md for AI assistant context
- Inline documentation with detailed docstrings
- Type hints throughout codebase

[Unreleased]: https://github.com/DaveDev42/claude-worktree/compare/v0.9.2...HEAD
[0.9.2]: https://github.com/DaveDev42/claude-worktree/compare/v0.9.1...v0.9.2
[0.9.1]: https://github.com/DaveDev42/claude-worktree/compare/v0.9.0...v0.9.1
[0.9.0]: https://github.com/DaveDev42/claude-worktree/compare/v0.8.2...v0.9.0
[0.8.2]: https://github.com/DaveDev42/claude-worktree/compare/v0.8.1...v0.8.2
[0.8.1]: https://github.com/DaveDev42/claude-worktree/compare/v0.8.0...v0.8.1
[0.8.0]: https://github.com/DaveDev42/claude-worktree/compare/v0.7.0...v0.8.0
[0.7.0]: https://github.com/DaveDev42/claude-worktree/compare/v0.6.2...v0.7.0
[0.6.2]: https://github.com/DaveDev42/claude-worktree/compare/v0.6.1...v0.6.2
[0.6.1]: https://github.com/DaveDev42/claude-worktree/compare/v0.6.0...v0.6.1
[0.6.0]: https://github.com/DaveDev42/claude-worktree/compare/v0.5.0...v0.6.0
[0.5.0]: https://github.com/DaveDev42/claude-worktree/compare/v0.4.0...v0.5.0
[0.4.0]: https://github.com/DaveDev42/claude-worktree/compare/v0.3.2...v0.4.0
[0.3.2]: https://github.com/DaveDev42/claude-worktree/compare/v0.3.1...v0.3.2
[0.3.1]: https://github.com/DaveDev42/claude-worktree/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/DaveDev42/claude-worktree/compare/v0.2.2...v0.3.0
[0.2.2]: https://github.com/DaveDev42/claude-worktree/compare/v0.2.1...v0.2.2
[0.2.1]: https://github.com/DaveDev42/claude-worktree/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/DaveDev42/claude-worktree/compare/v0.1.4...v0.2.0
[0.1.4]: https://github.com/DaveDev42/claude-worktree/compare/v0.1.3...v0.1.4
[0.1.3]: https://github.com/DaveDev42/claude-worktree/compare/v0.1.2...v0.1.3
[0.1.2]: https://github.com/DaveDev42/claude-worktree/compare/v0.1.1...v0.1.2
[0.1.1]: https://github.com/DaveDev42/claude-worktree/compare/v0.1.0...v0.1.1
[0.1.0]: https://github.com/DaveDev42/claude-worktree/releases/tag/v0.1.0
