Prompt
cmd/crewship/cmd_prompt.go is a server-free prompt library. Save common prompts once as <name>.md files under ~/.crewship/prompts/, then reach for them from crewship ask --prompt @<path> or pipe via stdin. Plain markdown — portable, grep-able, dotfile-trackable.
Name validation
Names are restricted toa-z A-Z 0-9 - _ ., max 64 characters, can’t start with ., can’t be . or ... Path-traversal-safe (prompt save ../etc/passwd → invalid character "/").
crewship prompt list
Lists saved prompts as a sortable table (NAME, SIZE, MODIFIED).
No prompts saved. Try: crewship prompt save <name>.
crewship prompt save <name>
Writes ~/.crewship/prompts/<name>.md. Content precedence: --content > --file > stdin.
| Flag | Type | Default | Effect |
|---|---|---|---|
--content <text> | string | (unset) | Inline content; overrides stdin and --file. |
--file <path> | string | (unset) | Read content from this file. |
no content: pass --content, --file, or pipe content via stdin (when stdin is a TTY and neither flag is set).
crewship prompt use <name>
Prints a saved prompt to stdout. Pipe into ask or run.
crewship prompt path <name>
Prints the absolute filesystem path. Designed for shell composition:
crewship prompt edit <name>
Opens the prompt in $EDITOR (falls back to vi). Creates the file if missing. $EDITOR is split on whitespace so values like code -w or vim -c "set wrap" work correctly — the first token is the binary, the rest are leading args, and the prompt path is appended.
crewship prompt delete <name>
Aliases: rm. Removes the saved prompt.
Did-you-mean suggestions
use, path, edit, and delete all run a fuzzy match on not-found errors:
chmod 000 on the directory.
See also
crewship ask --prompt @<path>— consume a saved prompt.crewship slash— full slash commands when you outgrow plain text.crewship copy-prompt <run-id>— recover a past prompt to seed a new library entry.