Skip to content

Conversation

@timvw
Copy link
Owner

@timvw timvw commented Jan 26, 2026

Summary

  • Add wt init command for automatic shell configuration
  • Replace custom release workflow with GoReleaser for unified packaging
  • Add support for multiple package formats

Changes

New wt init Command

  • Auto-detects shell (bash, zsh, PowerShell)
  • Adds shell integration to appropriate config file (.bashrc, .zshrc, $PROFILE)
  • Uses markers (# >>> wt initialize >>>) for idempotent updates
  • Supports --dry-run, --uninstall, --no-prompt flags

GoReleaser Configuration

  • Builds binaries for Linux, macOS, Windows (amd64, arm64)
  • Creates packages via nfpm:
    • .deb for Debian/Ubuntu
    • .rpm for Fedora/RHEL
    • Arch Linux packages
  • Updates Homebrew tap automatically
  • Configures Scoop bucket for Windows

Installer Scripts

  • scripts/postinstall.sh: Configures shell integration on package install
  • scripts/preremove.sh: Removes shell integration on package uninstall

E2E Tests

  • Tests for init command: dry-run, config creation, idempotency, uninstall
  • Tests preservation of existing shell config

Installation Commands (after release)

# macOS/Linux via Homebrew
brew install timvw/tap/wt

# Debian/Ubuntu
curl -LO https://github.com/timvw/wt/releases/latest/download/wt_amd64.deb
sudo dpkg -i wt_amd64.deb

# Fedora/RHEL
curl -LO https://github.com/timvw/wt/releases/latest/download/wt_amd64.rpm
sudo rpm -i wt_amd64.rpm

# Arch Linux (AUR)
yay -S wt-bin

# Windows (Scoop)
scoop bucket add timvw https://github.com/timvw/scoop-bucket
scoop install wt

Test Plan

  • Unit tests pass
  • E2E tests pass for init command
  • GoReleaser dry-run succeeds
  • Manual test of wt init command

Note

Requires creating timvw/scoop-bucket repository before Windows Scoop support works.

Add `wt init` command for automatic shell configuration:
- Auto-detects shell (bash, zsh, PowerShell)
- Idempotent: uses markers to update existing config
- Supports --dry-run, --uninstall, --no-prompt flags

Add GoReleaser configuration for unified release process:
- Builds for Linux, macOS, Windows (amd64, arm64)
- Creates .deb and .rpm packages via nfpm
- Generates Arch Linux packages
- Updates Homebrew tap automatically
- Configures Scoop bucket for Windows

Add installer scripts:
- postinstall.sh: Configures shell integration on install
- preremove.sh: Removes shell integration on uninstall

Add e2e tests for init command:
- Tests dry-run, config creation, idempotency, uninstall
- Tests preservation of existing shell config
@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

❌ Patch coverage is 45.18072% with 91 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.64%. Comparing base (0459d50) to head (0eb68b2).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
init.go 44.93% 71 Missing and 16 partials ⚠️
main.go 50.00% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #32      +/-   ##
==========================================
+ Coverage   11.83%   17.64%   +5.80%     
==========================================
  Files           2        3       +1     
  Lines         794      958     +164     
==========================================
+ Hits           94      169      +75     
- Misses        694      767      +73     
- Partials        6       22      +16     
Files with missing lines Coverage Δ
main.go 19.52% <50.00%> (+0.57%) ⬆️
init.go 44.93% <44.93%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

timvw added 5 commits January 26, 2026 11:52
- Use Windows PowerShell 5.1 profile path by default (Documents/WindowsPowerShell)
  instead of PowerShell Core path; check $PROFILE env var first
- Reject `wt init powershell` on non-Windows since `wt shellenv` only outputs
  PowerShell code when running on Windows
- Remove Homebrew post_install that modified user dotfiles (violates Homebrew policy);
  use caveats to instruct users to run `wt init` themselves
- Add `init` and `version` commands to shell completions (bash, zsh, PowerShell)
- Move init command implementation from main.go to init.go for better organization
- Add comprehensive unit tests for init functions in init_test.go
- Use supportedShells map instead of string comparisons for shell validation
- Add successPrefix() function for terminal-aware emoji/ASCII output
- Fix postinstall.sh to use full path /usr/bin/wt
- Add comment explaining Windows arm64 exclusion in .goreleaser.yml
@timvw timvw merged commit 9d61b93 into main Jan 26, 2026
11 checks passed
@timvw timvw deleted the feature/installers branch January 26, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants