This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Dolittle CLI

The Dolittle CLI tool command reference

This section helps you learn about how to use the Dolittle CLI tool. If you’re new to the CLI, jump down to the how to install section to get started.

Command overview

Syntax Description
dolittle runtime aggregates list List all running Aggregate Roots Details
dolittle runtime aggregates get Get details about a running Aggregate Root Details
dolittle runtime aggregates events Get committed events for an Aggregate Root Instance Details
dolittle runtime eventhandlers list List all running Event Handlers Details
dolittle runtime eventhandlers get Get details about a running Event Handler Details
dolittle runtime eventhandlers replay Replay events for a running Event Handler Details
dolittle runtime eventtypes list List all registered Event Types Details
dolittle runtime projections list List all running Projections Details
dolittle runtime projections get Get details about a running Projection Details
dolittle runtime projections replay Replay a running Projection Details

How to install

There are two ways to install the Dolittle CLI tool, directly as a binary or using the dotnet tool command if you’re using .NET.

Installing as a .NET tool

To install the tool globally on your machine, run:

dotnet tool install --global Dolittle.Runtime.CLI

This should make the dolittle command anywhere. You might have to modify your PATH environment variable to make it work, and the .NET installer should guide you in how to do this. If it doesn’t, you can have a look at the dotnet tool install documentation for more help.

Installing as a binary

To install the tool manually, head over to the Runtime latest release page on GitHub, expand the “Assets” section at the bottom of the release, and download the binary for your setup. Next you’ll have to place this file somewhere in your PATH to make it available as a command, on a *nix-like system, /usr/local/bin is usually a nice place, in the process of moving it we also recommend that you rename it to just dolittle. Lastly you will need to make the file executable by running chomd a+x /usr/local/bin/dolittle and you should be all set.

Subcommands

1 - Runtime

Commands related to management of a Runtime
dolittle runtime [subcommand]

Options

Option Description
--runtime host[:port] The address to the management endpoint of a Runtime.
--output table|json Select the format the output of the subcommand. Defaults to table.
--wide If set, prints more details in table format for a wider output.
--help Show help information.

Details

The dolittle runtime commands interacts with a Runtime you can access from your machine. You can specify an endpoint using the --runtime <host[:port]> option. If you don’t specify an endpoint, the CLI will try to locate a Runtime it can interact with itself. Currently it looks for Docker containers running a dolittle/runtime:* image with the management port (51052) exposed. If there are more than one available Runtime and you have not specified an endpoint, you’ll be presented with an interactive selector to choose one.

Subcommands

1.1 - Aggregates

Commands related to management of Aggregates
dolittle runtime aggregates [subcommand]

Options

Option Description
--runtime host[:port] The address to the management endpoint of a Runtime. See details.
--output table|json Select the format the output of the subcommand. Defaults to table.
--wide If set, prints more details in table format for a wider output.
--help Show help information.

Subcommands

1.1.1 - List

Lists all the Aggregate Roots currently registered by Clients to the Runtime
dolittle runtime aggregates list [options]

Options

Option Description
--tenant <id> Only show Aggregate Root information for the specified Tenant.
--runtime host[:port] The address to the management endpoint of a Runtime. See details.
--output table|json Select the format the output of the subcommand. Defaults to table.
--wide If set, prints more details in table format for a wider output.
--help Show help information.

1.1.2 - Get

Gets details of a specific Aggregate Root currently registered by Clients to the Runtime
dolittle runtime aggregates get <identifier> [options]

Arguments

Argument Description
<identifier> The id or the alias of the Aggregate Root to get details for.

Options

Option Description
--tenant <id> Only show Aggregate Root information for the specified Tenant.
--runtime host[:port] The address to the management endpoint of a Runtime. See details.
--output table|json Select the format the output of the subcommand. Defaults to table.
--wide If set, prints more details in table format for a wider output.
--help Show help information.

1.1.3 - Events

Gets committed events for a specific Aggregate Root Instance that is currently registered by Clients to the Runtime
dolittle runtime aggregates events <identifier> <eventsource> [options]

Arguments

Argument Description
<identifier> The id or the alias of the Aggregate Root to get details for.
<eventsource> The Event Source of the Aggregate Root Instance to get committed events for.

Options

Option Description
--tenant <id> Only show committed events for the specified Tenant. Defaults to the development Tenant.
--runtime host[:port] The address to the management endpoint of a Runtime. See details.
--output table|json Select the format the output of the subcommand. Defaults to table.
--wide If set, prints more details in table format for a wider output.
--help Show help information.

1.2 - Event Handlers

Commands related to management of Event Handlers
dolittle runtime eventhandlers [subcommand]

Options

Option Description
--runtime host[:port] The address to the management endpoint of a Runtime. See details.
--output table|json Select the format the output of the subcommand. Defaults to table.
--wide If set, prints more details in table format for a wider output.
--help Show help information.

Subcommands

1.2.1 - List

