Skip to content

Run Understand from the command line (und)

und creates and updates Understand projects and automates analysis, metrics, reports, and CodeCheck — headless, ideal for CI. Every command's full reference is available as und help <command> (und help alone lists every command), and the same content is browsable in the und command reference — see also the reference page for how the two relate.

Starting sequence

New to und? Three commands get you a working project:

und -db myProject.und create -languages c++     # 1. make an empty database
und -db myProject.und add /path/to/src          # 2. add source (type auto-detected; directory otherwise)
und -db myProject.und analyze                   # 3. parse it

Each step has its own reference page: und create, und add, and und analyze.

Chain them into one invocation

You can also give several commands to a single und call — they run in order, then und exits:

und -db myProject.und create -languages c++ add @myFiles.txt analyze -all

All switches and arguments for a command must appear between that command and the next one, so analyze -all above belongs to analyze, not to add. This is the same sequence you'd type in interactive mode, on one line.

help and list end the line

Everything after them is taken as their argument rather than a new command, so nothing chains after them — und help create analyze reports analyze as an unused argument. That's what lets und list settings myProject.und work, since settings is also a command name in its own right.

Global options (work with any command)

Option Effect
-db <database.und> The database to operate on (or give it as the last argument; must end in .und).
-quiet Suppress normal output; only errors/warnings.
-verbose Extra, verbose output.

These are global — they apply to the whole command line, including every command in a chain, not just the command they happen to follow. und accepts them anywhere, but these docs put -db before the command (or pass the database as the last argument) so that scope is obvious at a glance. The full list of global options is on the und options reference page.

Ready to chain the commands into a full analyze → check → report run? See the headless workflow, and to run it on every commit, Run Understand in a CI pipeline.