Zero Install .NET API 2.20.0
Command-line interface

The ZeroInstall.Commands namespace provides a command-line interface for Zero Install. This both implements an actual command-line executable and provides a library for building other clients.

Processing arguments

ProgramUtils.Init() should be called by all clients right after startup to initialize process-wide state.

Afterwards ProgramUtils.Run() can be called with the command-line arguments to be parsed along with an ICommandHandler. ICommandHandler extends the ITaskHandler interface with various UI interactions that commands can use to display intermediate results, ask for user input, etc..

ProgramUtils.Run() parses the provided command-line arguments and selects the appropriate CliCommand to handle them.

Inheritance hierarchy

Each command (e.g., 0install run) is represented by a class derived from CliCommand (e.g., ZeroInstall.Commands.Basic.Run).

CliCommand derives from ScopedOperation. This provides a more basic starting point, for any operation that requires scoped dependency resolution. It provides this by itself deriving from ZeroInstall.Services.ServiceProvider.