Skip to content

feat: add terminal CLI (damx) - #266

Open
elieltondias wants to merge 1 commit into
PXDiv:mainfrom
elieltondias:main
Open

elieltondias wants to merge 1 commit into
PXDiv:mainfrom
elieltondias:main

Conversation

@elieltondias

Copy link
Copy Markdown

Summary

This PR adds a terminal-only companion app, DivAcerManagerMax-CLI (installed as the damx command), exposing every GUI feature from the command line — with human-readable and --json output for scripting. The GUI (DAMX) is untouched and both clients run side by side against the same daemon.

What's included

  • New DivAcerManagerMax-CLI/ project (net9.0, zero NuGet dependencies, single-file publish → DivAcerManagerMax-CLI binary):
  • status, features, profile get|set|list (eco/quiet/balanced/performance/turbo)
  • fan get|auto|max|set, battery calibration|limiter, usb get|set
  • kbd zone|effect|backlight, system lcd|boot|info, power, monitor, daemon restart|restart-drivers|version|logs, internals force-*|get/set-modprobe, --json on every command
  • New DAMXCommon/ library: single copy of the daemon protocol (DAMXClient) referenced by GUI and CLI — no duplication, no behavior change.
  • Installer: setup menu installs GUI + CLI together, or CLI-only / GUI-only; damx (CLI) and DAMX (GUI) coexist, uninstall cleans both. CLI is terminal-only (no icon, no launcher entry).
  • Packaging & CI: DAMX-CLI/ folder in release tarballs, dual version detection (GUI + CLI), both apps built in main.yml / workflow2.yml.
  • Conventions: CLI follows original project standards — English messages/docs, PascalCase naming, DAMX- component prefix.

Installation / usage

./setup.sh # 1 = GUI+CLI, 6 = CLI only, 7 = GUI only
damx status
damx profile set turbo
damx fan set --cpu 60 --gpu 80
damx --json status

Compatibility notes

  • No daemon or protocol changes — old and new clients are interoperable.
  • Existing installs keep working: GUI paths (/opt/damx/gui, DAMX, damx.desktop) and the Nitro/PredatorSense button behavior are unchanged.

Validation

  • dotnet build solution: 0 errors; both apps publish as single files
  • CLI smoke-tested (--version, monitor --once with live sensors, graceful error without daemon, exit codes 0/1/2)
  • bash -n on all three setup scripts
  • Real-machine test of setup.sh with the daemon running (needs hardware)

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.

1 participant