CLI Reference
Use tq through a subcommand-first CLI with a strict contract surface.
Distribution and invocation
Published PyPI distribution: tqlint.
Installed command: tq.
For install and setup, see Quickstart.
Command model
Primary command:
tq check
This command surface is designed for:
- deterministic diagnostics
- explicit rule-selection controls
- machine-readable reporting for CI tooling
tq check options
The table below documents command options.
| Flags | Config key | Default | Description |
|---|---|---|---|
--config | — | none | Use this pyproject file instead of discovered configuration. |
--isolated | — | false | Ignore discovered configuration files. |
--target | — | [] | Run only listed target names. |
--init-modules | init_modules | none | How mapping checks handle init.py modules. |
--max-test-file-non-blank-lines | max_test_file_non_blank_lines | none | Maximum non-blank, non-comment lines per test file. |
--qualifier-strategy | qualifier_strategy | none | Module-name qualifier policy for qualified test files. |
--allowed-qualifier | allowed_qualifiers | [] | Allowed qualifier suffix for allowlist strategy. |
--select | select | [] | Only run selected rule IDs. |
--ignore | ignore | [] | Skip listed rule IDs. |
--severity | severity_overrides | [] | Override severity for a specific rule ID. Repeatable. |
--output-format | — | text | Select output format. |
--show-suggestions | — | false | Render remediation suggestions in diagnostics output. |
--exit-zero | — | false | Always exit with code 0 regardless of findings. |
--fail-on | fail_on | error | Minimum severity level that causes a nonzero exit. When omitted, the effective default is error unless configuration overrides it. |
Run tq check --help for the runtime source of truth.
Output formats
tq check supports:
text(default): concise terminal diagnosticsjson: machine-readable diagnostics payload
When text output is written to an interactive terminal, tq styles success and severity labels. Redirected or captured text output stays plain so automation and golden tests remain stable. Set NO_COLOR=1 to disable terminal styling.
Use:
sh
tq check --output-format jsonJSON findings include stable fields:
rule_idseveritymessagepathlinesuggestiontarget
JSON summary includes:
errorswarningsinfostotal
Language support
tq currently targets Python codebases.