Gymboard/gymboard-cli/source/app.d

22 lines
644 B
D
Raw Normal View History

import std.stdio;
import cli;
2023-05-17 10:40:01 +00:00
import command;
import services;
2023-03-26 11:33:10 +00:00
import consolecolors;
void main() {
ServiceManager serviceManager = new ServiceManager();
CliHandler cliHandler = new CliHandler();
cliHandler.register("service", new ServiceCommand(serviceManager));
2023-05-17 10:40:01 +00:00
cwriteln("\n<blue>Gymboard CLI</blue>: <grey>Command-line interface for managing Gymboard services.</grey>");
cwriteln(" Type <cyan>help</cyan> for more information.\n Type <red>exit</red> to exit the CLI.\n");
while (!cliHandler.isExitRequested) {
2023-03-26 11:33:10 +00:00
cwrite("&gt; ".blue);
cliHandler.readAndHandleCommand();
}
serviceManager.stopAll();
2023-05-17 10:40:01 +00:00
cwriteln("Goodbye!".blue);
}