The main concepts on Ritchie are
It is a command line interface, which is a program that processes commands in a software or any computing program only through text.
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, 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 context
command is executable, as it is at the last level of the tree.rit kafka create
command 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 repo
command.It is the reusable input parameters you can use in Ritchie (for example: access data for any tool or api).
On Ritchie, each environment will have its own credentials, it may 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.
In Ritchie’s context, the formulas are scripts executed through a command line. The user can execute it locally or through Docker with the necessary dependencies.
Depending on the formula, the user might need to inform input parameters.
Those input parameters can be informed in different ways:
JavaScript Object Notation (JSON), it is a standard text based format used to structure data created with JavaScript programming language.
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 is a communication channel that allows input and output interconnection between a computer program and its environment.
On Ritchie, the standard input (stdin) is used 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.