Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History
554 lines (342 loc) · 21.9 KB

File metadata and controls

554 lines (342 loc) · 21.9 KB

Changelog

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

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

v1.7.1 - 2026-04-30

Added

  • Agent skill — moved the bundled Anvil agent instructions to anvil-agent/SKILL.md and installs them for Codex CLI as well as Claude Code.

Fixed

  • Project resolution — fixed dotted project names (for example virovet-diagnostik.de) being saved as nested YAML, recovered previously corrupted global config entries on load, and made linked-project matching deterministic so anvil work creates worktrees under the correct project slug.

Removed

  • Removed the obsolete .ai planning directory from the repository.

v1.7.0 - 2026-04-01

Changed

  • Smart project naminganvil link now derives the project name from the origin remote URL instead of the directory name, preventing mismatches when a repo is cloned into a differently-named folder. Falls back to directory name when no remote is configured. Shows an info message when the names differ.

Fixed

  • Integration test templates — updated tests to use the truncation-safe {{ .DatabaseName }} template variable instead of raw {{ .SiteName }}_{{ .DbSuffix }}

v1.6.0 - 2026-03-19

Changed

  • Global pruneanvil prune now iterates every linked project from the global config instead of requiring CWD to be inside a linked repo, making it usable as a global housekeeping command
  • Remote-aware merge detection — prune fetches origin before checking merged status, comparing against origin/<default-branch> to avoid false negatives from stale local refs

v1.5.1 - 2026-03-19

Fixed

  • Herd detection — setup wizard now correctly detects Herd at ~/Library/Application Support/Herd (macOS standard path) in addition to ~/.config/herd
  • Completion cache — after installing shell completion, anvil now removes ~/.zcompdump and ~/.zcompdump-* files so the new completion activates without a manual shell restart
  • AI skill overwrite — setup wizard now shows a unified diff before asking to overwrite an existing skill file; skips the prompt entirely when the file is already up to date

Full changelog: v1.5.0...v1.5.1

v1.5.0 - 2026-03-19

Added

  • Setup wizardanvil install now runs a 5-step interactive wizard: PATH check, Herd/Valet detection, shell completion install, default projects root prompt, and AI CLI skill setup (installs a Claude Code skill file)
  • First-run detection — new users are prompted to run the setup wizard on their first command; skips automatically in CI and non-interactive environments
  • Completion install by defaultanvil completion zsh|bash|fish now installs the script to the appropriate system path; use --print to get the old stdout behavior. Piped usage (e.g. source <(anvil completion zsh)) continues to work unchanged

Changed

  • Idiomatic Go improvements across scaffold, config, and preset packages (reduced abstraction layers, simplified pass-throughs)
  • Improved error wrapping consistency throughout the codebase

Fixed

  • anvil completion zsh|bash|fish piped usage (e.g. eval "$(anvil completion zsh)") now correctly falls back to stdout instead of showing an interactive prompt
  • Light terminal color rendering — muted/text styles now use AdaptiveColor for correct contrast on light backgrounds
  • anvil list table display — removed row separators and fixed status column wrapping

Full changelog: v1.4.0...v1.5.0

v1.4.0 - 2026-03-11

New Features

  • Shell completion — Tab completion for worktree names in open, scaffold, info, and remove commands. Generate scripts via anvil completion zsh|bash|fish|powershell.

Bug Fixes

  • anvil scaffold now uses fuzzy worktree matching (like info and open) instead of joining the argument with the project path — fixes "worktree not found" for linked projects with centralized worktrees
  • anvil open now treats http://localhost (and variants with ports) as unconfigured and falls back to https://<folder-name>.test instead of opening a Herd 404

Full changelog: v1.3.1...v1.4.0

v1.3.1 - 2026-03-11

Bug Fixes

  • anvil open now treats http://localhost (and variants with ports) as unconfigured and falls back to https://<folder-name>.test instead of opening a Herd 404

Full changelog: v1.3.0...v1.3.1

v1.3.0 - 2026-03-11

New Features

  • anvil open command — Open a worktree in your IDE and its Herd-linked site in the browser with a single command. Supports fuzzy matching by folder name, branch name, or partial match. Use --editor or --browser flags to open only one. IDE is configurable via --editor-cmd flag, per-project config, or global config (defaults to cursor).
  • editor_cmd config option — Configure your preferred IDE globally or per-project in the anvil config.

