CLI reference / analyze

aiwritecheck analyze

Send one retained draft to the product analysis endpoint and print its report.

Invocation

Run the command.

aiwritecheck analyze --draft <ID> [--api-url <URL>]

Inputs and options

Accepted command line

Input or optionContract
--draft <ID>Required exact id of a draft in the configured CLI store.
--api-url <URL>Explicit analysis endpoint. Required unless AIWRITECHECK_API_URL declares one; there is no built-in production endpoint.

Behavior

Output and state effect

The command reads the retained text, posts it as JSON to the selected endpoint, and prints the normal report together with the source draft id and filename.

Endpoint precedence is --api-url, then AIWRITECHECK_API_URL. With neither, the command refuses before sending text. The CLI adds no credential option or authentication bypass.

Refusals

When the command stops

  • A missing --draft value, an unknown argument, or an option without its value is refused.
  • An id not present in the configured store is refused before a network request.
  • A non-success endpoint response is reported with its endpoint, HTTP status and complete returned body rather than printed as a successful report.
  • Invalid JSON or a non-object response is refused with the endpoint, HTTP status and full response body, not printed as a source-only success.

Browser-imported drafts use separate browser storage. See the GUI import guide for that workflow.