Lists all the Event Handlers currently registered by Clients to the Runtime
dolittle runtime eventhandlers list [options]

Options

Option Description
--tenant <id> Only show Event Handler information for the specified Tenant.
--runtime host[:port] The address to the management endpoint of a Runtime. See details.
--output table|json Select the format the output of the subcommand. Defaults to table.
--wide If set, prints more details in table format for a wider output.
--help Show help information.

1.2.2 - Get

Gets details of a specific Event Handler currently registered by Clients to the Runtime
dolittle runtime eventhandlers get <identifier> [options]

Arguments

Argument Description
<identifier> The identifier of the Event Handler to get details for. Format: id/alias[:scope]

Options

Option Description
--tenant <id> Only show Stream Processor status for the specified Tenant.
--runtime host[:port] The address to the management endpoint of a Runtime. See details.
--output table|json Select the format the output of the subcommand. Defaults to table.
--wide If set, prints more details in table format for a wider output.
--help Show help information.

1.2.3 - Replay

Initiates reprocessing of events for a specific Event Handler currently registered by Clients to the Runtime

Replay all events

Initiates reprocessing of all events (from position 0 in the Event Handler Stream) for all Tenants. If you want to only reprocess all events for a specific Tenant, use the replay from 0 command.

dolittle runtime eventhandlers replay all <identifier> [options]

Arguments

Argument Description
<identifier> The identifier of the Event Handler to replay. Format: id/alias[:scope]

Options

Option Description
--runtime host[:port] The address to the management endpoint of a Runtime. See details.
--help Show help information.

Replay events from a specific position in the Event Handler Stream

Initiates reprocessing of events from the specified position (in the Event Handler Stream) for a specific Tenant. This command will fail if the specified position is higher than the current position for the Event Handler, which would cause some events to be skipped.

dolittle runtime eventhandlers replay from <identifier> <position> [options]

Arguments

Argument Description
<identifier> The identifier of the Event Handler to replay. Format: id/alias[:scope]
<position> The position in the Event Handler stream to star reprocessing events from. Cannot be greater than the current position.

Options

Option Description
--tenant <id> The Tenant to replay events for. Defaults to the Development tenant.
--runtime host[:port] The address to the management endpoint of a Runtime. See details.
--help Show help information.

1.3 - Event Types

Commands related to management of Event Types
dolittle runtime eventtypes [subcommand]

Options

Option Description
--runtime host[:port] The address to the management endpoint of a Runtime. See details.
--output table|json Select the format the output of the subcommand. Defaults to table.
--wide If set, prints more details in table format for a wider output.
--help Show help information.

Subcommands

1.3.1 - List

Lists all the Event Types currently registered by Clients to the Runtime
dolittle runtime eventtypes list [options]

Options

Option Description
--runtime host[:port] The address to the management endpoint of a Runtime. See details.
--output table|json Select the format the output of the subcommand. Defaults to table.
--wide If set, prints more details in table format for a wider output.
--help Show help information.

1.4 - Projections

Commands related to management of Projections
dolittle runtime projections [subcommand]

Options

Option Description
--runtime host[:port] The address to the management endpoint of a Runtime. See details.
--output table|json Select the format the output of the subcommand. Defaults to table.
--wide If set, prints more details in table format for a wider output.
--help Show help information.

Subcommands

1.4.1 - List

Lists all the Projections currently registered by Clients to the Runtime
dolittle runtime projections list [options]

Options

Option Description
--tenant <id> Only show Stream Processor status for the specified Tenant.
--runtime host[:port] The address to the management endpoint of a Runtime. See details.
--output table|json Select the format the output of the subcommand. Defaults to table.
--wide If set, prints more details in table format for a wider output.
--help Show help information.

1.4.2 - Get

Gets details of a specific Projection currently registered by Clients to the Runtime
dolittle runtime projection get <identifier> <scope> [options]

Arguments

Argument Description
<identifier> The identifier or alias of the Projection to get details for
<scope> The scope of the Projection to get details for. Only required when the identifier or alias matches multiple projections

Options

Option Description
--tenant <id> Only show Stream Processor status for the specified Tenant.
--runtime host[:port] The address to the management endpoint of a Runtime. See details.
--output table|json Select the format the output of the subcommand. Defaults to table.
--wide If set, prints more details in table format for a wider output.
--help Show help information.

1.4.3 - Replay

Initiates a replay of a Projection currently registered by Clients to the Runtime

Initiates a replay of all events to rebuild Projection read models. This command drops all persisted read models, and potential copies in MongoDB, and restarts the Projection to build new ones.

dolittle runtime projection replay <identifier> <scope> [options]

Arguments

Argument Description
<identifier> The identifier or alias of the Projection to replay
<scope> The scope of the Projection to replay. Only required when the identifier or alias matches multiple projections

Options

Option Description
--tenant <id> Only replay the Projection for the specified Tenant. If not provided, replays for all Tenants
--runtime host[:port] The address to the management endpoint of a Runtime. See details.
--help Show help information.