Bug Fixes

  • Strip ANSI escape codes from captured command output to prevent malformed APP_KEY values with embedded color codes (e.g. [33m, [39m)
  • Add --no-ansi flag to key:generate artisan commands in Laravel and LaravelSharedDB presets

Full changelog: v1.2.0...v1.3.0

v1.2.0 - 2026-03-10

New Features

  • --skip-scaffold flag for anvil work — Skip scaffold steps when creating a worktree for faster iteration. Run anvil scaffold later when ready.
  • anvil pull-config command — Copy anvil.yaml from the default branch worktree to the project root. Supports --force, --dry-run, and --verbose flags.

Bug Fixes

  • Remote branch detached HEAD fix — When selecting a remote branch (e.g. origin/feature/foo) from the interactive picker, the remote prefix is now stripped to create a proper local tracking branch instead of a detached HEAD.

Housekeeping

  • Remove unused sable-notify workflow
  • Align banner command listing spacing

Full changelog: v1.1.1...v1.2.0

v1.1.1 - 2026-03-10

Bug Fixes

  • Fix worktree database names exceeding MySQL's 64-char identifier limit for long branch names (e.g., hotfix/track-collection-reflection-exception)
  • Extract BuildDatabaseName() to ensure site name truncation applies consistently
  • Add {{ .DatabaseName }} template variable for truncated database names in env.write steps

Full changelog: v1.1.0...v1.1.1

v1.1.0 - 2026-02-12

Changes

  • Rename cd command to info and drop --shell flag
  • Rename tars preset to laravel-shared-db

1.0.0 - 2026-02-08

Breaking Changes

  • Project renamed from Arbor to Anvil - Binary, module path, config files, and all references renamed

    • Module path changed from github.com/artisanexperiences/arbor to github.com/naoray/anvil
    • Config file renamed from arbor.yaml to anvil.yaml
    • Local state file renamed from .arbor.local to .anvil.local
    • Default worktree base changed from ~/.arbor/worktrees to ~/.anvil/worktrees
    • Global config directory changed from ~/.config/arbor/ to ~/.config/anvil/
  • Removed anvil init and anvil destroy commands - The legacy bare repository (.bare) approach has been removed entirely. Use anvil link to register existing git repositories for centralized worktree management, and anvil unlink --clean to unregister and clean up.

  • Removed .bare directory support - Anvil now exclusively uses the linked project approach with worktrees stored in ~/.anvil/worktrees/.

Added

  • TARS preset for shared-database worktrees — detects config/tars.php, skips db.create, env.write for DB_DATABASE, migrate:fresh, and db.destroy to preserve the centralized database

Removed

  • anvil init command (use anvil link instead)
  • anvil destroy command (use anvil unlink --clean instead)
  • CloneRepo, CloneRepoWithGH, FindBarePath, IsAnvilProject internal functions
  • IsLinked field from ProjectContext (all projects are now linked)
  • BarePath field renamed to GitDir in ProjectContext

Changed

  • Simplified all CLI commands by removing dual-path branching (if pc.IsLinked)
  • Unified worktree function signatures: CreateWorktree, RemoveWorktree, ListWorktrees now operate on a gitDir parameter
  • Updated banner to show link, unlink, and cd commands

Fixed

  • Preset availability test updated for new TARS preset

[0.10.1] - 2026-02-05

Performance

  • Significantly improved anvil sync auto-stash performance - Changed auto-stash to skip ignored files (node_modules, vendor, etc.) for much faster operation
    • Auto-stash now completes in seconds instead of minutes on large projects
    • Changed from git stash push --all to git stash push --include-untracked
    • Still protects tracked modifications and untracked files
    • Ignored files are safely skipped since git doesn't modify them during sync anyway
    • Fixes hanging behavior on "Auto-stashing..." message with large projects

Fixed

  • Lint issues in codebase

Changed

  • Release workflow now ensures gofmt and golangci-lint checks run

0.10.0 - 2026-02-04

Added

  • Display version in CLI banner output
  • Automatic stashing in sync command to protect all local files during sync operations

Fixed

  • Ensure stash operation runs after sync confirmation

0.9.5 - 2026-02-04

No changes in this release.

0.9.4 - 2026-02-04

Fixed

  • Fix automated Homebrew formula updates using repository_dispatch

0.9.3 - 2026-02-04

Fixed

  • Homebrew formula now updates automatically on new releases
    • Release workflow uses PAT to trigger subsequent workflows
    • Solves GitHub Actions security limitation with GITHUB_TOKEN
    • Added manual workflow_dispatch trigger as fallback

0.9.2 - 2026-02-04

Added

  • Homebrew Support - Anvil is now available via Homebrew
    • Install with brew tap artisanexperiences/tap && brew install anvil
    • Automated formula updates on new releases
    • Support for macOS (arm64/amd64) and Linux (arm64/amd64)

Changed

  • BREAKING: Migrated repository from michaeldyrynda to artisanexperiences organization
    • Module path changed from github.com/michaeldyrynda/anvil to github.com/naoray/anvil
    • All import paths updated across the codebase
    • GitHub URLs updated in documentation
    • Users installing via go install must update their commands

Added

  • MIT LICENSE file with proper copyright attribution
  • Automated Homebrew formula update workflow
  • Enhanced installation documentation with multiple installation methods

0.9.1 - 2026-02-04

Added

  • Laravel preset now captures and stores the generated app key for reuse
    • App key is stored as AppKey variable in scaffold context
    • Can be referenced in subsequent steps via {{ .AppKey }} template
    • Automatically written back to .env file after generation

Fixed

  • Ensure consistency of variables being passed via ldflags during build

0.9.0 - 2026-02-04

Added

  • Pre-flight checks to validate dependencies before scaffold execution

    • Check for required commands, files, environment variables, and configuration
    • Conditional evaluation support for complex dependency validation
    • Clear error messages listing missing dependencies
    • Abort scaffold early when dependencies are not met
  • Improved diagnostics and error messages for scaffold operations

Fixed

  • Correct ldflags path for version info in build configuration

0.8.1 - 2026-02-03

Fixed

  • Prevent anvil init from overwriting copied repository config

    • Now skips unnecessary SaveProject call when repo config is copied
    • Only saves when explicitly setting a preset flag
  • Preserve YAML formatting and key ordering in config files

    • Use AST-based yaml.Node instead of map serialization
    • Maintain original structure, comments, and whitespace
    • Only modify values that actually changed

0.8.0 - 2026-02-03

Added

  • Separate local state from team config
    • New .anvil.local file for runtime state (gitignored)
    • Local state stores db_suffix for database naming
    • Automatic migration from old config format on first run
    • No manual intervention required - seamless upgrade

Changed

  • anvil.yaml now contains only team-shared configuration
    • Scaffold steps and presets remain in team config
    • Database suffix moves to local state file
    • Cleaner separation between shared and local settings

Removed

  • Deprecated worktree config helpers from config package
    • Simplified configuration management
    • Reduced code complexity

0.7.0 - 2026-02-02

Added

  • New anvil sync command for synchronizing worktrees with upstream branches
    • Fetch from remote and rebase (default) or merge with upstream
    • Interactive prompts for upstream branch and strategy selection
    • Configuration persistence to anvil.yaml
    • Support for custom remotes (default: origin)
    • Conflict detection with actionable error messages
    • Pre-flight checks for detached HEAD, dirty worktree, and in-progress operations

Fixed

  • Added missing repair and version commands to the CLI banner

0.6.0 - 2026-02-02

Added

  • New anvil repair command for fixing git configuration in existing projects

    • Configure fetch refspec in .bare directory for remote branch tracking
    • Automatically set up branch tracking for all local branches with remote counterparts
    • Interactive prompts for remote URL confirmation and editing
    • --dry-run flag to preview changes without applying
    • --refspec-only and --tracking-only flags for partial repairs
    • Idempotent - safe to run multiple times
  • Automatic branch tracking in anvil work command

    • New worktrees automatically set up upstream tracking to origin
    • --no-track flag to skip tracking setup when needed
    • Non-fatal errors - worktree creation continues even if tracking fails
  • Automatic fetch refspec configuration in anvil init

    • Bare repositories now automatically configured for remote tracking
    • Enables fetch, merge, and rebase operations from remote branches
  • New git helper functions for remote and branch management

    • ConfigureFetchRefspec() - Set up remote.origin.url and fetch refspec
    • SetBranchUpstream() - Configure branch tracking
    • GetBranchRefs() - List local and remote branches
    • HasFetchRefspec() and HasBranchTracking() - Check configuration state

Fixed

  • Windows CI failures resolved

0.5.0 - 2026-02-01

Added

  • Gradient block letter header with tree-themed styling for CLI commands
  • New scaffold step env.copy for copying environment variables between worktrees
  • Step validation framework with Validate() interface for all scaffold steps
  • File system interface abstraction for testable I/O operations
  • Per-step configuration validation for early error detection

Changed

  • Renamed php.laravel.artisan to php.laravel for consistency
  • Replaced Viper config library with yaml.v3 for cleaner config writes
  • Migrated to embedded BaseStepConfig for all step configurations

Refactored

  • Implemented explicit step registry with ordered slice for deterministic iteration
  • Introduced Command Executor interface for testable command execution

0.4.2 - 2026-02-01

Added

  • ARM64 architecture support for release binaries (macOS ARM64, Linux ARM64)
  • Checksum generation for all release artifacts (SHA256)
  • Reproducible builds with version information embedded in binary

Fixed

  • Resolve golangci-lint v2 errors
  • Update documentation accuracy and cleanup config schema

Changed

  • Upgrade golangci-lint to v2.1.2 for Go 1.24 compatibility
  • Upgrade golangci-lint-action to v7 for golangci-lint v2 support
  • Align Go versions across CI workflows
  • Pin linter version for consistent builds

Refactored

  • Extract helpers for better code organization
  • Implement deterministic preset detection
  • Add condition accessors for cleaner code
  • Return errors from step registry instead of silent failures

0.4.1 - 2026-01-30

Added

  • Output capture for scaffold steps with store_as option
    • Capture command output from bash.run, command.run, and all binary steps
    • Store output as template variables for use in subsequent steps
    • Automatic whitespace trimming of captured output
    • Works with: php, php.composer, php.laravel, node.npm, node.yarn, node.pnpm, node.bun, herd

0.3.1 - 2026-01-29

Fixed

  • Database naming now uses sanitized site name to handle hyphenated branch names correctly
  • Laravel preset writes DB_DATABASE to .env after database creation to ensure migrations run against correct database
  • Default branch worktrees now use saved SiteName instead of folder name to prevent Herd link collisions
  • Scaffold command now correctly detects when running from project root vs worktree
  • env.write step race conditions resolved with file locking for concurrent execution
  • env.write now respects configured priority and creates parent directories as needed

Changed

  • Removed priority system in favor of sequential step execution for predictable ordering
  • Steps now execute in the exact order they appear in configuration

0.3.0 - 2026-01-28

Added

  • New scaffold steps: env.read, env.write, db.create, db.destroy
  • Template variable system with dynamic substitution using Go's text/template
  • Built-in template variables: Path, RepoPath, RepoName, SiteName, Branch, DbSuffix, SanitizedSiteName
  • Custom variables from env.read steps available to subsequent steps
  • Support for multiple databases with shared suffix generation
  • DatabaseClient abstraction with mock support for testing
  • Readable database name generation using adjective_noun word lists
  • Automatic retry on database name collisions (up to 5 attempts)
  • Persistent suffix storage in worktree-local config for cleanup
  • Support for MySQL, PostgreSQL, and SQLite

Improved

  • Mock implementations for database operations eliminate need for containerized tests
  • Improved test coverage across scaffold steps

0.2.0 - 2026-01-20

Major Changes

  • Complete interactive UI overhaul using Charm libraries
    • Styled tables for 'anvil list'
    • Interactive prompts for all commands
    • Spinners for long-running operations
    • Command output styling
    • Root command banner and global flags
    • Tree-themed color palette

Enhanced

  • Enhanced 'anvil remove' command
    • Add --delete-branch flag
    • Interactive prompt for branch deletion
    • Improved worktree picker when folder arg missing

Added

  • New 'anvil destroy' command for project cleanup

Fixed

  • Strip '+' prefix from branch names
  • Force delete when user confirms branch deletion
  • Prevent deletion of main worktree
  • Ensure site name on init, folder name on work
  • CI workflow updated to Go 1.24
  • Various test fixes
  • Show worktree picker when folder arg missing, regardless of --force
  • Use IsInteractive() for initial arg prompts instead of ShouldPrompt

0.1.0 - 2026-01-20

Added

  • 'anvil list' command to display worktrees with their status
  • Comprehensive documentation updates

Fixed

  • OS condition test to use runtime.GOOS

Refactored

  • Complete Phase 6 polish & cross-platform fixes
  • Complete Phase 5 performance improvements
  • Complete Phase 4 code consolidation
  • Complete Phase 3 error handling improvements
  • Complete Phase 2 quick wins
  • Complete Phase 1 critical fixes

Testing

  • Add Phase 0 safety net tests for refactor

0.0.2 - 2026-01-20

Added

  • 'anvil list' command to display worktrees
  • Update documentation with list command
  • Use tag annotation for release notes

0.0.1 - 2026-01-19

Added

  • Initial release
  • Git worktree management
  • Project initialization with scaffolding
  • Laravel and PHP presets
  • Interactive commands (work, prune)
  • Multi-platform builds and CI/CD