feat(multihost): add support for host-specific configurations

Implement multihost functionality allowing separate management of common and host-specific dotfiles. Add new commands and flags for handling host-specific files, update core logic for file storage and tracking, and enhance documentation to reflect new capabilities.
This commit is contained in:
Yar Kravtsov
2025-05-26 08:20:14 +03:00
parent ff3cddc065
commit 093cc8ebe7
9 changed files with 725 additions and 80 deletions

View File

@@ -20,16 +20,18 @@ func NewRootCommand() *cobra.Command {
Long: `🔗 Lnk - Git-native dotfiles management that doesn't suck.
Move your dotfiles to ~/.config/lnk, symlink them back, and use Git like normal.
That's it.
Supports both common configurations and host-specific setups.
✨ Examples:
lnk init # Fresh start
lnk init -r <repo-url> # Clone existing dotfiles
lnk add ~/.vimrc ~/.bashrc # Start managing files
lnk push "setup complete" # Sync to remote
lnk pull # Get latest changes
lnk init # Fresh start
lnk init -r <repo-url> # Clone existing dotfiles
lnk add ~/.vimrc ~/.bashrc # Start managing common files
lnk add --host work ~/.ssh/config # Manage host-specific files
lnk list --all # Show all configurations
lnk pull --host work # Pull host-specific changes
lnk push "setup complete" # Sync to remote
🎯 Simple, fast, and Git-native.`,
🎯 Simple, fast, Git-native, and multi-host ready.`,
SilenceUsage: true,
Version: fmt.Sprintf("%s (built %s)", version, buildTime),
}