CLI reference / rewrite

undetectabletext rewrite

Send one retained draft and explicit rewrite settings to the product endpoint.

Invocation

Run the command.

undetectabletext rewrite --draft <ID> [--tone <VALUE>] [--length <VALUE>] [--language <VALUE>] [--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.
--tone <VALUE>natural (default), professional, conversational, confident, or concise.
--length <VALUE>similar (default), shorter, or expanded.
--language <VALUE>auto (default), English, Polish, Spanish, French, or German. Named language values are case-sensitive.
--api-url <URL>Explicit rewrite endpoint. Required unless UNDETECTABLETEXT_API_URL declares one; there is no built-in production endpoint.

Behavior

Output and state effect

The command reads the retained text, posts it with tone, length, and language as JSON, and prints the normal result together with source metadata and the selected settings.

Endpoint precedence is --api-url, then UNDETECTABLETEXT_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 unsupported tone, length, or language is refused before a network request.
  • 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 response body rather than printed as a successful rewrite.
  • Invalid JSON, a non-object response, or an object without non-empty rewritten text is refused with the endpoint, HTTP status and full response body, not printed as a source-and-settings-only success.

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