Documentation Index
Fetch the complete documentation index at: https://docs.crewship.ai/llms.txt
Use this file to discover all available pages before exploring further.
AI workflows from the CLI
The CLI is built so the friction between “I have a question / a file / a diff” and “what would my agent say?” is one command. This page collects the patterns the day-to-day shows up needing.Quick prompts: crewship ask
crewship ask is the lowest-friction path. Resolves an agent from
--agent flag → CREWSHIP_DEFAULT_AGENT env var → default-agent
config → interactive picker.
crewship ask opens a huh picker
listing every agent in the workspace and offers to save the choice as
the new default.
Stdin piping
Three patterns, in order of locality:--- stdin --- separator and capped at 64 KiB.
@- overrides this — the prompt is read from stdin in full and no
auto-append happens.
Auto-context flags
Composable flags inject extra blocks of context into anyrun / ask /
retry invocation. Each block is fenced with --- <label> --- and
capped at 64 KiB.
| Flag | Source |
|---|---|
--with-git-diff | git diff (unstaged changes) |
--with-git-staged | git diff --staged |
--with-git-status | git status -s |
--with-git-log | git log --oneline -20 |
--with-file <path> | File content. Repeatable. |
--with-cmd '<sh-command>' | Stdout of a shell command. Repeatable. |
--paste | System clipboard (pbpaste / wl-paste / xclip / xsel). |
Preview without sending
--dry-run and --estimate both compose the full prompt (with all
--with-*, stdin, paste context) and exit before any network round-trip.
Useful for review, scripting, or planning a budget.
--dry-run skips authentication and agent resolution entirely — handy
on a fresh shell or for scripting offline. --estimate does the same
and adds a heuristic-based token count plus list-price cost across
Sonnet 4.6, Opus 4.7, and Haiku 4.5.
Multi-agent comparison
crewship ask --agents v,e,p "prompt" runs the same prompt against
multiple agents in parallel. Sends concurrently (one WS connection per
agent), prints sequentially under labelled === <slug> === headers.
Saving responses
--save <path> tees the agent’s text response to a file. The on-disk
artefact is plain markdown — no ANSI escapes — so it can be committed,
piped through pandoc, or read by another tool.
Markdown rendering
Streamed agent output is line-buffered through a small markdown renderer that highlights headings, bold, italic, inline code, fenced blocks, lists, links, and block quotes — without ever waiting for a complete document. Inline span delimiters are line-scoped, so partial chunks arriving over the wire never produce broken output.| Setting | Behaviour |
|---|---|
--markdown flag | Force on. |
--no-markdown flag | Force off. |
crewship config set markdown on|off|auto | Persist a default. |
auto (default) | Render only when stdout is a TTY (so piped output stays plain). |
--no-color global flag | Implies --no-markdown. |
Recall + history
When you can’t remember what you ran, ask the journal:crewship retry <run-id> re-runs a previous run (recovers the original
prompt from the chat). Add --continue to append to the same chat
instead of starting a new one.
crewship copy-prompt <run-id> recovers the original prompt without
running anything. Use it for tweak-and-rerun loops:
crewship explain <run-id> asks the default agent to summarize what
happened in a run by feeding it the journal entries scoped to that
run’s agent + start window. Useful for “why did this fail?” lookups
without scanning logs by hand.
Live observation: crewship watch
crewship watch is the top-level alias for journal --follow —
shorter to type for the most-common live-observation workflow.
/api/v1/journal/stream. Prints entries in
the same format as the listing. Reconnects with bounded backoff (1 s →
30 s cap) and threads Last-Event-ID so a brief disconnect resumes
without dropping or duplicating entries. Press Ctrl-C to exit.
Cost awareness
crewship paymaster.
Run forensics: inspect, explain, export
Three complementary windows on a past run:
inspect is a fast deterministic timeline (events, costs, tool calls,
errors). explain adds an agent-written summary. export produces
./run-r_abc/ with prompt.md, response.md, messages.json,
journal.json, timeline.txt, and run.json — one stop for handoffs
or post-mortems.
Prompt library
A local, server-free knowledge base of reusable prompts kept in~/.crewship/prompts/<name>.md:
Web UI deep-links: crewship open
Hybrid CLI/web workflow — jump from terminal to the right web page:
Auto-refresh: --watch
Several list-style commands accept --watch <duration> to redraw on a
timer (Ctrl-C to exit):
Filtering with jq: --filter
Most JSON-emitting commands accept --filter '<jq-expr>' so you don’t
need a shell pipe just to extract one field. jq must be installed; the
filter is silently bypassed otherwise.
Container shell access (deferred)
crewship shell <agent> for a live PTY into an agent container is
deferred to its own follow-up — it requires WS-multiplexed terminal
plumbing not yet wired in the CLI. Today, the closest paths are:
Health: doctor, lint, config validate
Tab completion for agent slugs
crewship run, crewship logs, and crewship agent get provide
dynamic shell completion: tab on the agent argument fetches available
slugs from the API. Set up shell completion once with
crewship completion bash|zsh|fish|powershell.