CAST Profiler CLI reference

Every command-line option of the CAST Profiler CLI, the files each one produces, and the files and 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.

Synopsis

CAST-Profiler [-h] [-o OUTPUT] [-n NAME] [-tl] [-cl] [-na] [-ci] [-nb]
              [-of] [-v] [-nor]
              [["]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.
-ip, --ignore-patterns Path to an ignore patterns file. When supplied, its patterns replace the default exclusions entirely. Available in 2.0.5 and later.
-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 website external 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 The scan store, compressed with Zstandard. Compact enough to archive.
my-app-to-upload.json Always 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 is used A self-contained HTML report of a few megabytes that opens in any browser with no network access.

The contents of each file are described in Result files.

Files and folders excluded automatically

Updated in CAST Profiler CLI ≥ 2.0.5

The CAST Profiler CLI skips a default set of folders and files at collection time, wherever they appear in the tree. Files skipped this way are not counted and do not appear in the inventory, but from 2.0.5 they are listed under excludedNodes in the result file and counted in the N files out of M have been excluded from the analysis line of the log.

The defaults apply only when the CLI is run without -ip (--ignore-patterns). When an ignore patterns file is supplied, its patterns are the only exclusions applied and none of the defaults below are added to them. An empty file therefore disables exclusion entirely.

Category Excluded folders Excluded files
Version control .git, .hg, .svn .git (the pointer file in a Git submodule or linked work tree)
Node.js and npm node_modules, _cacache -
JavaScript and front-end builds .npm, .yarn, .pnpm-store, .parcel-cache, .next, .nuxt, .angular -
Python .venv, __pycache__, .pytest_cache, .tox -
Java and JVM .mvn, .gradle -
IDE and editors .idea, .vscode, .metadata, .history, .sonarlint -
Operating system _MACOSX, __MACOSX, .Trash .DS_Store
Cloud, DevOps and infrastructure .serverless, .terraform, .docker, .kube, .circleci, .azure, .aws -
CI and code hosting .github -
Caches .cache -
AI assistants .aider.tags.cache.v*, .amazonq, .augment, .claude, .cline, .clinerules, .codeium, .codex, .continue, .crush, .cursor, .factory, .gemini, .junie, .kilocode, .kiro, .opencode, .qwen, .roo, .specstory, .tabnine, .trae, .windsurf .aider.chat.history.md, .aider.conf.yml, .aider.input.history, .aiderignore, .aiexclude, .augment-guidelines, .clinerules, .codeiumignore, .continueignore, .cursorignore, .cursorindexingignore, .cursorrules, .geminiignore, .goosehints, .mcp.json, .rooignore, .roomodes, .rules, .windsurfrules, AGENTS.md, CLAUDE.local.md, CLAUDE.md, CRUSH.md, GEMINI.md, QWEN.md

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

Three consequences worth planning around:

  • Build output is collected. Compiled classes, scripts and minified bundles in target, build, dist or out are counted alongside the source they were built from, so the CAST Profiler figures can be noticeably higher than the CAST Imaging analysis figures. Exclude those folders with -ip if the delivery carries them.
  • Test code is not excluded. If your CAST Imaging scope excludes tests, the CAST Profiler figures will be higher than the analysis figures.
  • .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.

Earlier versions

Up to and including 2.0.4, the CAST Profiler CLI matched folder names only and applied a different default list. Compared with 2.0.5:

  • target, build, dist, out and vendor were excluded. A folder holding hand-written source that happened to carry one of those names was silently skipped.
  • .sonarlint and the AI assistant folders and files were not excluded.
  • .DS_Store was excluded only in the rare case that it is a folder. As the file it normally is, one was collected and counted in every folder of a delivery zipped up on a Mac.
  • Files skipped by the folder rules were not reported anywhere: they were absent from excludedNodes and from the log’s excluded count.

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

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.