CLI reference
The tibyan command-line tool surveys a Spring application from source and generates artifacts by hand. It is the manual counterpart to the Maven plugin. Everything it does is read-only with respect to your application.
Getting the CLI
The CLI ships as one self-contained jar on Maven Central. It needs only Java 17 and never runs your application.
curl -O https://repo1.maven.org/maven2/io/github/tibyaan-org/tibyan-cli/0.3.0/tibyan-cli-0.3.0-jar-with-dependencies.jarInvoke it as java -jar <jar> <command> [options]. To keep commands short, define a wrapper once. Every example below uses it.
TIBYAN="/path/to/tibyan-cli-0.3.0-jar-with-dependencies.jar"
tibyan() { java -jar "$TIBYAN" "$@"; }$TIBYAN = "C:\path\to\tibyan-cli-0.3.0-jar-with-dependencies.jar"
function tibyan { java -jar $TIBYAN @args }Commands at a glance
| Command | Purpose |
|---|---|
scan | Resiliently survey a system's source. Never aborts on a bad file. |
generate | Generate a backend (MCP or OpenAPI) from a model file, or by scanning a path (strict). |
attest | Stamp fingerprints into the attestations file, and confirm one drafted entry. |
validate | Validate a model JSON file without generating. |
version | Print the tool and model schema versions. |
On any command, -h or --help prints usage (tibyan scan --help), and -V or --version prints the tool version. Running tibyan with no command prints the usage summary.
Exit codes
Every command uses one convention.
| Code | Meaning |
|---|---|
0 | Success. |
1 | Usage error: bad or missing arguments, or an unknown backend. |
2 | Validation failure: the model did not pass semantic validation, so no artifact was written. |
3 | Provider or backend error: the source is missing or unwalkable, or generation failed. |
tibyan scan
Read a system from source and survey it. This is the resilient path: it walks the entire source tree, parses collect-and-continue, classifies every entity it can read, and names every file it cannot parse. It never aborts on one unparseable file, and it never emits a wrong binding.
tibyan scan <path> [--out <ir.json>] [--report <report.md>]| Name | Required | Description |
|---|---|---|
<path> | yes | Path to the system (its source root) to scan. |
--out <ir.json> | no | Write the discovered model as JSON. Written only if the model validates; otherwise nothing is written and the command exits 2. The survey still prints. |
--report <report.md> | no | Write a human-readable Markdown survey: a summary table, the operable subset with its bindings, the grouped refusals with located reasons, and the single most common blocker. Independent of --out. |
Exit codes: 0 the survey completed, whatever it discovered, including zero; 2 --out was given but the model did not validate; 3 the path is missing, is not a directory, or cannot be walked. For how to read the output, see Reading your survey.
tibyan scan /path/to/app # survey to the console
tibyan scan /path/to/app --report report.md # shareable Markdown survey
tibyan scan /path/to/app --out app.ir.json # write the model (only if it validates)
tibyan scan /path/to/app --out app.ir.json --report report.mdtibyan generate
Generate a backend from a model file, or by scanning a path directly. Generating from a <path> uses the strict provider, not the resilient scan: it refuses any unparseable file or unresolvable binding rather than producing a partial artifact. Generation is deterministic: the same model in produces the same files out.
tibyan generate --backend <mcp|openapi> --out <dir> (--ir <ir.json> | <path>)| Name | Required | Description |
|---|---|---|
--backend <backend> | yes | mcp or openapi. |
--out <dir> | yes | Output directory for the generated files. |
--ir <ir.json> | either this | Model JSON file to read. |
<path> | or this | Path to scan (strict) when --ir is not given. |
| Backend | Files written |
|---|---|
mcp | <out>/tibyan/capabilities.json, the MCP server manifest. |
openapi | <out>/openapi.json, an OpenAPI 3.0 document. |
Exit codes: 1 unknown backend, or neither --ir nor a path was given; 2 the model did not validate; 3 provider or backend error.
tibyan generate --backend mcp --ir app.ir.json --out ./generated
tibyan generate --backend openapi --ir app.ir.json --out ./generated
tibyan generate --backend openapi --out ./generated /path/to/app # scan directly (strict)The generated .java files
The MCP backend also writes one tool class per capability. For the Spring adoption path you do nothing with them: the runtime reads the manifest. They exist for a separately hosted, standalone generated project.
tibyan attest
Two actions on your committed tibyan/attestations.json. The tool never writes a claim's words in either action: the meaning is always the human's. The concepts are in Attestation.
tibyan attest <path> [--date <yyyy-mm-dd>]
tibyan attest <path> --confirm <target> --by <name>Stamping (the default action)
Computes the structural fingerprint of each entry's slice over the current code and writes it back, with --date optionally stamping the assertion date. This is the only path that stamps a fingerprint, so a fingerprint always arrives together with the code it pins. A hand-authored entry without one is refused at intake rather than silently completed.
tibyan attest /path/to/app --date 2026-09-01Confirming a draft
An entry whose origin is ai-draft is a proposal, not a claim. It ships nothing. Confirming it is the human act that turns it into a claim:
tibyan attest /path/to/app \
--confirm "com.example.TenantServiceImpl#getAllByFilter(String,Integer)" \
--by a.reviewerThat rewrites exactly that entry's origin to ai-drafted-human-confirmed and records you in assertedBy. Then stamp it and re-scan. There is no confirm-all: a team with ten drafts reviews ten drafts.
Exit codes: 0 the file was stamped, or the named draft was confirmed; 1 --confirm did not apply (no such target, not a draft, or no --by); 3 the path is missing or cannot be walked.
tibyan validate
Validate a model JSON file against the semantic rules, without generating anything. Useful before feeding a hand-edited or externally produced file to generate.
tibyan validate --ir app.ir.jsonExit codes: 0 valid, and a one-line summary prints; 2 invalid, and the located errors print; 3 the file cannot be read or parsed.
tibyan version
Prints the tool version and the model schema version. tibyan --version prints just the tool line.
A typical session
tibyan scan /path/to/app --report report.md # 1. what is operable, what is refused, and why
tibyan scan /path/to/app --out app.ir.json # 2. write the model when the survey looks right
tibyan validate --ir app.ir.json # 3. optional; generate validates too
tibyan generate --backend mcp --ir app.ir.json --out ./generated
tibyan generate --backend openapi --ir app.ir.json --out ./generatedFor most adopters the Maven plugin performs these steps automatically during the build. The CLI and the plugin generate identical output for the same source.
The authoritative text is docs/CLI.md (opens in a new tab) in the repository. If this page and that document ever disagree, the repository wins.