Skip to content

Releases: liamawhite/worktree

v0.2.0

24 Oct 18:46
22236a7

Choose a tag to compare

Changelog

Installation

Download Binary

Choose the appropriate binary for your platform from the assets below:

Linux (x86_64)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.2.0/worktree_Linux_x86_64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

Linux (ARM64)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.2.0/worktree_Linux_arm64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

macOS (Intel)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.2.0/worktree_Darwin_x86_64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

macOS (Apple Silicon)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.2.0/worktree_Darwin_arm64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

Verify Installation

worktree --version

Optional: Shell Integration for Directory Switching

To enable automatic directory changes when using worktree add and worktree switch commands, add this function to your shell profile:

(~/.bashrc, ~/.bash_profile, ~/.zshrc):

worktree() {
    local cmd="$1"
    
    # Commands that should change directory
    if [[ "$cmd" == "add" || "$cmd" == "switch" || "$cmd" == "sw" || "$cmd" == "setup" ]]; then
        # Capture stderr to look for WT_CHDIR while preserving stdout and interactive TUI
        local temp_file
        temp_file=$(mktemp)
        
        # Run command with stderr redirected to temp file
        command worktree "$@" 2> >(tee "$temp_file" >&2)
        local exit_code=$?
        
        # Look for directory change indicator in stderr
        local target_dir
        target_dir=$(grep "^WT_CHDIR:" "$temp_file" 2>/dev/null | sed 's/^WT_CHDIR://')
        
        # Clean up temp file
        rm -f "$temp_file"
        
        # Change directory if target was specified
        if [[ -n "$target_dir" && -d "$target_dir" ]]; then
            cd "$target_dir" || echo "Warning: Failed to change to directory: $target_dir"
        fi
        
        return $exit_code
    else
        # For all other commands, just run normally
        command worktree "$@"
    fi
}

After adding this function and restarting your shell (or running source ~/.bashrc/source ~/.zshrc), the worktree add, worktree switch, and worktree setup commands will automatically change your current directory to the worktree location.

Verification with Checksums

Download checksums.txt and verify your binary:

sha256sum -c checksums.txt

Released by GoReleaser.

v0.1.3

24 Oct 14:35
e4c6f20

Choose a tag to compare

Changelog

Installation

Download Binary

Choose the appropriate binary for your platform from the assets below:

Linux (x86_64)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.1.3/worktree_Linux_x86_64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

Linux (ARM64)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.1.3/worktree_Linux_arm64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

macOS (Intel)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.1.3/worktree_Darwin_x86_64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

macOS (Apple Silicon)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.1.3/worktree_Darwin_arm64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

Verify Installation

worktree --version

Optional: Shell Integration for Directory Switching

To enable automatic directory changes when using worktree add and worktree switch commands, add this function to your shell profile:

(~/.bashrc, ~/.bash_profile, ~/.zshrc):

worktree() {
    local cmd="$1"
    
    # Commands that should change directory
    if [[ "$cmd" == "add" || "$cmd" == "switch" || "$cmd" == "sw" || "$cmd" == "setup" ]]; then
        # Capture stderr to look for WT_CHDIR while preserving stdout and interactive TUI
        local temp_file
        temp_file=$(mktemp)
        
        # Run command with stderr redirected to temp file
        command worktree "$@" 2> >(tee "$temp_file" >&2)
        local exit_code=$?
        
        # Look for directory change indicator in stderr
        local target_dir
        target_dir=$(grep "^WT_CHDIR:" "$temp_file" 2>/dev/null | sed 's/^WT_CHDIR://')
        
        # Clean up temp file
        rm -f "$temp_file"
        
        # Change directory if target was specified
        if [[ -n "$target_dir" && -d "$target_dir" ]]; then
            cd "$target_dir" || echo "Warning: Failed to change to directory: $target_dir"
        fi
        
        return $exit_code
    else
        # For all other commands, just run normally
        command worktree "$@"
    fi
}

After adding this function and restarting your shell (or running source ~/.bashrc/source ~/.zshrc), the worktree add, worktree switch, and worktree setup commands will automatically change your current directory to the worktree location.

Verification with Checksums

Download checksums.txt and verify your binary:

sha256sum -c checksums.txt

Released by GoReleaser.

v0.1.2

12 Aug 20:47
69b32aa

Choose a tag to compare

