cast publish: a URL for everything your agent makes
One command turns a file into a page with versions, diffs, gates and comments that flow back into the session that made it.
Agents produce real artifacts: an audit, a benchmark chart, a mockup, a design doc, a screen recording of a bug fix. Today those end up as a file in /tmp or a wall of markdown in a transcript, and sharing one means copying it somewhere. cast publish turns an HTML file, a markdown file or a whole folder into a page at codecast.sh/a/<slug>, and the file's path is the page's identity: publish the same path again and the same link shows the new version.
$ cast publish churn-audit.md ✓ Q3 churn audit v1 → published https://codecast.sh/a/k3Vd9QpLm2Xa $ cast publish churn-audit.md # after the agent revises it ✓ Q3 churn audit v2 → updated
HTML ships exactly as written: scripts run, charts draw, forms work, inside a browser sandbox with no access to your codecast sign-in, so a script on the page cannot act as you. Markdown renders as a clean reading page, titled by its first heading. A folder publishes as a bundle with index.html as the entry, relative paths intact, dotfiles, node_modules and sourcemaps left behind, up to 8 MB of files. When the publishing session is bound to a task, the page attaches to that task as evidence, stamped with the stage the task was at (--task ct-N or --plan pl-N to choose).
publish call beneath it.Inside a codecast conversation, a published link is not a bare URL: the agent puts it on its own line and the live page renders in the thread, framed with its title, so you review the deliverable without leaving the session that made it.
Versions, diffs and rollback
Each publish is a numbered version. The link always serves the newest; every older version keeps its own address (?v=3), a line-by-line diff against any other (?diff=2..3), and a one-command way back. Markdown pages diff their markdown, so an edited sentence is one red line and one green line, not a wall of changed HTML. A rollback never rewrites history: it publishes the old content as the next version, so the version you rolled away from is still there. The server hashes content, so a save that changes nothing comes back unchanged and the version number holds.
$ cast publish rollback k3Vd9QpLm2Xa 2 ✓ Rolled back to v2, now v4 $ cast publish versions churn-audit.md Q3 churn audit (k3Vd9QpLm2Xa) v1 2d 6.1KB v2 1d 6.3KB v3 3h 7.9KB v4 now 6.3KB ← current restore: cast publish rollback k3Vd9QpLm2Xa <n> compare: https://codecast.sh/a/k3Vd9QpLm2Xa?diff=<a>..<b>
/features/publish: the version rail, a markdown diff where a changed figure is one red and one green line, and a rollback that becomes v4 rather than erasing v3.--watch: review the draft as it forms
cast publish proposal.md --watch keeps the CLI on the file and republishes every time it changes. Open the link with ?live=1 and the reader's tab reloads itself on each new version, so you watch the page take shape at the URL you will send. Saves settle for 400 ms before a publish, a save that lands mid-publish queues one more, and watching a folder is recursive (editors that save by replacing the file are caught too). Access gates are set once on the first publish; the watch loop republishes content only.
Gates
Links are unlisted, unguessable and marked noindex, and anyone holding one can read the page. When that is not enough, gates are flags on the publish, and cast publish set changes them later without republishing content.
| Gate | Flag | What it does |
|---|---|---|
| Password | --password-stdin | Readers type a password before the page loads. The server keeps a salted hash and accepts 12 guesses a minute per page. Stdin keeps it out of ps. |
| Email gate | --email-gate | Readers give an email before viewing; cast publish viewers lists each address with how often and when it opened the page. Not verified. |
| Expiry | --expires 7d | The link closes after a duration (one minute at the shortest; never clears it). The page and its history stay in your list. |
| Edit mode | --edit-mode link|team | Who can edit and publish from the browser; a browser edit records who made it. Default: only you. |
| Session link | --no-session | Hides the page bar's link back to the session that published it, for pages that leave the team. |
$ printf '%s' "$PW" | cast publish deck/ \ --password-stdin --expires 7d --no-session ✓ Northwind launch review v1 → published https://codecast.sh/a/Hm4tQz8YcLw2 gates: password · expires in 7d · session link hidden
Viewer comments, sent back into the session
Anyone with the link can pin a comment to a sentence. The comment remembers the passage and the version it was read at; a teammate signed in to codecast comments as themselves, anyone else types a name. Comments collect on the page as a discussion, and only the page's owner can send them into the session that published it: from the owner link, Send all delivers every unsent comment as one message. The agent reads them, revises the file and republishes to the same link.
The delivery is careful about prompt injection. Viewer text arrives fenced as untrusted feedback, never as instructions, with a header saying the comments were left by viewers of the link and not by the user; a comment that tries to fake the fence has its marker stripped before delivery. Comments are rate limited per page, so a leaked link cannot be used to flood a session, and --no-comments turns the discussion off.
cast publish comments --resolve-all closes the loop.Video: a screen recording that plays like a film
Video and audio inside a published folder upload to media hosting (up to 2 GB each, outside the 8 MB page budget) and keep their relative paths, so <video src="demo.mp4"> just works. A video with controls becomes the cast player, and several clips can play back to back as chapters of one film, deep-linkable with #t=1:30 or #chapter=3. The player takes its styling from the page's CSS (--cast-accent, --cast-font, --cast-aspect) and is scriptable with play(), seek() and goTo(); data-native keeps the browser's own player. A --watch loop does not upload an unchanged file twice.
<cast-player title="Fixing the coupon bug"> <cast-chapter src="c01.mp4" title="Setup" duration="40.6"> <cast-chapter src="c02.mp4" title="The failing run" duration="72.2"> <cast-chapter src="c03.mp4" title="The fix" duration="55.0"> <cast-chapter src="c04.mp4" title="Verified" duration="31.4"> </cast-player>
Everything the owner panel does is a command
The page's owner link (the #o= URL the CLI prints, kept private) opens a panel with stats, who opened it, gates and rollback. Every one of those is also a subcommand, so an agent never needs a browser to manage a page: cast publish ls, versions, rollback, comments, viewers, links, set, rm, all with --json. For a single image, cast image shot.png prints a stable URL and ready markdown instead.





