Skip to content

Otter Share

chimera otter share <session-id> packages a persisted session into a self-contained transcript and routes it to one of three sinks. It is the otter analogue of chimera mink runs share, but with a different default endpoint policy: otter never points at a third-party hosted share service. The default HTTP target is a local placeholder (http://localhost:5174/api/shares); pointing it elsewhere is your call.

For the underlying session data this command renders, see sessions.md.

Terminal window
chimera otter share <session-id> # default: file sink, HTML format
chimera otter share <session-id> --sink file --format md
chimera otter share <session-id> --sink stdout --format json | jq .
chimera otter share <session-id> --sink http
chimera otter share <session-id> --sink http --url https://collector.internal/shares

<session-id> is the directory name from ~/.chimera/eventlog/otter-* (e.g. otter-20260425T091201-71032a5e).

SinkWhat it doesAuth
file (default)Writes ~/.chimera/shares/otter-<id>.<ext> and prints the absolute path.none — local disk
httpPOSTs the rendered body to --url / $OTTER_SHARE_URL / the local default.whatever your endpoint enforces
stdoutWrites the rendered body to stdout.none

Writes ~/.chimera/shares/otter-<session-id>.<ext> and prints the absolute path on stdout. The shares directory is created lazily.

/Users/yad/.chimera/shares/otter-20260425T091201-71032a5e.html
chimera otter share otter-20260425T091201-71032a5e
chimera otter share otter-20260425T091201-71032a5e --format md
# /Users/yad/.chimera/shares/otter-20260425T091201-71032a5e.md

The HTML file is self-contained — no external CSS, no fonts, no script tags — so it round-trips through email or a static file host without losing fidelity.

POSTs the rendered body to a URL. The URL is resolved with this precedence:

  1. --url <URL> flag.
  2. $OTTER_SHARE_URL environment variable.
  3. http://localhost:5174/api/shares (the local placeholder default).

Trademark hygiene note: the default is deliberately local. Otter will never POST your session to a third-party brand’s share endpoint without an explicit opt-in. If you want a hosted target, set it yourself:

Terminal window
export OTTER_SHARE_URL=https://collector.example.com/api/shares
chimera otter share <id> --sink http

Headers sent by the client:

HeaderValue
Content-Typetext/html; charset=utf-8 (or text/markdown; charset=utf-8 / application/json)
User-Agentchimera-otter-share/1

The HTTP sink uses stdlib urllib.request (no httpx required). On 2xx, the endpoint’s response body is written to stdout — collectors typically reply with a JSON document carrying the canonical share URL, so a CI pipeline can pipe the result downstream. On non-2xx, the CLI exits 1 with the status code and the first response line on stderr.

Writes the rendered body directly to stdout, no file, no network. Handy for piping into less, archiving into a tarball with other artifacts, or feeding into another tool:

Terminal window
chimera otter share <id> --sink stdout --format md | less
chimera otter share <id> --sink stdout --format json \
| jq '.events[] | select(.type == "tool_call")'
FormatExtensionContent-TypeUse when
html (default).htmltext/htmlsharing with humans; rendering in a browser.
md.mdtext/markdownpasting into a PR / issue / Slack canvas.
json.jsonapplication/jsonfeeding into another tool / programmatic consumer.

The HTML body is a single <html> document with inline <style>. The top is a metadata table (model, started/ended, steps, tool calls, cost, success, error). Then the prompt in a <pre> block. Then one <div class="event"> per persisted event, each rendering its metadata as a JSON code block. Even viewers that strip <style> produce readable text.

GitHub-flavored. Top section: a metadata bullet list and a fenced prompt block. Then ## Events (<n>), followed by per-event sections (### \`) with the metadata in json` fenced blocks.

Mirrors chimera otter sessions show --json:

{
"session_id": "otter-20260425T091201-71032a5e",
"summary": { "model": "claude-sonnet-4-6", "...": "..." },
"events": [
{ "id": "evt-...", "type": "user_message", "metadata": { "...": "..." } },
{ "id": "evt-...", "type": "tool_call", "metadata": { "...": "..." } }
]
}

Use this format when the consumer is another program. Pretty-printed two-space indent; UTF-8.

The http sink POSTs the body verbatim — the rendered transcript is the entire payload. The collector decides what to do with it: store it, reply with a canonical URL, attach metadata, etc. Otter does not assume any particular response schema. The CLI prints whatever the endpoint sends back so callers can pipe it into a follow-up step.

A reasonable collector contract (recommended, not required) when you roll your own:

POST /api/shares
Content-Type: application/json
Body: {"session_id": "...", "summary": {...}, "events": [...]}
200 OK
Content-Type: application/json
Body: {"url": "https://collector.example.com/s/<short-id>"}
CodeMeaning
0Success. File path / endpoint response on stdout.
1Runtime failure: HTTP non-2xx, network error, disk error.
2Usage failure: missing <session-id>, unknown --sink / --format, session id not found.
/Users/yad/.chimera/shares/otter-20260425T091201-71032a5e.html
chimera otter share otter-20260425T091201-71032a5e
open ~/.chimera/shares/otter-20260425T091201-71032a5e.html
Terminal window
export OTTER_SHARE_URL=https://collector.internal/api/shares
chimera otter share otter-20260425T091201-71032a5e --sink http --format json
# {"url": "https://collector.internal/s/Ab1Cd2Ef"}

Stream the most recent session into a Markdown clipboard

Section titled “Stream the most recent session into a Markdown clipboard”
Terminal window
LAST=$(chimera otter sessions list --limit 1 --json | jq -r '.[0].session_id')
chimera otter share "$LAST" --sink stdout --format md | pbcopy

Bulk-archive every session from the last week

Section titled “Bulk-archive every session from the last week”
Terminal window
chimera otter sessions list --since 7d --json \
| jq -r '.[].session_id' \
| while read sid; do
chimera otter share "$sid" --format md > /dev/null
done
ls ~/.chimera/shares/
  • Persisted sessions can carry sensitive content — file paths, prompts, tool args, secrets your tools touched. Sharing externally is your decision; otter’s default is to write locally.
  • Otter never auto-shares. The upstream open-source agent has an “auto-share” mode; otter deliberately ships only manual sharing.
  • The default OTTER_SHARE_URL is localhost. Otter will never silently POST to a third-party hosted endpoint.
  • Secret redaction at write-time is on the roadmap. For now, treat the shared transcript as it appears on disk: assume what you see is what the recipient gets.
  • sessions.md — what’s in summary.json and the event-*.json files that share renders.
  • server.md — the GET /sessions/{id}/transcript endpoint exposes the same renderings over HTTP.
  • docs/mink/runs.md#sharing — sibling command for mink runs (different sinks: file / gist / base64).