kanros share

Upload a completed run to a share endpoint and print the resulting URL. Designed for ad-hoc sharing of a single eval result (a regression investigation, a customer demo) without having to email JSON around.

kanros share <RUN_ID> [--endpoint <URL>] [--token <TOKEN>] [--anonymize] [--cache-path <PATH>]
Flag / argDefaultMeaning
<RUN_ID>requiredRun UUID or latest / latest~N.
--endpoint <URL>kanros_share::DEFAULT_SHARE_ENDPOINTBase URL of the share service.
--token <TOKEN>env KANROS_SHARE_TOKENBearer token for the share endpoint.
--anonymizeoffStrip rendered prompts and provider completions before upload.
--cache-path <PATH>XDG cache dirCustom history database location.

What it does

  1. Loads the run summary from the local cache database (the same store kanros diff reads from).
  2. If --anonymize is set, redacts free-form text fields. Cell outcomes, assertion results, latency, and provider ids are preserved; only prompts and completions are stripped.
  3. POSTs the (possibly anonymised) summary to <endpoint>/api/runs as JSON, with Authorization: Bearer <token> if a token is configured.
  4. Prints the shareable URL to stdout. Exit code 0 on success, 3 on transport failure, 2 if the local run cannot be resolved.

Examples

Share the most recent run with the default endpoint:

kanros share latest
# https://share.kanros.dev/r/8c2c5c9e-…

Share a specific run anonymously:

kanros share 8c2c5c9e-… --anonymize

Use a custom endpoint with a token from the environment:

export KANROS_SHARE_TOKEN=…
kanros share latest --endpoint https://share.example.com

Use an explicit token (avoid in shell history when possible):

kanros share latest --token "$(cat ~/.kanros/share-token)"

Self-hosting

The share service is a thin axum server in crates/kanros-share. The default endpoint is the public instance; operators who would rather not rely on it can run their own:

cargo run -p kanros-share-server -- --port 8080

…then point clients at it:

kanros share latest --endpoint http://localhost:8080

The server stores uploaded runs in a local SQLite database and renders them via a small templated HTML view.

What --anonymize redacts

The anonymiser walks the run summary and clears these fields on every cell:

  • rendered_prompt
  • completion_response.content
  • Any provider_error strings that may contain request bodies

It preserves:

  • provider_id (the family + model, e.g. openai:gpt-4o-mini)
  • The full assertion list and per-assertion outcomes
  • latency_ms, cost_usd, token usage
  • tags: on the test case

Use --anonymize when sharing a run with someone who should see the shape of the regression but not the underlying prompts or completions (customer support tickets, public bug reports, gist threads).

Run identifiers

Identical to kanros diff:

  • A UUID printed by kanros run.
  • latest — most recent run.
  • latest~N — the run made N runs before the most recent.

Notes

  • Sharing is opt-in per invocation. There is no automatic upload; the client never contacts the share endpoint unless you run kanros share.
  • The shareable URL is intentionally long and non-guessable. Treat it as a capability — anyone with the URL can view the run.
  • The share endpoint speaks plain HTTP with a JSON body. For curl-driven testing of self-hosted instances, see the README of crates/kanros-share.
  • The --cache-path flag matters in CI: if you ran the original eval with a custom cache path, share needs the same path to find the run.