feat(cli): add --link flag to link configs without installs (issue #29)#30
Closed
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
Closed
feat(cli): add --link flag to link configs without installs (issue #29)#30devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
Conversation
Implements link-only operation that symlinks configs and runs postlink hooks without installs/defaults/state persistence. Adds tests and docs. Co-Authored-By: Pablo P Varela <pablo@pablopunk.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…mode under Advanced Usage Co-Authored-By: Pablo P Varela <pablo@pablopunk.com>
Author
|
Closing due to inactivity for more than 7 days. Configure here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(cli): add --link flag to link configs without installs (issue #29)
Summary
This PR implements a new
--linkCLI flag that enables "link-only" operations as requested in issue #29. When used, the flag creates or updates symlinks for configuration files without running install commands, exporting/importing defaults, or persisting state changes.Key Features:
linksections from components, skippinginstallcommands--verboseand quiet (progress) execution modesFiles Changed:
cmd/dot/main.go: Added CLI flag, execution path, and state persistence guardinternal/component/component.go: AddedLinkComponentsandLinkComponentsWithProgressmethodscmd/dot/main_test.go&internal/component/component_test.go: Added test coverageREADME.md: Updated with usage examples and behavior descriptionReview & Testing Checklist for Human
dot --link,dot --link [profile], anddot --link [fuzzy]to verify basic functionality works as expected~/.dot/state.jsonor persist profile changes (key behavioral difference)--dry-run,--verbose, and doesn't conflict with existing operationsRecommended Test Plan:
installandlinksections plus a postlink hookdot --link [component]and verify only linking occurs (no installs, no state changes)neovimto ensure expected output:✔︎ *.cli.neovim linkedDiagram
%%{ init : { "theme" : "default" }}%% graph TD CLI["cmd/dot/main.go<br/>CLI Entry Point"]:::major-edit ComponentMgr["internal/component/component.go<br/>Component Manager"]:::major-edit CLITest["cmd/dot/main_test.go<br/>CLI Flag Tests"]:::minor-edit ComponentTest["internal/component/component_test.go<br/>Link Component Tests"]:::minor-edit README["README.md<br/>Documentation"]:::minor-edit LinkMgr["internal/link/link.go<br/>Link Manager"]:::context StateMgr["internal/state/state.go<br/>State Manager"]:::context ExecMgr["internal/exec/exec.go<br/>Exec Manager"]:::context CLI --> ComponentMgr ComponentMgr --> LinkMgr ComponentMgr --> StateMgr ComponentMgr --> ExecMgr CLI -.-> CLITest ComponentMgr -.-> ComponentTest subgraph Legend L1[Major Edit]:::major-edit L2[Minor Edit]:::minor-edit L3[Context/No Edit]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes