Summary
Add comprehensive lifecycle management for dotfiles — auto-setup on a new machine, detect and apply changes, reset to clean state, and auto-install all dependencies. Inspired by full dotfile ecosystems like the Spelljinxer/hyprdots setup pattern where a single clone + script gets everything running.
Workflow
dwell deploy # One-command full system setup
dwell deploy --dry-run # Preview before touching anything
dwell deploy --fast # Skip non-essential steps
dwell status # Current state (exists)
dwell diff # Changes vs source (exists)
dwell reset <file> # Reset a single dotfile to source
dwell reset --all # Reset ALL deployed files to source state
dwell reset --stray # Remove files deployed by dwell but no longer in source
dwell watch --auto-sync # Watch + auto-commit on changes (extends existing watch)
dwell deploy — the full setup pipeline
The dwell deploy command should orchestrate everything in sequence:
dwell deploy
├── 1. deps scan # Auto-detect dependencies
├── 2. deps install # Install required packages
├── 3. setup restore # Restore captured packages
├── 4. diff --check # Preview what will change
├── 5. apply # Deploy dotfiles
├── 6. sync # Commit initial state
└── done: "System ready."
A single command to go from bare OS to fully configured system.
dwell reset — revert to source state
dwell reset ~/.bashrc # Overwrite ~/.bashrc with source version
dwell reset --all # Reset all tracked files
dwell reset --stray # Delete targets not in source (cleanup)
dwell reset --staged # Unstage git changes only
dwell reset --dry-run # Preview without modifying
Reset should:
- Single file: read the source entry, re-render template, write to target
- All: iterate all source entries, re-apply clean versions
- Stray: find targets in state.json that no longer have corresponding source entries, offer to delete
- Template changes: re-render with current template data (hostname, os, etc.)
dwell change — auto-detect and suggest
dwell change # Scan for unmanaged changes, suggest action
dwell change --track <path> # Start tracking a new file
dwell change --auto # Auto-add all detected changes
Detects:
- Files modified on disk but not in source → suggest
dwell add
- Files deleted on disk but still in source → suggest
dwell remove / dwell reset
- New programs in PATH not in deps.toml → suggest
dwell deps scan
- New config files in ~/.config/ that look managed → suggest
dwell add
Auto-install from README dependency table
Parse a README-style dependency table (like the Spelljinxer dotfiles README) and auto-install listed programs:
| Component | Program |
|-----------|---------|
| WM | hyprland |
| Terminal | kitty |
| Shell | zsh |
dwell setup capture --from-readme README.md would parse this table and install all listed tools via the available package manager.
Implementation notes
dwell deploy is an orchestration wrapper, not new logic — chains existing commands
dwell reset reuses the Deployer with a "force overwrite from source" mode
dwell change combines diff + deps scan + filesystem watcher data
--stray detection compares state.json entries against source directory entries
- README table parsing: simple markdown table regex, column 2 = package name
- All commands support
--dry-run
Acceptance criteria
Summary
Add comprehensive lifecycle management for dotfiles — auto-setup on a new machine, detect and apply changes, reset to clean state, and auto-install all dependencies. Inspired by full dotfile ecosystems like the Spelljinxer/hyprdots setup pattern where a single clone + script gets everything running.
Workflow
dwell deploy — the full setup pipeline
The
dwell deploycommand should orchestrate everything in sequence:A single command to go from bare OS to fully configured system.
dwell reset — revert to source state
Reset should:
dwell change — auto-detect and suggest
Detects:
dwell adddwell remove/dwell resetdwell deps scandwell addAuto-install from README dependency table
Parse a README-style dependency table (like the Spelljinxer dotfiles README) and auto-install listed programs:
dwell setup capture --from-readme README.mdwould parse this table and install all listed tools via the available package manager.Implementation notes
dwell deployis an orchestration wrapper, not new logic — chains existing commandsdwell resetreuses the Deployer with a "force overwrite from source" modedwell changecombinesdiff+deps scan+ filesystem watcher data--straydetection comparesstate.jsonentries against source directory entries--dry-runAcceptance criteria
dwell deploychains existing commands with progress outputdwell reset --allrestores all targets to source statedwell reset --strayfinds and removes orphaned targetsdwell changescans for unmanaged changesdwell deployis a single command for fresh-machine setup