CLIBRI CLI

As soon as a scheme of the protocol is done you can implement it to get the necessary code-base. For a moment CLIBRI supports full implementation for rust and typescript (nodejs and browser).

To generate a code you need CLIBRI CLI tool. You can download it for multiple platforms.

Below you can see an example of CLI command call, which would generate implementations of protocol for rust and typescript:

clibri --src ./protocol.prot -rs ./rust/src/protocol.rs -ts ./typescript/src/protocol.ts -o --em
# --src path_to_protocol_scheme
# -rs path_to_rust_implementation_file
# -ts path_to_typescript_implementation_file
                

Below the full list of possible keys.

Short key Full key Syntax Description
-s --src --src path_to_file Path to protocol scheme file
-rs --dest-rs --dest-rs path_to_rust_file Full filename of rust file, which will be generated
-ts --dest-ts --dest-ts path_to_typescript_file Full filename of typescript file, which will be generated
-wf --workflow --workflow path_to_workflow scheme Workflow file used to generate consumer/producer code-base
-cd --consumer-dest --consumer-dest path_to_consumer_folder Path to consumer folder. Folder will be used for consumer code-base
-pd --producer-dest --producer-dest path_to_producer_folder Path to producer folder. Folder will be used for producer code-base
-e --em --em Will include all necessary code into generated protocol implementation to avoid using CLIBRI lib. It will make protocol implementation completely independent. This option is recommended for most usecases.
-o --ow --ow Will overwrite protocol implementation files if it already exists.
-d --puml --puml path_to_puml_file Creates puml representation of workflow. Can be used only if workflow is defined (--workflow)
-h --help --help Show list of all possible keys