Gymboard/gymboard-cli/source/app.d

20 lines
520 B
D
Raw Permalink Normal View History

import std.stdio;
import cli;
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-03-26 11:33:10 +00:00
cwriteln("Gymboard CLI: Type <cyan>help</cyan> for more information. Type <red>exit</red> to exit the CLI.");
while (!cliHandler.shouldExit) {
2023-03-26 11:33:10 +00:00
cwrite("&gt; ".blue);
cliHandler.readAndHandleCommand();
}
serviceManager.stopAll();
2023-03-26 11:33:10 +00:00
cwriteln("Goodbye!".green);
}