Commands

Every command and every option. --help shows them in the terminal too.

  • trailsbi

    build the page

  • trailsbi diff

    what changed, and what breaks

  • trailsbi scan

    a security check

  • trailsbi runs

    the saved runs

trailsbi

Builds the page of a project, or of a folder with several.

trailsbi [PROJECT ...] [options]

PROJECT is a .pbip file, the folder that holds it, a .Report folder, or a folder with several projects. Give several folders to read several workspaces together. Without one, it's the folder you're in.

Option What it does
-o, --output Where to write the page: a file, whose name the page shows too, or a folder that exists, for the usual name. With --split, the folder to write into. Without it, TrailsBI Report - <project> - <date time>.html in the folder you're in
--open Opens the page when it's ready
--embed Shows it inside Power BI. Writes the HTML page only with -o or --open
--run NAME Names this run, so you can find it again and it's kept
--no-save Doesn't save this run. Not together with --run
--filter FILE Builds what a filter file says
--version Prints the version
--help Prints the options

In a folder with several reports and models, these choose what to build. Without them the whole folder is built.

Option What it does
--list Lists the semantic models and reports, and builds nothing
-m, --model Builds this semantic model
-r, --report Builds this report
-w, --workspace Builds the reports and models of this workspace
--with-reports Also builds every report on the chosen models
--split Writes one page per semantic model

Repeat -m, -r and -w, or separate names with commas. Wildcards (*, ?) work.

trailsbi diff

Compares two versions and writes what changed and what breaks. Old first, then new.

trailsbi diff [OLD] [NEW] [options]

OLD and NEW are each a project or folder, or a saved run: run:12, run:release-12 or run:last. With one project, it's the new version, and it's compared with its last saved run that differs. With one run, that is the old version, and the project is the new one. Without any, it's the project in the folder you're in.

Option What it does
-o, --output Where to write the report: a file, whose extension (.html, .md, .json) can say the format, or a folder. Without it, TrailsBI Diff - <project> - <date time>.html in the folder you're in
--md, --json Writes Markdown, JSON or both, instead of the page
--open Opens what is written
--project PATH The project that saved runs belong to: the other side when it's a folder, else the one you're in

trailsbi scan

Looks through a project for secrets, typed rows, picked values and merge conflicts.

trailsbi scan [PROJECT ...] [options]
Option What it does
-o, --output Where to write the report, as for diff. Without it, TrailsBI Scan - <project> - <date time>.html in the folder you're in
--md, --json Writes Markdown, JSON or both, instead of the page
--open Opens what is written
-m, -r, -w Scans this semantic model, report or workspace of a folder

trailsbi runs

Lists and deletes saved runs.

trailsbi runs [PROJECT ...] [options]
Option What it does
--all Lists every project with saved runs
--delete RUN Deletes the run with this number or name, or all of the project's runs. With --all, the runs of every project

Environment variables

Variable What it does
TRAILSBI_HISTORY Where runs are saved: the full path of a folder, or off
CI, TF_BUILD, GITHUB_ACTIONS When one is set, it's a build server, and no runs are saved unless TRAILSBI_HISTORY names a folder

Exit codes are 0 when it did what was asked, 1 when a file could not be read or written, and 2 when the arguments are wrong or there is nothing to work on.