Skip to content

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.

FlagsConfig keyDefaultDescription
--confignoneUse this pyproject file instead of discovered configuration.
--isolatedfalseIgnore discovered configuration files.
--target[]Run only listed target names.
--init-modulesinit_modulesnoneHow mapping checks handle init.py modules.
--max-test-file-non-blank-linesmax_test_file_non_blank_linesnoneMaximum non-blank, non-comment lines per test file.
--qualifier-strategyqualifier_strategynoneModule-name qualifier policy for qualified test files.
--allowed-qualifierallowed_qualifiers[]Allowed qualifier suffix for allowlist strategy.
--selectselect[]Only run selected rule IDs.
--ignoreignore[]Skip listed rule IDs.
--severityseverity_overrides[]Override severity for a specific rule ID. Repeatable.
--output-formattextSelect output format.
--show-suggestionsfalseRender remediation suggestions in diagnostics output.
--exit-zerofalseAlways exit with code 0 regardless of findings.
--fail-onfail_onerrorMinimum 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 diagnostics
  • json: 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 json

JSON findings include stable fields:

  • rule_id
  • severity
  • message
  • path
  • line
  • suggestion
  • target

JSON summary includes:

  • errors
  • warnings
  • infos
  • total

Language support

tq currently targets Python codebases.