Command Line Reference

factcast

factcast [OPTIONS] COMMAND [ARGS]...

Options

-v, --verbose

Output more details on what is happening. Use multiple times for more details.

Default

False

-p, --profile <profile>

The profile to use for the command that is about to run.

Default

default

--install-completion <install_completion>

Install completion for the specified shell.

Options

bash | zsh | fish | powershell | pwsh

--show-completion <show_completion>

Show completion for the specified shell, to copy it or customize the installation.

Options

bash | zsh | fish | powershell | pwsh

enumerate

factcast enumerate [OPTIONS] COMMAND [ARGS]...

namespaces

List all available namespaces in alphabetical order.

factcast enumerate namespaces [OPTIONS]

types

List all types in a given namespace in alphabetical order

factcast enumerate types [OPTIONS] NAMESPACE

Arguments

NAMESPACE

Required argument

fact

factcast fact [OPTIONS] COMMAND [ARGS]...

publish

Publish the given facts.

factcast fact publish [OPTIONS] FACT_FILE

Arguments

FACT_FILE

Required argument

serial-of

Returns the serial for the fact identified by the given UUID

factcast fact serial-of [OPTIONS] FACT_ID

Arguments

FACT_ID

Required argument

streams

factcast streams [OPTIONS] COMMAND [ARGS]...

collect

This command helps in piecing together more complex scenarios. It takes a file containing a list of dicts [{"ns": "testNamespace", "type": "testType", "version":2}] where version is optional. The type is not regexp-able. This can be used to gather the base data for projections which can assist in debugging.

The command will collect all events matching the specification into one event stream and either print it to screen of output it to a file. If you need the eventstreams separated by namespace you MUST pass an output directroy along with the --by--namespace option. The resulting eventstreams will be stored as json lists in that directory in files named after the namespaces.

factcast streams collect [OPTIONS] COLLECT_SPEC

Options

--out <out>

The output file or folder to which the result is to be delivered.

--by-namespace

If set the result will be output to one file per namespace. Requires “out” option to be a directory.

Default

False

Arguments

COLLECT_SPEC

Required argument

subscribe

Subscribe to an eventstream.

You can select types you want to subscribe to. When doing so you can also use regexes to subscribe to multiple event types in short order for example ... subscribe machinery --type Assembly.* will get you all Assembly events for example AssemblyCreated, AssemblyCompleted, AssemblyDestroyed but nothing related to Subassemblies. If you specify no types, all types will be streamed.

You can also get event types in specific versions. You can either specify them intermixed with the types like this ... subscribe machinery --type AssemblyCreated --version 1 --type AssemblyUsed --version 3 or you can write them out after each other like this ... subscribe machinery --type AssemblyCreated --type AssemblyUsed --version 1 --version 3. In both cases you will get version 1 of AssemblyCreated and version 3 of AssemblyUsed. You can specify fewer versions than types. In this case matching will be left to right by postion in the list. Types without a version will give you the latest version. This leads to a slightly strange case where ... subscribe machinery --type AssemblyCreated --type AssemblyUsed --version 2 will give you version 2 of AssemblyCreated and the latest version of AssemblyUsed. It is recommended to put the types you need the latest version of last and use intermixed notation before that. If you want to explicitly specify the latest version, please specify --version 0

To keep other complexities out of this, if you use versions you will not be able to use regexes. This is mostly due to the ambiguities that come along when you specify something like this ... subscribe machinery --type Assembly.* --version 2 do you want version 2 of everything or version 2 of the first match and latest of everything else?

If you are looking for information on tee and --follow please check the Streams FAQ.

factcast streams subscribe [OPTIONS] NAMESPACE

Options

--follow

Stay connected and listen for new events.

Default

False

--from-now

Follow the event stream starting now.

Default

False

--after-fact <after_fact>

Get all events in the stream that happened after a certain ID.

--json

Output raw json events.

Default

False

--type <fact_types>

The types of events to get. Can be used multiple times. Supports regexp.

Default

--version <type_versions>

The versions of the types to get. Will be right padded with latest. If used regex for types is not supported.

Default

Arguments

NAMESPACE

Required argument