package sihl
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=bfa7bde9af02bb83d5ca39d54797b05b43317f033d93d24ca86ca42ff8ef83a1
sha512=6bb8727f65116e8042aa1fb77b3c14851ce5238f7b412adadf0f8e5b52d5310e8f06056c96bf76a82ffd7096753f49b2b0482f41e18ee1ca94310b874fe81bf9
doc/sihl.core/Core/Command/index.html
Module Core.Command
Source
A module to register and run CLI commands.
A CLI command is the entry t a Sihl app. Services contribute their own set of commands, making every Sihl app and the available commands per Sihl app dynamic and dependent on the set of active services.
A function that takes a list of strings as argument and does some side effect.
A CLI command has a unique name, an optional help text that shows the usage, a description that gives background information and the actual CLI function.
Running commands
Call run commands args
in the main Sihl app executable to pass command line arguments to all registered commands
. This is the main entry point to a Sihl app. An optional list of arguments args
can be passed, if None
is passed, it reads the arguments from Sys.argv
.
Utilities
pp
formats the command t
as an s-expression