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 / arg | Default | Meaning |
|---|---|---|
<RUN_ID> | required | Run UUID or latest / latest~N. |
--endpoint <URL> | kanros_share::DEFAULT_SHARE_ENDPOINT | Base URL of the share service. |
--token <TOKEN> | env KANROS_SHARE_TOKEN | Bearer token for the share endpoint. |
--anonymize | off | Strip rendered prompts and provider completions before upload. |
--cache-path <PATH> | XDG cache dir | Custom history database location. |
What it does
- Loads the run summary from the local cache database (the same store
kanros diffreads from). - If
--anonymizeis set, redacts free-form text fields. Cell outcomes, assertion results, latency, and provider ids are preserved; only prompts and completions are stripped. - POSTs the (possibly anonymised) summary to
<endpoint>/api/runsas JSON, withAuthorization: Bearer <token>if a token is configured. - Prints the shareable URL to stdout. Exit code
0on success,3on transport failure,2if 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_promptcompletion_response.content- Any
provider_errorstrings 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 usagetags: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 madeNruns 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-pathflag matters in CI: if you ran the original eval with a custom cache path,shareneeds the same path to find the run.