The main concepts on Ritchie are
It refers to a command line interface, which is a program that processes commands in a software or any computing program only through text.
Commands used in Ritchie are grouped according to a tree.
It is important to know this concept in order to actually understand the structure of the product.
In the case of Ritchie, the Cobra (a Golang library) pattern was followed using the following logic of building core commands:
RIT + VERB + NOUN
To allow more options and freedom for users, it is also allowed to follow the pattern below in the construction of formula commands:
RIT + GROUP + VERB + NOUN
The app name is Ritchie, so we use the name
rit to start our command tree.
The rit command is therefore our parent command, or root. It is not executable (it means that it will not start any operations if you use it alone in the terminal), but has been configured to return the helper command.
It is necessary to use executable sub-commands (which are child commands, or branches, of the rit command) in order to start any process.
The executable commands in Ritchie are the commands located at the last level of the tree.
For example, in the image above:
rit set contextcommand is executable, as it is at the last level of the tree.
rit kafka createcommand is not executable as there is an executable topic subcommand, at the last level of the tree.
This command tree concept is the core of Ritchie’s structure.
rit add repocommand.
It refers to reusable input parameters that you can use in Ritchie (example: access data for any tool or api).
On Ritchie, each environment will have its own credentials, which can be necessary to execute specific formulas through the CLI.
For example: it’s possible to create a professional and a personal environments (or prod and staging) with different credentials, and switch from an environment to another according to the necessity.
On Ritchie’s context, a formula is a script that can be executed through a command line once it has been adapted to Ritchie structure. It allows the user to execute it locally or through Docker and with its necessary dependencies.
Depending on the formula, the user might need to inform input parameters.
Those input parameters can be informed in different ways:
A storage place you can organize features, commands or any files and/or files necessary to use a tool. On Ritchie, there are three repositories created to manage formulas, the server and contributions we receive.
It refers to a communication channel that allows input and output interconnection between a computer program and its environment.
On Ritchie, we use the standard input (stdin) to execute commands automatically.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.