I’m returning to Haskell after many years and I want to write a CLI tool. Firstly, how is CLI tooling these days? One of the main reasons I have been considering Rust is much better libraries for CLI programs. There was Iris, but it’s abandoned. Other options? From a quick look I have not found anything new.
The main question is: I want an extensible architecture, which means that I want to allow plugins to be added to the program. For example, the program works with containers and I want it to work with Podman if a plugin is added or with Docker if another plugin is added.
I do not want to recompile it with Podman or Docker capabilities. For packaging and distribution, I want them to be separate packages e.g. my-program, another OS package my-program-podman, another my-program-docker etc. The main program would pass information to the additional package which would build and run a command that would then be run accordingly i.e. via Podman or Docker, then pass information back to the main program. Another example, if you use TMUX you can install an additional package my-program-tmux and that would add a subcommand my-program tmux to the main program.
Are there any examples of such architecture in Haskell, or any framework that would allow for that? So that I focus more on my program rather than solving this problem.