# Tensormorph CLI

The `tmorph` command line tool runs the same indexing, statistics, and validation logic the desktop application uses, without a UI - for scripting, pipelines, and headless machines that don't have a display at all.

`tmorph index` is a confirmed command; the additional subcommands below are illustrative of the CLI's intended shape, not a confirmed full command reference.

## Indexing a checkpoint

```
tmorph index <path> [--pyramids]
```

Builds the `.tmidx` file (Semantic Model Graph plus [tile statistics](/docs/inspect-and-analyze/tensor-statistics)) for a checkpoint. Pass `--pyramids` to also precompute the full [level-of-detail pyramid](/docs/core-concepts/level-of-detail-and-streaming) (`.tmtiles`) ahead of time, so a later interactive session doesn't pay that cost on first open. Indexing is idempotent and safe to re-run - see [File Formats](/docs/reference/file-formats) for why the generated files are always a derived cache, never a source of truth.

## Querying from the command line

```
tmorph query <path> "<TQL expression>"
```

Runs a [TQL](/docs/reference/expressions-and-queries) expression against an already-indexed checkpoint and prints matching results - the same query language used interactively in the Console, usable in a script without launching the desktop app.

## Validating a checkpoint

```
tmorph validate <path> [--rules <ruleset>]
```

Runs the same diagnostics that populate the Problems panel interactively (NaN/Inf detection, statistical outliers, import warnings) and exits non-zero if any Error-severity diagnostic is found - see [CI Validation](/docs/cli-and-automation/ci-validation) for using this in a pipeline.

## Rendering without a display

```
tmorph render <path> --view <view-name> --out <file>
```

Produces a static image or report of a given view without an interactive session - see [Headless Rendering](/docs/cli-and-automation/headless-rendering).

## Related resources

-   [Batch Inspection](/docs/cli-and-automation/batch-inspection) - running `tmorph` across many checkpoints at once.
-   [Lob CLI](/docs/cli-and-automation/lob-cli) - the separate CLI for Lob itself, distinct from `tmorph`.
-   [File Formats](/docs/reference/file-formats) - the artifacts `tmorph` commands produce.
