5b37057b6141fe841ed179fb1e2d27f085b140d4
- internal/homesick/version: new version_test.go covers String constant and semver format validation - internal/homesick/cli: add list, generate, clone, status, diff, and git-repo helper tests; coverage raised from 62.5% to 71.2% - internal/homesick/core: new helpers_test.go covers runGit pretend, actionVerb, sayStatus, unlinkPath, linkPath, readSubdirs, matchesIgnoredDir, confirmDestroy, ExecAll edge cases, and Link/Unlink default castle wrappers; core_test.go and pull_test.go extended with New constructor and PullAll quiet-mode tests; exec_test.go extended with ExecAll no-repos-dir and error-wrap tests; coverage raised from 75.6% to 80.2%
homesick
Your home directory is your castle. Don't leave your dotfiles behind.
This repository now contains a Go implementation of Homesick. A dotfiles repository is called a castle and should contain a home/ directory with files to link into your $HOME.
Build
Build with just:
just go-build
Or directly with Go:
go build -o dist/gosick ./cmd/homesick
Commands
Implemented commands:
clone URI [CASTLE_NAME]listshow_path [CASTLE]status [CASTLE]diff [CASTLE]link [CASTLE]unlink [CASTLE]track FILE [CASTLE]pull [--all|CASTLE]push [CASTLE]commit -m MESSAGE [CASTLE]destroy [CASTLE]cd [CASTLE]open [CASTLE]exec CASTLE COMMAND...exec_all COMMAND...generate PATHrc [--force] [CASTLE]version
Global options:
--pretendsimulates command execution for shell/git-backed operations.--dry-runis an alias for--pretend.--quietsuppresses status output.
rc behavior
- Runs executable scripts in
<castle>/.homesick.d/in lexicographic order. - Executes scripts with the castle root as the current working directory.
- Forwards script stdout/stderr to command output.
- If
<castle>/.homesickrcexists,--forceis required before legacy Ruby compatibility hooks are run. - If
<castle>/.homesickrcexists and<castle>/.homesick.d/parity.rbdoes not, generatesparity.rbbefore execution. - Never overwrites an existing
parity.rbwrapper.
exec behavior
exec CASTLE COMMAND...runs the shell command inside the target castle root.exec_all COMMAND...runs the same shell command inside each cloned castle root in sorted order.
Behavior Suite
The repository includes a Docker-based behavior suite that validates filesystem and git outcomes for the implemented commands.
Run behavior suite:
just behavior
Verbose behavior suite output:
just behavior-verbose
Testing
Run all Go tests:
just go-test
License
See LICENSE.
Languages
Go
86.3%
Shell
12.8%
Just
0.5%
Dockerfile
0.4%