Add headless mode support with command-line flags#2182
Add headless mode support with command-line flags#2182ParticleG wants to merge 22 commits intoAvengeMedia:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a non-interactive (“headless”) installation path to dankinstall, enabling scripted installs by selecting compositor/terminal via CLI flags while preserving the existing interactive TUI flow.
Changes:
- Switched
dankinstallentrypoint tocobraand added flags (--compositor,--term,--include-deps,--exclude-deps,--yes). - Introduced
core/internal/headlessrunner to orchestrate unattended OS detection, dependency resolution, install, and config deployment. - Updated
core/README.mdwith headless usage and added initial unit tests for the new package.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| core/cmd/dankinstall/main.go | Adds cobra CLI/flags and routes between TUI vs headless execution. |
| core/internal/headless/runner.go | Implements headless install orchestration (deps filtering, sudo check, install, config deploy, optional greeter setup). |
| core/internal/headless/runner_test.go | Adds unit tests for parsing helpers, runner wiring, and logging channel behavior. |
| core/README.md | Documents headless mode usage, examples, and new flags. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…dd corresponding unit tests
…d the `drainLogChan` function to prevent blocking (AvengeMedia#2182 (comment))
|
@bbedward While testing dankinstall's headless mode, I attempted to install the dms-shell package. One of its dependencies, quickshell, automatically attempts to install the standard version. However, according to the AUR package description (https://aur.archlinux.org/packages/dms-shell), the quickshell listed there is likely a meta package, and the package that should actually be installed is quickshell-git. How to deal with this problem? Also, the headless mode would silently select the first provider when installing packages like |
I could not even make the official DankInstall work, see #2189 |
…ements are met, and optimized the pre-installation logic for AUR packages
A potential fix: e1d3fd5 However, this should be fixed on the upstream Arch repo and should not be handled here |
Related issue: #2180
This pull request adds a new headless (unattended) installation mode to
dankinstall, allowing DankMaterialShell and its dependencies to be installed non-interactively via command-line flags, in addition to the existing interactive TUI. It introduces a newcore/internal/headlesspackage to orchestrate unattended installs, adds CLI flag parsing usingcobra, and provides comprehensive documentation and tests for the new functionality.Headless installation support:
dankinstall, triggered by--compositorand--termflags, enabling scripted or automated installs without user interaction. [1] [2] [3]core/internal/headless/runner.gofile, which implements the logic for unattended installation, including OS detection, dependency resolution, sudo authentication, package installation, and configuration deployment.Command-line interface improvements:
dankinstallto use thecobralibrary for argument parsing, adding new flags:--compositor,--term,--include-deps,--exclude-deps, and--yesfor full control in headless mode. [1] [2] [3]Documentation updates:
core/README.mdto document the new headless mode, including usage instructions, example commands, and a table describing the new flags. [1] [2]Testing:
core/internal/headless/runner_test.goto cover parsing, dependency checks, and runner initialization for the headless installer logic.