Files
FWS-PacManage/cli/cli-application.h
T
BlackAngelTV 3e4ed92c0a 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.
2026-10-03 22:53:47 +02:00

15 lines
485 B
C++

#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