Welcome to Beatrix CLI Tool Documentation
Introduction
The Beatrix CLI tool is a tool for generating code from Beatrix Model (YAML) using a terminal.
System Requirements
- Docker;
- WSL - Windows Subsystem for Linux (for Windows environment);
Install
Using a terminal, go to your WORKSPACE folder and run the following command:
Linux:
1 2 3 4 5 |
|
This installs the tool in your $HOME folder and links to it in your current workspace folder.
Windows:
1 2 3 4 5 |
|
Please, review your PowerShell execution policies to allow scripts to run.
Usage
1-Preparing your Solution
Create a .bea folder in your solution and, inside it, create a file named Model.yaml, containing your solution model.
2-Configure
For the first use of the tool, you need to create a profile for communication with the Beatrix platform:
Linux:
1 |
|
1 |
|
The following inputs will be requested to create the profile:
- Profile Name: The same used in your solution's clitool.env file;
- Client Id: Provided by the Beatrix team;
- Client Secret: Provided by the Beatrix team;
- User Name: Your Beatrix Username;
- PIN: Create a PIN to protect your Beatrix credentials locally;
3-Login
You must open a session to use the Beatrix platform. After login, you can use the CLI tool for a few hours, without repeating the process.
Linux:
1 |
|
1 |
|
Note: You may be asked to enter your PIN from time to time.
The following input will be requested to login:
- Beatrix Password: Your Beatrix Password;
4-Create Solution
For the first time code generation, you must create a new related solution on the Beatrix platform.
Linux:
1 |
|
1 |
|
Note: A new file solution.json will be created in your .bea folder.
5-Pull new Version
To generate the source code using your Model.YAML file, run the command:
Linux:
1 |
|
1 |
|
Note: A new version.json file will be created in your .bea folder, and your solution files will be updated/generated. You can control the output folder using the variable OUTPUT_FOLDER in the clitool.env file.