Changelog

  • d21aa65 Add Claude Code GitHub Workflow (#9)
  • 660750f feat: add version command and -v flag (#10)
  • 69b32aa feat: auto-change directory after setup command (#11)

Installation

Download Binary

Choose the appropriate binary for your platform from the assets below:

Linux (x86_64)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.1.2/worktree_Linux_x86_64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

Linux (ARM64)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.1.2/worktree_Linux_arm64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

macOS (Intel)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.1.2/worktree_Darwin_x86_64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

macOS (Apple Silicon)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.1.2/worktree_Darwin_arm64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

Verify Installation

worktree --version

Optional: Shell Integration for Directory Switching

To enable automatic directory changes when using worktree add and worktree switch commands, add this function to your shell profile:

(~/.bashrc, ~/.bash_profile, ~/.zshrc):

worktree() {
    local cmd="$1"
    
    # Commands that should change directory
    if [[ "$cmd" == "add" || "$cmd" == "switch" || "$cmd" == "sw" ]]; then
        # Capture stderr to look for WT_CHDIR while preserving stdout and interactive TUI
        local temp_file
        temp_file=$(mktemp)
        
        # Run command with stderr redirected to temp file
        command worktree "$@" 2> >(tee "$temp_file" >&2)
        local exit_code=$?
        
        # Look for directory change indicator in stderr
        local target_dir
        target_dir=$(grep "^WT_CHDIR:" "$temp_file" 2>/dev/null | sed 's/^WT_CHDIR://')
        
        # Clean up temp file
        rm -f "$temp_file"
        
        # Change directory if target was specified
        if [[ -n "$target_dir" && -d "$target_dir" ]]; then
            cd "$target_dir" || echo "Warning: Failed to change to directory: $target_dir"
        fi
        
        return $exit_code
    else
        # For all other commands, just run normally
        command worktree "$@"
    fi
}

After adding this function and restarting your shell (or running source ~/.bashrc/source ~/.zshrc), the worktree add and worktree switch commands will automatically change your current directory to the worktree location.

Verification with Checksums

Download checksums.txt and verify your binary:

sha256sum -c checksums.txt

Released by GoReleaser.

v0.1.1

12 Aug 19:40
dab0f9e

Choose a tag to compare

Changelog

  • dab0f9e feat: improve SSH authentication for 1Password CLI integration (#8)

Installation

Download Binary

Choose the appropriate binary for your platform from the assets below:

Linux (x86_64)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.1.1/worktree_Linux_x86_64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

Linux (ARM64)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.1.1/worktree_Linux_arm64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

macOS (Intel)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.1.1/worktree_Darwin_x86_64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

macOS (Apple Silicon)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.1.1/worktree_Darwin_arm64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

Verify Installation

worktree --version

Optional: Shell Integration for Directory Switching

To enable automatic directory changes when using worktree add and worktree switch commands, add this function to your shell profile:

(~/.bashrc, ~/.bash_profile, ~/.zshrc):

worktree() {
    local cmd="$1"
    
    # Commands that should change directory
    if [[ "$cmd" == "add" || "$cmd" == "switch" || "$cmd" == "sw" ]]; then
        # Capture stderr to look for WT_CHDIR while preserving stdout and interactive TUI
        local temp_file
        temp_file=$(mktemp)
        
        # Run command with stderr redirected to temp file
        command worktree "$@" 2> >(tee "$temp_file" >&2)
        local exit_code=$?
        
        # Look for directory change indicator in stderr
        local target_dir
        target_dir=$(grep "^WT_CHDIR:" "$temp_file" 2>/dev/null | sed 's/^WT_CHDIR://')
        
        # Clean up temp file
        rm -f "$temp_file"
        
        # Change directory if target was specified
        if [[ -n "$target_dir" && -d "$target_dir" ]]; then
            cd "$target_dir" || echo "Warning: Failed to change to directory: $target_dir"
        fi
        
        return $exit_code
    else
        # For all other commands, just run normally
        command worktree "$@"
    fi
}

After adding this function and restarting your shell (or running source ~/.bashrc/source ~/.zshrc), the worktree add and worktree switch commands will automatically change your current directory to the worktree location.

Verification with Checksums

Download checksums.txt and verify your binary:

sha256sum -c checksums.txt

Released by GoReleaser.

v0.1.0

12 Aug 18:57
a429231

Choose a tag to compare

Changelog

Installation

Download Binary

Choose the appropriate binary for your platform from the assets below:

Linux (x86_64)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.1.0/worktree_Linux_x86_64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

Linux (ARM64)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.1.0/worktree_Linux_arm64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

macOS (Intel)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.1.0/worktree_Darwin_x86_64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

macOS (Apple Silicon)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.1.0/worktree_Darwin_arm64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

Verify Installation

worktree --version

Optional: Shell Integration for Directory Switching

To enable automatic directory changes when using worktree add and worktree switch commands, add this function to your shell profile:

(~/.bashrc, ~/.bash_profile, ~/.zshrc):

worktree() {
    local cmd="$1"
    
    # Commands that should change directory
    if [[ "$cmd" == "add" || "$cmd" == "switch" || "$cmd" == "sw" ]]; then
        # Capture stderr to look for WT_CHDIR while preserving stdout and interactive TUI
        local temp_file
        temp_file=$(mktemp)
        
        # Run command with stderr redirected to temp file
        command worktree "$@" 2> >(tee "$temp_file" >&2)
        local exit_code=$?
        
        # Look for directory change indicator in stderr
        local target_dir
        target_dir=$(grep "^WT_CHDIR:" "$temp_file" 2>/dev/null | sed 's/^WT_CHDIR://')
        
        # Clean up temp file
        rm -f "$temp_file"
        
        # Change directory if target was specified
        if [[ -n "$target_dir" && -d "$target_dir" ]]; then
            cd "$target_dir" || echo "Warning: Failed to change to directory: $target_dir"
        fi
        
        return $exit_code
    else
        # For all other commands, just run normally
        command worktree "$@"
    fi
}

After adding this function and restarting your shell (or running source ~/.bashrc/source ~/.zshrc), the worktree add and worktree switch commands will automatically change your current directory to the worktree location.

Verification with Checksums

Download checksums.txt and verify your binary:

sha256sum -c checksums.txt

Released by GoReleaser.

v0.0.1

10 Aug 07:19
f0c84d4

Choose a tag to compare

Changelog

  • 5e4d164 Initial commit
  • 9c24978 Merge pull request #1 from liamawhite/initial-func
  • 38d11b7 Merge pull request #2 from liamawhite/release-things
  • 40d2340 Merge pull request #3 from liamawhite/test-fixes
  • 2ae7d8b Merge pull request #4 from liamawhite/more-test-fixes
  • f0c84d4 Merge pull request #5 from liamawhite/more-test-fixes-2
  • b3eab8e Update Claude settings permissions
  • 81b42d4 chore: add license headers and fix linting issues
  • 01da568 dont build windows binaries for now...
  • aad5fd7 feat(shell): improve interactive selector and fix config test leakage
  • 4a98d78 feat: add automatic directory switching for add/switch commands
  • 260c163 feat: add comprehensive worktree management system
  • 8c902cb feat: add git remote verification to integration tests
  • ed49116 feat: add release job to test workflow
  • c4780bf feat: change directory to root when removing current worktree
  • bab6928 fix test wf name
  • f2494f6 fix: resolve linting errors and test failures
  • b30236e more fixes

Installation

Download Binary

Choose the appropriate binary for your platform from the assets below:

Linux (x86_64)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.0.1/worktree_Linux_x86_64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

Linux (ARM64)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.0.1/worktree_Linux_arm64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

macOS (Intel)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.0.1/worktree_Darwin_x86_64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

macOS (Apple Silicon)

curl -L https://github.com/liamawhite/worktree/releases/download/v0.0.1/worktree_Darwin_arm64.tar.gz | tar xz
chmod +x worktree
sudo mv worktree /usr/local/bin/

Verify Installation

worktree --version

Optional: Shell Integration for Directory Switching

To enable automatic directory changes when using worktree add and worktree switch commands, add this function to your shell profile:

(~/.bashrc, ~/.bash_profile, ~/.zshrc):

worktree() {
    local cmd="$1"
    
    # Commands that should change directory
    if [[ "$cmd" == "add" || "$cmd" == "switch" || "$cmd" == "sw" ]]; then
        # Capture stderr to look for WT_CHDIR while preserving stdout and interactive TUI
        local temp_file
        temp_file=$(mktemp)
        
        # Run command with stderr redirected to temp file
        command worktree "$@" 2> >(tee "$temp_file" >&2)
        local exit_code=$?
        
        # Look for directory change indicator in stderr
        local target_dir
        target_dir=$(grep "^WT_CHDIR:" "$temp_file" 2>/dev/null | sed 's/^WT_CHDIR://')
        
        # Clean up temp file
        rm -f "$temp_file"
        
        # Change directory if target was specified
        if [[ -n "$target_dir" && -d "$target_dir" ]]; then
            cd "$target_dir" || echo "Warning: Failed to change to directory: $target_dir"
        fi
        
        return $exit_code
    else
        # For all other commands, just run normally
        command worktree "$@"
    fi
}

After adding this function and restarting your shell (or running source ~/.bashrc/source ~/.zshrc), the worktree add and worktree switch commands will automatically change your current directory to the worktree location.

Verification with Checksums

Download checksums.txt and verify your binary:

sha256sum -c checksums.txt

Released by GoReleaser.