@@ -9,126 +9,50 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
1010### Added
1111
12- - ** Comprehensive end-to-end testing suite** - Added e2e tests that verify CLI behavior by building and executing the actual binary:
13- - ** Complete command coverage** : All commands tested with various flag combinations and edge cases
14- - ** Workflow testing** : Multi-command workflows that simulate real user scenarios
15- - ** Test infrastructure** : Efficient test helpers with binary caching and environment isolation
16- - ** Setup automation** : ` scripts/setup-testdata.sh ` creates isolated test environments
17- - ** Output validation** : Tests for both text and JSON output formats
18- - ** Error handling** : Comprehensive testing of error conditions and user feedback
19- - ** Cross-platform support** : Tests run on all platforms with Windows-specific handling
12+ ### Changed
13+
14+ ### Deprecated
15+
16+ ### Removed
2017
2118### Fixed
2219
23- - ** Remove/Prune --yes flag** - Fixed inverted logic that caused ` --yes ` flag to still prompt for confirmation
24- - The ` remove ` and ` prune ` commands now correctly skip confirmation when ` --yes ` is provided
25- - Previously, the logic was inverted causing ` --yes ` to have no effect
26-
27- - ** Adopt command flag parsing** - Fixed flag parsing issue that prevented adopt command from working
28- - Removed ` --source-dir ` and ` --target-dir ` from global flags as they were command-specific
29- - The adopt command can now properly parse its required ` --source-dir ` flag
30- - Previously, global flag parsing consumed these flags before commands could see them
31-
32- - ** Config file error handling** - Fixed config loading to properly report errors for invalid configurations
33- - When using ` --config ` flag with an invalid or non-existent file, lnk now exits with an error
34- - Previously, config loading errors were silently ignored and fell back to defaults
35- - Validation errors in config files are now properly reported to the user
36-
37- - ** Progress indicator consistency** - Fixed progress indicators showing prematurely and leaving terminal artifacts:
38- - Progress indicators now only show for operations taking longer than 1 second
39- - Removed duplicate progress tracking that caused immediate output
40- - Fixed terminal cleanup to prevent ` ⏎ ` symbols from appearing
41- - Consistent behavior across all commands (create, status, adopt, orphan, remove, prune)
42-
43- - ** Output formatting consistency** - Standardized output across all commands:
44- - All commands now display a newline after headers for consistent spacing
45- - Empty result messages are consistent (e.g., "No files to link found.")
46- - Summary sections have consistent spacing with newlines before them
47- - Added helper functions to enforce output patterns
48- - Fixed ` create ` command to show feedback when all symlinks already exist
49-
50- ### Breaking Changes
51-
52- - ** Removed environment variables in favor of flags** - All custom environment variables have been removed:
53- - ` LNK_CONFIG ` → Use ` --config ` flag instead
54- - ` LNK_IGNORE ` → Set ignore patterns in config file or use future ` --ignore ` flag
55- - ` LNK_DEBUG ` → Use ` --verbose ` flag instead for detailed output
56- - Standard environment variables (` HOME ` , ` XDG_CONFIG_HOME ` , ` NO_COLOR ` , ` PATH ` ) are still supported
57- - This change makes the tool more discoverable and follows CLI best practices
58-
59- - ** Renamed project from cfgman to lnk** - The project has been renamed to better reflect its focused purpose as a symlink management tool:
60- - Binary name: ` cfgman ` → ` lnk `
61- - Config file: ` .cfgman.json ` → ` .lnk.json `
62- - Environment variables: ` CFGMAN_* ` → ` LNK_* `
63- - Go module: ` github.com/cpplain/cfgman ` → ` github.com/cpplain/lnk `
64-
65- - ** Command names reverted to original form** :
66- - ` link ` → ` create ` (for creating symlinks)
67- - ` unlink ` → ` remove ` (for removing symlinks)
68-
69- - ** Directory-based architecture with absolute paths** - lnk now uses absolute paths for source directories:
70- - Source directories in config must now be absolute paths (e.g., ` ~/dotfiles/home ` instead of ` home ` )
71- - Adopt command requires absolute path: ` --source-dir ~/dotfiles/home `
72- - Removed ` --repo-dir ` flag and ` LNK_REPO_DIR ` environment variable
73- - Can run lnk from any directory - no longer requires a "repository directory"
74-
75- - ** Command arguments replaced with explicit flags** :
76- - ` adopt PATH SOURCE_DIR ` → ` adopt --path PATH --source-dir SOURCE_DIR `
77- - ` orphan PATH ` → ` orphan --path PATH `
78-
79- - ** Flag changes** :
80- - Removed ` --force ` flags from commands in favor of global ` --yes ` flag
81- - Replaced ` --json ` flag with ` --output FORMAT ` flag (supports text/json)
82-
83- - ** Removed ` init ` command** - lnk works with built-in defaults and doesn't require a config file
20+ ### Security
21+
22+ ## [ 0.4.0] - 2026-02-14
8423
8524### Added
8625
87- - ** Works without configuration** - Configuration discovery with flexible precedence:
88- - Built-in defaults: ` ~/dotfiles/home ` →` ~/ ` , ` ~/dotfiles/config ` →` ~/.config/ `
89- - XDG Base Directory support: ` $XDG_CONFIG_HOME/lnk/config.json `
90- - Global flags: ` --config ` , ` --source-dir ` , ` --target-dir ` , ` --ignore `
91- - Environment variables: ` LNK_CONFIG ` , ` LNK_SOURCE_DIR ` , ` LNK_TARGET_DIR ` , ` LNK_IGNORE `
92-
93- - ** Global flags for better control** :
94- - ` --verbose ` /` -v ` : Detailed debug output
95- - ` --quiet ` /` -q ` : Suppress non-error output
96- - ` --yes ` /` -y ` : Skip confirmation prompts
97- - ` --no-color ` : Disable colored output
98- - ` --output FORMAT ` : Choose output format (text/json)
99-
100- - ** Enhanced user experience features** :
101- - "Did you mean?" suggestions for mistyped commands
102- - Progress indicators for operations taking more than 1 second
103- - Next-step suggestions after successful operations
104- - Confirmation prompts for destructive operations
105- - Error messages with actionable "Try:" suggestions
106-
107- - ** Machine-friendly features** :
108- - JSON output support for ` status ` command
109- - Automatic output adaptation for piping (simplified format)
110- - Specific exit codes: 0 (success), 1 (runtime errors), 2 (usage errors)
111-
112- - ** CLI design documentation** following [ cpplain/cli-design] ( https://github.com/cpplain/cli-design ) principles
26+ - Comprehensive end-to-end testing suite
27+ - Zero-configuration defaults with flexible config discovery (` ~/.config/lnk/config.json ` , ` ~/.lnk.json ` )
28+ - Global flags: ` --verbose ` , ` --quiet ` , ` --yes ` , ` --no-color ` , ` --output `
29+ - Command suggestions for typos, progress indicators, confirmation prompts
30+ - JSON output and specific exit codes for scripting
11331
11432### Changed
11533
116- - ** Improved help system** :
117- - Standardized formatting across all commands
118- - Commands appear before options (standard convention)
119- - "See also" sections for related commands
120- - Removed ` help ` command (use ` lnk <command> --help ` )
34+ - Improved help system with standardized formatting and "See also" sections
35+ - Better output formatting with consistent indicators (✓, ✗, !) and ` ~ ` for home
36+ - ** BREAKING: Renamed project from cfgman to lnk** (binary, config, module)
37+ - ** BREAKING: Command names** ` link ` →` create ` , ` unlink ` →` remove `
38+ - ** BREAKING: Source directories must be absolute paths** ; removed ` --repo-dir `
39+ - ** BREAKING: Explicit flags required** (` adopt --path PATH --source-dir DIR ` )
40+ - ** BREAKING: Replaced ` --force ` with global ` --yes ` ** ; ` --json ` with ` --output FORMAT `
41+
42+ ### Removed
12143
122- - ** Better output formatting** :
123- - Consistent visual indicators: ✓ (success), ✗ (error), ! (warning)
124- - Home directory displayed as ` ~ ` consistently
125- - Summary statistics for bulk operations
126- - Table-aligned status output
44+ - ** BREAKING: Custom environment variables** (` LNK_CONFIG ` , ` LNK_IGNORE ` , ` LNK_DEBUG ` )
45+ - ** BREAKING: ` init ` command** (built-in defaults work without config)
12746
12847### Fixed
12948
130- - ** Circular symlink validation** - Now correctly allows existing symlinks that already point to their intended target
131- - ** Test environment isolation** - Tests no longer load system configuration files
49+ - ` --yes ` flag now correctly skips confirmation in ` remove ` and ` prune `
50+ - Adopt command flag parsing (previously consumed by global flags)
51+ - Config file errors now reported instead of silently falling back to defaults
52+ - Progress indicators only show after 1 second; no terminal artifacts
53+ - Output spacing consistency across all commands
54+ - Circular symlink validation for existing correct symlinks
55+ - Test environment isolation from system config
13256
13357## [ 0.3.0] - 2025-06-28
13458
@@ -184,7 +108,8 @@ Initial release of cfgman.
184108- ** Performance** - Concurrent operations for status checking
185109- ** Zero dependencies** - Pure Go implementation using only standard library
186110
187- [ unreleased ] : https://github.com/cpplain/lnk/compare/v0.3.0...HEAD
111+ [ unreleased ] : https://github.com/cpplain/lnk/compare/v0.4.0...HEAD
112+ [ 0.4.0 ] : https://github.com/cpplain/lnk/compare/v0.3.0...v0.4.0
188113[ 0.3.0 ] : https://github.com/cpplain/lnk/compare/v0.2.0...v0.3.0
189114[ 0.2.0 ] : https://github.com/cpplain/lnk/compare/v0.1.1...v0.2.0
190115[ 0.1.1 ] : https://github.com/cpplain/lnk/compare/v0.1.0...v0.1.1
0 commit comments