Copy Prompt
cmd/crewship/cmd_copy_prompt.go recovers the first user prompt from a previous run and writes it to stdout or the system clipboard. The “I want to tweak this and rerun” workflow that doesn’t end with a network round-trip.
Why a top-level command rather than a flag on retry: copy-prompt is local; users routinely want to grab a past prompt, edit it in $EDITOR, and re-issue. Keeping it separate keeps crewship retry’s mental model (“rerun this exactly”) clean.
crewship copy-prompt <run-id>
| Flag | Type | Default | Effect |
|---|---|---|---|
--clipboard | bool | false | Copy via pbcopy / wl-copy / xclip / xsel instead of writing to stdout. Falls through to a clear error on headless servers. |
Examples
--clipboard, stderr gets [copied <n> chars to clipboard].
Re-issuing
Common errors
run <id> has no chat_id— the run pre-dates chat threading.could not recover prompt for run <id>— no USER/HUMAN-role message in the chat.no clipboard helper found (install pbcopy/wl-copy/xclip/xsel)— headless box or missing dependency.
See also
crewship retry <run-id>— uses the same recovery path internally.crewship history— find the run-id.crewship prompt save <name>— save the recovered prompt to your local library.