Skip to content

fix(cli, docs): Refactor CLI help and model flag names - #422

Open
Gr-i-niy wants to merge 4 commits into
mainfrom
Gr-i-niy/cli-improvements
Open

Gr-i-niy wants to merge 4 commits into
mainfrom
Gr-i-niy/cli-improvements

Conversation

@Gr-i-niy

@Gr-i-niy Gr-i-niy commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

No description provided.

misonijnik and others added 4 commits November 3, 2026 09:31
Every command's Long text follows simplified technical English: short
sentences, one instruction per sentence, active voice. Every command has
an Examples section that ends with recipes for complete use cases.

The end of a run prints the analyzer error, then what to do next: the
log file, a retry with a larger --timeout or --max-memory for the
analyzer exit codes that call for it, or a re-run with --debug. Re-run
suggestions quote shell metacharacters, and drop --dry-run when the
dry run tells you how to run for real.

The exit-code tables of scan and the test commands are built from the
analyzer's own exit messages. The test tables keep the note that an
unhandled analyzer exception prints the analyzer log path.

The docs and skills that mirror this help are updated in a later branch.
Every Long text says what the command does in one or two sentences and
keeps only the facts that the flag list and usage line do not show:
that --output must not exist, that downgrades are not supported, how a
Homebrew or npm install is updated, which categories prune removes by
default. Positional arguments are described in an Arguments section and
named <arg> when required and [arg] when optional. Paragraphs end without
a period.

Examples remain where the use is not obvious from the flags, one command
each: scan, compile, project, health, summary, model init, and the test
commands. pull, update, prune, and the command groups have none.

Flag help is checked against the code:
- --java-version selects the Java that compiles projects when no system
  Java is found. The analyzer always runs on the default Java version
- --code-flow-limit limits the code flows of each finding
- scan -o defaults to <project-model>/sources/opentaint.sarif
- --log-file defaults to a timestamped file in ~/.opentaint/logs
- --ruleset replaces the built-in rules unless builtin is also given
- scan and the other commands download a missing component, so the help
  no longer says to run pull before the first scan

The analyzer rows of the exit-code tables start with a capital letter,
like the rows above them.
test rule init and test model init now write the rule-test.yaml file
that the analyzer reads from the test project root. Before, the file was
missing, the init hint asked to edit it, and a test run without it ended
with an analyzer exception.

The model test template declares the fixed rule model-rule.yaml#model-rule
with empty positive and negative lists. The rule test template has an
empty tests list, because the rule under test is not known at init, and
shows the entry format in a comment. An existing rule-test.yaml holds the
samples of the user and is kept.

The next-step hints follow the test flow:
- compile of a test project suggests test rule run or test model run
  instead of a scan
- model init suggests test model run with the new model project
- compile models suggests a scan of the sources with the models
opentaint approximation --help and opentaint test approximation --help
printed an empty usage: cobra does not list the subcommands of a group
when they are deprecated, and all of them are. The help of a deprecated
group is now the help of the group that replaces it, after the
deprecation notice. The subcommands keep their own help.
@Gr-i-niy
Gr-i-niy force-pushed the Gr-i-niy/cli-improvements branch from 344dc9a to 7faeaca Compare November 3, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants