ctermdocs HomeBlogSign in

Sharing

cterm can show a session to someone who has no account. A share link opens one session in their browser, either to watch it live or to drive it: type prompts and answer Claude's cards. A report is a readable account of what a session did and found, written for someone who was not in it, that you send as a link to a page made for reading or as a file. A file link opens one file of a project, a picture, a PDF or a spreadsheet, in cterm's file viewer, for as long as you choose or for good. A chat on another page is a small chat box you paste into a website or put beside an artifact. Visitors ask questions about the session's work or the page, and each one gets an answer of their own.

What it is for

  • Show work in progress. A client, a colleague or a teacher follows a session as it happens, with no account and nothing to install.
  • Tell someone what a session did. A report says what was asked, what was done, the decisions, the results and what is left, as a document a colleague or a client reads on its own, without the conversation.
  • Send a file without downloading it first. A chart, a PDF or a CSV a session made goes out as a link that opens it in the viewer, a table they can sort and filter, which you can end when you like.
  • Hand over the wheel for a while. Someone you trust types the next prompts and answers Claude's questions, while you keep the permission prompts or let them answer those too.
  • Answer questions about a page. A report or demo you published as an artifact, or a page of your own site, gets a chat that answers from what it shows. Visitors never touch your session.

How to use it

Sharing belongs to admins. You can share your own Claude sessions, and your Codex and Gemini sessions (Codex and Gemini sessions). You can't share someone else's session or a shell, and a user account doesn't share at all.

  1. Open the session and click Share in its head. On a phone it's under More.
  2. Pick Watch only (the conversation, live, with no prompt box and no answers) or Watch and drive (the viewer can also type prompts and answer Claude's questions and plans).
  3. Choose when it Ends: No end, An hour, A day or A week, for a watch link and a driving link alike. A driving link with no end works until you revoke it, so revoke it when you're done.
  4. For a driving link, decide on Let it approve tool use. Without the tick, Claude's permission prompts stay yours: the viewer sees them but can't answer. With it, the viewer can allow a tool use once at a time (never "remember"), and can approve a plan with auto-accepted edits.
  5. Read the warning, then click Make a watch link or Make a driving link.
  6. Click Copy and send the link. It's shown only this once: cterm keeps no copy of it, only a way to recognise it.

When the session runs in a mode that never asks for permission (an admin's sessions start that way), you can still pick Watch and drive. The popover then leaves out the approve tick, since nothing is ever asked, and its warning turns stricter: whatever the viewer asks for runs on this Mac as your user without asking you first. Prompts still have to be plain text. Only send such a link to someone you trust.

What the viewer sees

The link opens a page of its own, always in the light theme. It shows the session's name and state at the top and the conversation below, followed live. The tool calls are left out. A watcher has no prompt box and no buttons.

A driving link adds a prompt box ("Ask Claude…") and the buttons on Claude's question and plan cards. It also has Stop (a square), which interrupts the turn, and its arrow button reads Resume in place of Send (in its tooltip) when the session has ended. Like the owner's box, it is one line high until the text needs more. Prompts are plain text only: a prompt starting with / or ! stays in the box with a note, because Claude Code would read it as a command. A permission card the viewer may not answer says only the owner can.

The page reaches nothing else of cterm: no session list, no files drawer, no comments, no other session. File paths in the chat are plain text. A viewer's window never resizes your terminal. When a link is revoked, expires or loses its session, the open page says "This link has ended" within seconds.

A driving link's page: the conversation, a question card the viewer can answer, and the prompt box.
A driving link's page: the conversation, a question card the viewer can answer, and the prompt box. ui-share-drive.png, drawn by share-shot.mjs

What else the viewer can open

A Claude session's page also shows some of what you see beside the chat, read-only, the same for a watch link and a driving link:

  • The agents chip in the head while the session runs agents: the count, and a list of each agent with its type and description. A row scrolls the conversation to that agent. Once none runs, a quiet chip says how many the session ran and opens the index on its Agents tab.
  • Index (the list icon, once the session has made a tool call): its Tool calls, Agents and Files, as in your own index but without Comments. A row shows its call in the conversation, even though the page hides tool cards otherwise. The Files tab lists what the session read, wrote or edited, and a click opens the file in the viewer.
  • Brief (the page icon), only while you keep a brief of the session. The viewer reads it as you do, follows it as it updates, and can't switch it on, off or update it. When you switch it off, the button goes from their page.
  • Task, when the session works on a roadmap item: the item's id in the head opens its card alone in a dialog, with its title, status, summary, To build, Done when, decisions, notes and log. There is no pencil, no Start, no model, no link to another item or session, and no way to the roadmap itself. Esc or a click beside it closes it.
  • A file the conversation names opens in the viewer, read-only: a path in the chat or a row of the Files tab. The viewer has Download and Open raw, and no Share, edits or way to the files drawer. Only files the conversation itself names, in the session's project folder, its scratchpad or what was attached to its prompts, open; any other file of the project stays out of reach, and a path that names none stays plain text.

A Codex or Gemini session's page has none of these, and a session with no tool call, brief or item has the plain head.

A link's page with the index open beside the chat: the agents chip in the head, Task, Brief and Index at its end, and the Files tab listing what the session read and edited.
A link's page with the index open beside the chat: the agents chip in the head, Task, Brief and Index at its end, and the Files tab listing what the session read and edited. ui-share-more-index.png, drawn by share-shot.mjs
A file the session read and edited, opened from the link's Files tab in the viewer: its code with line numbers, Download and Open raw, and nothing to edit or share.
A file the session read and edited, opened from the link's Files tab in the viewer: its code with line numbers, Download and Open raw, and nothing to edit or share. ui-share-more-file.png, drawn by share-shot.mjs
The task dialog on a link's page: the item's card alone, read-only, over the conversation.
The task dialog on a link's page: the item's card alone, read-only, over the conversation. ui-share-more-task.png, drawn by share-shot.mjs
  • The popover lists the links that still work, this session's first and then the Other sessions of this project. Each row shows its level (watch, drive or drive + approve), when it was made, when it ends and who made it. Revoke ends a link at once and closes any page open on it.
  • A shared session carries a mark that only you, its owner, can see: the share icon after its name in the list, and a chip among the head's marks. It's red ("driving link") while a driving link works, the accent colour ("shared") for watch links only, and gray ("link ended") once every link has ended. The tooltip says which links there are and when the last one ends.
  • A gray mark stays until you open Share and click Clear next to "links to this session have ended".
  • The session finder's shared chip lists the sessions you have shared.

Report on a session

  1. Open Share in the session's head and click Report… at the foot of the popover, or pick Report… in the session's menu in the list. Reports are for the Claude sessions you can share.
  2. Click Make the report. One call on the session's Claude login reads the conversation (and its brief, while you keep one) and writes the report. It usually takes under a minute; the dialog says how long it has been working.
  3. Read it. It opens with a title and a short summary, then five sections: What was asked, What was done, The decisions, The results and What is left. It is about the work, in the language of your prompts: no tool output, commands, commits, test runs or anything of how your Mac is set up.
  4. Share it:
    • Export it as Markdown, as HTML (a page that opens on its own) or as PDF (the browser's print dialog, named after the report: save as PDF there).
    • Or choose when the link Ends (No end, An hour, A day or A week, a week by default), click Make a link and Copy link. Like a share link, it's shown only once.

The report is a snapshot. The session going on changes nothing in it, or on its link, until you click Make it again; then every link to it shows the new report. The dialog lists this session's report links with Revoke, and the Share popover lists them among the project's links, marked report. A session shared only by its report carries the share mark too, saying "report shared".

The link opens a page made for reading: the report alone, under the session's name and the date it was made, light, in one column that fits a phone. There is no sidebar, no prompt box, no conversation and no sign-in. A revoked or expired link shows "This link has ended" and nothing of the session.

A report's link: the title, the line naming the session and the date, the summary and the sections, on a plain page.
A report's link: the title, the line naming the session and the date, the summary and the sections, on a plain page. ui-report-page.png, drawn by report-shot.mjs

Share a file

  1. Open the file in the files drawer, the project page's Files tab or the viewer, and click Share in its head. It's there on the files of your own projects when you are an admin, in the project folder, the scratchpad and the uploads; never in Home.
  2. Choose when the link Ends: An hour, A day (the default), A week or No end, for a file you share for good. A link with no end works until you revoke it.
  3. Click Make a link, then Copy. As with a session's link, it's shown only once.

Whoever opens the link needs no account. It opens a page with cterm's own file viewer and nothing else: no sidebar, no file tree, no other file. The file shows as it does in your preview: a CSV or TSV as a table they can sort and filter by any column, a spreadsheet sheet by sheet, a markdown file laid out, code highlighted, a picture, a PDF, a slide deck (.pptx, .ppt or .odp) as its slides, or a web page (sandboxed, as in the preview). Download saves the file and Export turns it into Word, PDF, a web page or a spreadsheet, the same choices you get. They can't change anything: a table's cells don't edit, and Save next to it isn't offered. The page's head says when the link ends.

Pasted into WhatsApp, Teams, Slack or iMessage, the link shows a preview card: the file's name, what kind of file it is and its size, and a picture of its first page or slide, as Finder draws it. A picture, a PDF, a PowerPoint, Word or Excel file, a Keynote, Pages or Numbers file and a video get the picture; a text, markdown or CSV file gets the card without one. A link that has ended gives a new card nothing of the file.

The link reaches that one file and nothing else of the project, and its address names no file, folder or account. It reads the file as it is on disk each time it's opened, so a file Claude changes afterwards goes out changed. A link made before the viewer page opens the page too.

A CSV opened from its link: the table sorted by a column, with a filter under each heading, Download and Export in the head, and a line saying it's read-only.
A CSV opened from its link: the table sorted by a column, with a filter under each heading, Download and Export in the head, and a line saying it's read-only. ui-file-share-page.png, drawn by file-share-shot.mjs

The popover lists the project's file links that still work, this file's first and then Other files of this project, each with when it was made, when it ends, who made it and Revoke. The ended ones wait there until Clear. A revoked or expired link, or one whose file was deleted or moved, answers "This link has ended" and shows nothing of the file. The session's Share popover doesn't list file links, and a file link counts in no session's share mark.

The file viewer with a chart open and its Share popover: when the link ends, Make a link, and the project's file links with Revoke.The file viewer with a chart open and its Share popover: when the link ends, Make a link, and the project's file links with Revoke.
The file viewer with a chart open and its Share popover: when the link ends, Make a link, and the project's file links with Revoke. ui-file-share-light.png and ui-file-share-dark.png, drawn by file-share-shot.mjs
What a file link's page says once it has ended: the line and nothing else.
What a file link's page says once it has ended: the line and nothing else. ui-file-share-ended.png, drawn by file-share-shot.mjs

Share a project's monitors

A project's monitors go out as a status page: on the Monitors tab, Status link makes a link to a page of their own with each monitor's state, last value, recent values and alerts, read again every minute, all of them or the ones you tick, with an end or none and, if you want, a password asked once per browser. It's there on your own projects when you are an admin. Monitors says it all; the session's Share popover lists the project's status links under Status pages of this project, each with Revoke.

A status page in the dark theme: the project's name, one monitor alerting, and a card per monitor with its state, value, runs, numbers and alerts.A status page in the dark theme: the project's name, one monitor alerting, and a card per monitor with its state, value, runs, numbers and alerts.
A status page in the dark theme: the project's name, one monitor alerting, and a card per monitor with its state, value, runs, numbers and alerts. ui-status-page-dark.png and ui-status-page-light.png, drawn by status-shot.mjs

Put a chat on another page

  1. For a session, open Share and scroll to Chat on another page. For an artifact (a page), click Chat on its head in the Artifacts panel.
  2. Fill in the form:
    • Sites that may show it: one address per line, like https://example.com. An artifact's own link may always show its chat.
    • Title of the box.
    • Let it read the project's files: read-only. .env files, keys and .git always stay out.
    • Answers on: Sonnet by default, Haiku or Opus.
    • Ends: Until revoked, 30 days, A week or A day.
    • Questions a day, for all visitors together (200 by default), and …per visitor's address (20 by default).
  3. Click Make the chat, then Copy the tag and paste it into the page's HTML. For an artifact, its link already shows the chat beside the page.

Each chat's row shows its sites, its end, today's counts and when the last question came. What was asked lists every conversation with its time, address, site and browser, and the questions and answers. Revoke stops the chat on every page; the pages themselves stay. + Another chat makes a second one with other settings. The Share popover also lists the project's other chats under Chats on other pages.

A chat box on another site: a visitor's question about the page, answered with a table, and the note that answers can be wrong.
A chat box on another site: a visitor's question about the page, answered with a table, and the note that answers can be wrong. ui-embed-site.png, drawn by embed-shot.mjs

How it works

A share link is a row in cterm's store (shares.ts): its session, its level, who made it and when it ends. The secret in the link is 32 random bytes, and only their hash is stored, so neither the store nor a backup holds a working link. The page at /share/<token> connects with that token instead of a sign-in cookie. Its connection belongs to no account. It receives only its own session's events, and the daemon checks every message it sends against what the level allows (shareRefusal in permissions.ts): never a close, a model change, a command or another session. It may read its session's brief, which the daemon answers only while you keep it on and without its model or errors, and its session's roadmap item, which the daemon hands over alone (share-item.ts): no tree, no inbox, no other item, no session links. Every change to either is refused. What a driving link does, it does as you. The connection is checked again every 15 seconds, which is how an ended link closes its page. Each opening is recorded in the store with its address and browser.

A report is kept with its session in cterm's store, one per session, with when it was made and by whom; it goes when the session leaves the list. It is written by one claude -p run on the session's Claude login (Sonnet by default), with no tools, no settings and nothing of your setup, in an empty folder, the way the brief runs (report.ts). It reads the same digest of the conversation the brief reads: your prompts, Claude's answers and one line per tool call, never a tool's output, a hook's words or a permission prompt, and your home folder written as ~. A report's link is a row of the same shares table, of its own kind: its token opens /report/<token>, which reads the report and nothing else and never connects to the session, and a share link's token opens no report. Each opening is recorded like a share link's.

A file link is a row of the same shares table, of kind file: the project, the folder it was shared from (the project's, or for a scratchpad or uploads file, its session's, and the link goes with that session) and the file's path in it, who made it and when it ends, the token kept as a hash only. The address /file/<token> is open without a sign-in on the public address too: it's the app's page with the file viewer, which reads the file through /api/file/<token>, only its details, its text and its bytes, never a list, a search or a write. At each read the daemon reads the row, finds the file again inside that folder (the same check the file viewer makes, so .env files and keys stay out and a path that now leads outside is refused) and sends it with nothing cached on the way, named by its file name alone. The table, the sort, the filters and the export run in the visitor's browser, as they do in yours. The page at /file/<token> carries the link preview a chat reads (Open Graph tags: the file's name, its kind and size, the address and the picture), added by the daemon as it serves the page while the link works. The picture is drawn on this Mac by QuickLook, the same as Finder's, and made a small JPEG with sips; it's kept by the file's size and modification time, so a changed file gets a new one. A slide deck is shown by turning it into a PDF with the Mac's LibreOffice, as in your own preview. Making and revoking a link go into the daemon's log, without the file's name; openings are not recorded.

A status link is a row of the same table too, of kind monitors: the project, the monitors it shows or none for all of them, and a password's scrypt hash when it has one. /status/<token> reads /api/status/<token>, the monitors' states, values and alerts and nothing else of the project, never a script or who is told; with a password, nothing until the page was given it, then a cookie for that link's address alone. Like a file link's, its making and revoking are logged and its openings are not.

A chat on another page never reaches your session. Each question is one claude -p run on your Claude login, with no saved conversation. It gets the page's text, or the session's conversation as a digest without the tool calls, plus that visitor's conversation so far. It runs restricted in an empty folder, with only reading tools, on the artifact's copy and the project's folder when you allowed it. Questions are plain text up to 2000 characters, 40 per conversation, one answer at a time. The tag loads embed.js from cterm, which draws a corner button and the box. The box draws nothing on a site you didn't name, or once the chat has ended. The key in the tag is limited by the sites, the daily limits, the end and Revoke. A site that wants to draw its own chat can call the HTTP API described in the repository's docs/embed-api.md. Conversations are kept for 90 days.

Scenarios

A demo for a client

You make a watch link with no end for a client, who follows the session from their laptop: your prompts, Claude's answers and its questions, but not the tool calls, your files or your other sessions. The session works on a roadmap item, so the client opens Task to read what it is meant to build, and Brief for where it stands. When the project ends you click Revoke, and their tab says the link has ended.

A summary for the client at the end of a job

The session that fixed a client's invoices is done. You open Share, click Report… and Make the report, read it through, and click Make it again after a late fix. Then you make a link that ends in A week and paste it into your email, and attach the PDF for their records. The client reads what was asked, what changed and what is left, without seeing a single command.

A colleague takes over for the afternoon

You are going out and a colleague will carry on. The session runs in the default mode, so you make a driving link that ends in A day, without Let it approve tool use. They type prompts and pick answers on Claude's question cards. When Claude wants to run a command, the permission card waits, and you answer it from your phone. The head's red driving link chip reminds you the link is live until you revoke it.

A chart for the accountant

A session drew the month's sales as a picture and wrote the figures to a CSV. You open the picture in the viewer, click Share, keep A day and paste the link into a chat with the accountant, then do the same for the CSV. The picture opens in their browser and the CSV downloads as sales.csv. The next morning both links have ended by themselves.

Questions about a published report

A session published a pricing report as an artifact. You click Chat on it, keep Sonnet, set 30 days and make the chat. The report's link now shows the chat beside the page. A week later, What was asked shows which questions people asked, and that one visitor reached the daily limit.

Screenshots on this page are drawn by docs/spike/share-shot.mjs, docs/spike/report-shot.mjs, docs/spike/file-share-shot.mjs, docs/spike/status-shot.mjs, docs/spike/embed-shot.mjs from fake data, and refreshed when a view changes.

Written in docs/site/pages/sharing.md and built by docs/site/build.mjs.