CAST Profiler CLI reference

Every command-line option of the CAST Profiler CLI, the files each one produces, and the folders excluded from a scan automatically

Overview

The CAST Profiler CLI ships as a single self-contained executable. This page documents its command line: the options, what each one changes about the generated output, and the behaviour that is not obvious from the built-in help text. The examples were verified against CLI version 2.0.3.

Synopsis

CAST-Profiler [-h] [-o OUTPUT] [-n NAME] [-tl] [-cl] [-na] [-fc] [-ci]
              [-nb] [-of] [-v] [-nor]
              SOURCE_FOLDER [SOURCE_FOLDER ...]

The executable is CAST-Profiler.exe on Windows and CAST-Profiler on Linux. No native macOS build is published, so on macOS the same command line is run through the container image.

Source folders

One or more source folders are given as positional arguments. Separate multiple folders with spaces, and quote any path containing a space:

$ ./CAST-Profiler --offline --name my-app "/src/back end" /src/frontend

Scanning several folders as one application sets isMultipleDirectories in the result file and reports a combined inventory.

Options

Option Description
-h, --help Displays usage information and exits.
-o, --output The folder that will contain the CAST Profiler CLI analysis report files. Created if it does not exist.
-n, --name The application or project name. Used as the prefix of every generated file name and as the application name on the results page.
-ci, --complete-insight Uploads the analysis results to CAST Profiler to create a complete information-rich results page.
-of, --offline Prevents analysis results from being uploaded to CAST Profiler and disables automatic browser opening.
-nb, --no-browser Prevents the browser from opening automatically after the analysis results have been uploaded to CAST Profiler.
-nor, --no-offline-report Prevents generation of the offline insight HTML report.
-fc, --file-collector Generates only a .json file listing all the analyzed files and their classifications. See the note below.
-tl, --text-log Replaces the progress bar with a plain text log of the form #files = file#/total# (progress %).
-cl, --clean-log Disables both the progress bar and plain text log, keeping the output clean.
-na, --no-alerts Prevents the CAST Profiler CLI from calculating the alerts for which it is responsible.
-v, --version Displays the CAST Profiler CLI version and exits.

Choosing a mode

The CAST Profiler CLI always scans your source code on your own machine. What differs between the two modes is whether the derived results are sent to CAST Profiler, the cloud service, so that the full results page can be rendered.

Mode CLI option What happens
Complete insight -ci The scan runs locally. The derived results file is uploaded to CAST Profiler, which renders the full results page in your browser.
Offline -of The scan runs locally. All output files stay on your machine, including a self-contained HTML report. Nothing is uploaded.

In both modes the source code itself never leaves your machine. With -ci the file that is uploaded is the derived results file described in Result files, not your code.

If you scan offline and later decide you want the full results page, you can upload the derived result file (named my-app-to-upload.json) by hand from the CAST Profiler websiteexternal link without scanning again.

Generated files

Every file is written to the -o folder and prefixed with the -n name. With -n my-app:

File Produced when Contents
my-app.json.zs Always, unless -fc is used The scan store, compressed with Zstandard. Compact enough to archive.
my-app-to-upload.json Always, unless -fc is used The derived evaluation results. This is the file uploaded by -ci, and the file you upload by hand on the website.
my-app-insight-report.html Unless -nor or -fc is used A self-contained HTML report of a few megabytes that opens in any browser with no network access.
my-app-inventory.json -fc The file inventory.

The contents of each file are described in Result files.

Folders excluded automatically

The CAST Profiler CLI skips a fixed set of folder names at collection time, wherever they appear in the tree. Files inside them are not counted and do not appear in the inventory. All 40 names below were verified against 2.0.3:

Category Excluded folder names
Version control .git, .svn, .hg
Node.js and npm node_modules, _cacache
JavaScript and front-end builds .npm, .yarn, .pnpm-store, .parcel-cache, .next, .nuxt, .angular, dist, build
Python .venv, __pycache__, .pytest_cache, .tox
Java and JVM .mvn, .gradle, target
IDE and editors .idea, .vscode, .metadata, .history
Cloud, DevOps and infrastructure .serverless, .terraform, .docker, .kube, .circleci, .azure, .aws
CI and code hosting .github
Operating system .DS_Store, _MACOSX, __MACOSX, .Trash
Dependencies and packaging vendor, out
Caches .cache

Folder names that are commonly assumed to be excluded but are not, also verified: bin, obj, packages, venv, .m2, site-packages, _build, test, tests, docs, coverage, logs, tmp, temp.

Four consequences worth planning around:

  • target, build, dist and out are excluded by name. A folder holding hand-written source that happens to carry one of those names is silently skipped, and the missing files are not reported as excluded.
  • Test code is not excluded. If your CAST Imaging scope excludes tests, the CAST Profiler figures will be higher than the analysis figures.
  • The rule matches directory names only, so .DS_Store is skipped only in the rare case that it is a directory. As the file it normally is, one lands in every folder of a delivery zipped up on a Mac and each is collected and counted.
  • .github is excluded, so workflow files are not inventoried and the repository’s CI configuration is invisible to the scan, even though it often describes how the application is built.

The N files out of M have been excluded from the analysis line in the log counts files rejected during the scan itself, not files skipped by these folder rules.

Examples

Unattended local scan, no upload, quiet output:

$ ./CAST-Profiler --offline --clean-log --output ./profiler-out --name my-app /src/my-app

Scan and publish the full results page without opening a browser:

$ ./CAST-Profiler --complete-insight --no-browser --text-log --output ./profiler-out --name my-app /src/my-app

Windows, skipping the HTML report:

CAST-Profiler.exe --offline --no-offline-report --output C:\profiler-out --name my-app C:\src\my-app

File inventory only:

$ ./CAST-Profiler --file-collector --clean-log --output ./profiler-out --name my-app /src/my-app

Reading the log

A successful run reports the reference data it loaded before it starts, which is worth capturing in a pipeline log because it determines what the scan can recognise:

CAST-Profiler CLI Version: 2.0.3
File-type profiler Library version 18.20260722.0
809 languages loaded, timestamp: 2026-07-22 06:12:39.27586+00
1670 bindings loaded, timestamp: 2026-07-20 16:16:43.365988+00
Collecting files (file-type profiling is enabled, version 18.20260722.0)...
Collected 7 files overall (duration: 0.00 seconds).
Running CAST Profiler analysis...

The CLI exits with 0 on success.