2023-03-24 09:53:00 +00:00
|
|
|
import std.stdio;
|
|
|
|
|
|
|
|
import cli;
|
2023-05-17 10:40:01 +00:00
|
|
|
import command;
|
2023-03-24 09:53:00 +00:00
|
|
|
import services;
|
|
|
|
|
2023-03-26 11:33:10 +00:00
|
|
|
import consolecolors;
|
|
|
|
|
2023-03-24 09:53:00 +00:00
|
|
|
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("> ".blue);
|
2023-03-24 09:53:00 +00:00
|
|
|
cliHandler.readAndHandleCommand();
|
|
|
|
}
|
|
|
|
serviceManager.stopAll();
|
2023-05-17 10:40:01 +00:00
|
|
|
cwriteln("Goodbye!".blue);
|
2023-03-24 09:53:00 +00:00
|
|
|
}
|