CLI reference / draft / import

undetectabletext draft import

Validate and retain one plain-text draft locally without making a rewrite request.

Invocation

Run the command.

undetectabletext draft import <PATH> [--new-version]

Inputs and options

Accepted command line

Input or optionContract
<PATH>Path to one regular .txt file containing valid UTF-8 and text that is nonempty after surrounding whitespace is ignored. No product length limit is imposed.
--new-versionWhen the same canonical path now has different text, retain the new text as another version instead of reporting a conflict.

Behavior

Output and state effect

The command resolves the source to its canonical path, validates the complete file, and only then writes the next draft store.

An identical canonical path and text returns unchanged. Different text at an existing path returns conflicting and preserves the stored row unless --new-version is present.

The JSON result reports imported, unchanged, conflicting, or rejected status. Import is offline and sends no text to the rewrite API.

Refusals

When the command stops

  • A missing or extra positional argument is refused.
  • A directory, a non-.txt file, invalid UTF-8, or whitespace-only text is rejected before the store changes.
  • A changed draft at an already retained canonical path is refused unless --new-version is explicit.

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