dhnt kbAll pages

runbook · candidate

Share documents with a person or circle: collect, approve on a form, deliver by reference (share-docs)

Collect files from Gmail, Drive, a GitHub release, a folder or a URL, let the person tick files and recipients on a bashy form, and deliver each approved file to each chosen member or circle as a reference that expires, by the cheapest route. WHEN a person asks to get some files and share them with a known person or circle, from any assistant (keywords: share, documents, pdf, attachments, circle, member, form, approve, route, time-boxed, reference, share-docs)

Verified 2026-12-01
2026-12-01: go test in examples/share-docs (fake sources, members, form, routes, notify); the form step also run against the real bashy form on a dev host. · Bashy revision 536fc71bf21457eaa21ab4bb35cd574788d12f97

Use this when a person asks for some files and wants them shared: “get the PDFs from Ada’s mail and share them with my family circle and Bob”. One command collects, the person approves on a form, and each approved file goes to each chosen member as a reference that expires. Nothing is shared before the form is submitted.

share-docs is a Bash# example command (examples/share-docs/share-docs.bsh). bashy-defaults apply registers it; bashy share-docs --skill prints its guide. It is experimental (example level).

The one command

bashy share-docs run --from "gmail:from:ada@example.com has:attachment" --match '*.pdf' \
    --to family --to Bob --open
  1. collect: stages the files with size, sha256, source and sender.
  2. form: a bashy form with one checkbox per document (title, verify line, view link) and one per circle and member (bashy member ls). --to ticks the circle or person named in the request; a name that matches nothing, or more than one member, is refused. No document is ticked for the person. --open opens the page.
  3. deliver: waits for the form (--timeout, default 30m). Submitting is the approval: exactly the files ticked and the recipients chosen, once, for this batch.

The steps also run one at a time (collect, form, deliver) on the same batch. status [--json] shows the staging list and the delivery record; expire removes access whose time box (--ttl, default 24h) ended.

Agents: tell the person the form is open and wait. Never submit it for them.

Sources

--from takes gmail:QUERY, drive:NAME (both through bashy google, see [[gmail-setup-send-and-verify]]), gh:OWNER/REPO[@TAG] (release assets), folder:DIR, url:URL, or cmd:NAME [ARGS] for any registered command. A source command writes into $SHARE_DOCS_FILES and prints one JSON object per file: {"path": "...", "source": "...", "sender": "...", "link": "..."}.

Routes: cheapest first

Each file goes to each recipient by the first route that works (SHARE_DOCS_ROUTES, default store lan sphere satellite relay):

No route command ships yet: until you register one, only files collected from Drive can be delivered. A rung with no command is skipped, and the record says so. When no route works the file is not shared and the command exits 1.

The recipient is told with bashy notify --to EMAIL "<subject with the reference>". bashy notify reaches only recipients this host can address; for anyone else the file is still shared and the record says notified: false, so tell the person to pass the reference on. Set SHARE_DOCS_NOTIFY to a registered command for another channel, such as a room post.

What is checked at delivery