Skip to content

Add headless mode support with command-line flags#2182

Open
ParticleG wants to merge 22 commits intoAvengeMedia:masterfrom
ParticleG:master
Open

Add headless mode support with command-line flags#2182
ParticleG wants to merge 22 commits intoAvengeMedia:masterfrom
ParticleG:master

Conversation

@ParticleG
Copy link
Copy Markdown

@ParticleG ParticleG commented Apr 9, 2026

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 new core/internal/headless package to orchestrate unattended installs, adds CLI flag parsing using cobra, and provides comprehensive documentation and tests for the new functionality.

Headless installation support:

  • Added a new headless (unattended) mode to dankinstall, triggered by --compositor and --term flags, enabling scripted or automated installs without user interaction. [1] [2] [3]
  • Introduced the core/internal/headless/runner.go file, which implements the logic for unattended installation, including OS detection, dependency resolution, sudo authentication, package installation, and configuration deployment.

Command-line interface improvements:

  • Switched dankinstall to use the cobra library for argument parsing, adding new flags: --compositor, --term, --include-deps, --exclude-deps, and --yes for full control in headless mode. [1] [2] [3]

Documentation updates:

  • Updated core/README.md to document the new headless mode, including usage instructions, example commands, and a table describing the new flags. [1] [2]

Testing:

  • Added a new test suite in core/internal/headless/runner_test.go to cover parsing, dependency checks, and runner initialization for the headless installer logic.

Copilot AI review requested due to automatic review settings April 9, 2026 07:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 dankinstall entrypoint to cobra and added flags (--compositor, --term, --include-deps, --exclude-deps, --yes).
  • Introduced core/internal/headless runner to orchestrate unattended OS detection, dependency resolution, install, and config deployment.
  • Updated core/README.md with 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.

@ParticleG ParticleG requested a review from Copilot April 9, 2026 09:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ParticleG
Copy link
Copy Markdown
Author

@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 dms-shell-compositor.

@ParticleG
Copy link
Copy Markdown
Author

@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 dms-shell-compositor.

I could not even make the official DankInstall work, see #2189

…ements are met, and optimized the pre-installation logic for AUR packages
@ParticleG
Copy link
Copy Markdown
Author

ParticleG commented Apr 9, 2026

@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 dms-shell-compositor.

I could not even make the official DankInstall work, see #2189

A potential fix: e1d3fd5

However, this should be fixed on the upstream Arch repo and should not be handled here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants