Skip to content

CLI Reference ​

The writetighter binary provides five subcommands: lint (deterministic), revise (contextual), prompt (instructional), config (setup), and profile (management).

Commands ​

  • lint checks sentence length and paragraph density. No model required.
  • revise uses your configured model to provide rewrites and clarifications.
  • prompt prints revision instructions for delegation. No model required.
  • config interactive setup for model endpoints.
  • profile manages embedded or custom rule bundles.

--text, --stdin, and file/dir paths are mutually exclusive. Prefer --stdin for shell safety.

writetighter lint ​

Checks deterministic profile rules. For --kind code-comment, explicit supported source files (.go, TypeScript/JavaScript variants, .rs, .py, and .pyi) are lexed so only cataloged comments are linted; findings map back to the original source ranges. --stdin, --text, and unsupported extensions retain prose-style linting.

writetighter lint (PATH... | --stdin | --text STRING) [flags]

Flags ​

FlagDefaultDescription
--kinddescriptionSets sentence-length limit (see table below)
--formathumanhuman, json, or agent
--fail-onnonenone, warning, or error
--profileembedded defaultPin a specific ID@VERSION

Kinds ​

--kindUse forSentence limit
prPR/commit bodies20 words
procedureInstructions20 words
descriptionProse/READMEs25 words
code-commentInline comments25 words
referenceAPI/Config docs25 words
decisionADRs/Design docs25 words
incidentIncident reports25 words
agent-instructionSkills/Prompts25 words
status-updateStatus/Diagnostics25 words

writetighter revise ​

Provides contextual rewrites and clarifications. For --kind code-comment, explicit supported source files (.go, TypeScript/JavaScript variants, .rs, .py, and .pyi) use a whole-file, lexer-owned comment catalog: only cataloged comments can be findings, and reported source text/ranges are catalog-owned. --stdin, --text, and unsupported extensions keep the legacy prose-style code-comment path. Code-aware file review rejects --reference until bounded cross-file context is supported. Review remains advisory and never applies edits.

writetighter revise (PATH... | --stdin | --text STRING) [flags]

Flags ​

FlagDefaultDescription
--kinddescriptionDocument kind (see lint kinds table)
--formatjsonjson or human
--profileembedded defaultPin a specific ID@VERSION
--reference(none)Path to reference file or directory (repeatable)
--modelconfigOverride the configured model for this run
--code-modelconfigOverride the model for code-aware comment revision
--context-tokensauto-detectOverride model context window (0 = auto-detect from /v1/models)
--output-tokensdefaultOverride max output tokens sent to the API (0 = default when context window is known)

Output is JSON. Each item in revisions[] is either a rewrite or a clarification.

When --reference is used, revise auto-detects the context window from the /v1/models endpoint. Use --context-tokens to override if the endpoint does not report context metadata.

writetighter prompt ​

Prints revision instructions for subagent delegation.

sh
writetighter prompt --kind code-comment

writetighter config ​

Interactive setup for OpenAI-compatible endpoints. Writes to ~/.config/writetighter/config.toml.

Flags ​

FlagDescription
--wizard, -wRun the interactive configuration wizard
--modelSet model ID (re-preflights and refreshes response mode)
--code-modelSet the model used for code-aware comment revision

When already configured, config prints the current configuration with the API key redacted. The wizard auto-detects context capacity from /v1/models but does not persist it — revise auto-detects at runtime instead.

Optional [llm] code_model in the config file specifies a different model for code-aware comment revision, so you don't need to pass --code-model on every invocation.

writetighter profile ​

sh
writetighter profile list
writetighter profile verify software-docs-en@0.6.0
writetighter profile install ./path/to/bundle

Exit codes ​

CodeMeaning
0Success
1lint findings reached --fail-on
2Usage, config, or input error
3revise model call failed