CLI reference / draft / remove
undetectabletext draft remove
Take one retained draft out of the local store; the inverse of draft import.
Invocation
Run the command.
undetectabletext draft remove <ID>Inputs and options
Accepted command line
| Input or option | Contract |
|---|---|
<ID> | Exact draft id returned by draft import or draft list. |
Behavior
Output and state effect
The command reads the local store, drops the matching record, and writes the next store. The source file the draft was imported from is not touched.
The JSON result reports action remove, status removed, removed 1, the number of drafts still held, the store path, and the removed draft's id and source filename.
Removal is offline and sends nothing to the rewrite API. A removed draft is gone: running the command again with the same id is refused, so nothing is removed twice.
Refusals
When the command stops
- A missing or extra id is refused with the usage line and exit status 2.
- An id not present in the configured store is reported as `draft <ID> is not in <store>; run undetectabletext draft list`, exit status 1, and the store is not written.
- Malformed JSON or an unsupported store shape is reported instead of being treated as an empty store.
Browser-imported drafts use separate browser storage. See the GUI import guide for that workflow.