feat(cli): add a simplified command line over the logic layer

The window needs a display, which kept the package manager out of a script and
off a headless machine. The command line runs the same operations through
AppCore, before any widget exists, so providers, the pacman lock, the journal
and the history behave exactly as in the window.

Refs #22.
This commit is contained in:
BlackAngelTV committed 2026-10-03 22:53:47 +02:00
1 parent 78b279aeee
commit 3e4ed92c0a
11 files changed
+1055 -5

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
#pragma once
#include <QStringList>
// Runs a parsed command line against the logic layer (AppCore) and prints the
// result. No widget is built: the command line works on a machine without a
// display, and the operations are exactly the ones the window runs.
namespace cli {
// `args` is the command line, program name excluded. Returns the process exit
// code: 0 on success, 1 when an operation failed, 2 on a usage error.
int run(const QStringList& args);
} // namespace cli