fba-cli: A CLI (command line interface) to execute FBA (fishbone analysis
) files with DLT-logs/adlt
Executes fishbone-analysis files (fba) from the Visual Studio Code(tm) extension 'fishbone' standalone - without vscode - on the console.
Execution performs:
- run all badges queries on a list of provided DLT logs
- generate a markdown report with any output from either the upper or the lower badge of all root causes.
- Can be used to export embedded dlt-filters from the fishbone to be used with DLT-Viewer.
Preconditions:
- Installed
adlt
and available in path. Check in terminal/console e.g. viaadlt --version
-
node.js
v22 or higher installed. Check vianode --version
- Install fba-cli via
npm install fba-cli -g
- If adlt plugins shall be used a config file in json/jsonc/json5 format with
example json config file...
Call from terminal/console
# fba-cli exec -c <config_file> <list of fba files> <list of DLT files>
# e.g.
fba-cli exec -c config.json analysis.fba recorded.dlt recorded_p2.dlt > analysis_report.md
if you dont have adlt in path you can start it manually with the options
cd 'path where adlt binary is installed'
adlt remote -p 7777
and then use fba-cli
:
# fba-cli exec -p host:port -c <config_file> <list of fba files> <list of DLT files>
# e.g.
fba-cli exec -p 127.0.0.1:7777 -c config.json analysis.fba recorded.dlt recorded_p2.dlt > analysis_report.md
Powershell seems to default to utf-16 and not utf-8. If you redirect the output to a file you do need to change the encoding first:
$OutputEncoding = [Console]::InputEncoding = [Console]::OutputEncoding = [System.Text.UTF8Encoding]::new()
# fba-cli exec -p host:port -c <config_file> <list of fba files> <list of DLT files>
# e.g.
npm.cmd run fba-cli exec -p 127.0.0.1:7777 -c config.json analysis.fba recorded.dlt recorded_p2.dlt > analysis_report.md
# seems that powershell doesnt allow the binary/scripts to be directly executed. In that case you can start via:
node dist\index.js exec -p 127.0.0.1:7777 -c config.json analysis.fba recorded.dlt > analysis_report.md
alternatively you can use the -o
option to write the output file directly:
# fba-cli exec -p host:port -c <config_file> -o <output_file> <list of fba files> <list of DLT files>
# e.g.
npm.cmd run fba-cli exec -p 127.0.0.1:7777 -c config.json -o analysis_report.md analysis.fba recorded.dlt recorded_p2.dlt
# seems that powershell doesnt allow the binary/scripts to be directly executed. In that case you can start via:
node dist\index.js exec -p 127.0.0.1:7777 -c config.json -o analysis_report.md analysis.fba recorded.dlt
# fba-cli export -f dlt-viewer <name of fba file> <name of zip file containing the .dlf filters>
fba-cli export -f dlt-viewer analysis.fba analysis_filters.zip
- included messages from all badge queries that provided an output
- support graphical reports as well
- embedded markdown background descriptions will not be properly formatted
Any and all test, code or feedback contributions are welcome. Open an issue or create a pull request to make this tool/lib work better for all.
This project leverages third party content. For details see the dependencies
and devDependencies
section in package.json
.
Thanks to all contributors!