Share an HTML report from a coding agent
6 min read
Published · Updated
Once your agent has written report.html, one upload gives it a stable URL. Use a public upload when anyone with the link should be able to read the report.
pushbag upload report.html --public
Run this in the directory containing the file with an Artifacts or Both key configured. The CLI writes the artifact URL to standard output and progress details, including the artifact ID, to standard error. Paste the URL into the review thread. The reader can open the report without checking out your branch.
Revise the report at the same address
Save the artifact ID from the first upload. After the agent rewrites the file, target that ID (replace ARTIFACT_ID below):
pushbag upload report.html --artifact ARTIFACT_ID --json
In the returned array, url opens the latest version and versionUrl opens the numbered version just published. Use the first in a recurring project update. Use the second in a decision record where someone needs to see what the reviewer saw. Uploading again without --artifact creates another artifact.
Start private when the report contains internal data
pushbag upload report.html --private --json
The private artifact still has a stable URL. As the signed-in owner you can open it directly. To give another reader temporary access, take the id from the upload result and run:
pushbag open ARTIFACT_ID
Share the resulting grant URL only with the intended reader. It carries access until the grant expires, so putting it in a public issue would also give that issue’s readers access. Privacy and versions · Sharing HTML reports
Build a report that travels as one file
Start with the smallest document that answers the review question. For a migration, a reviewer might need the proposed order of operations, the check that separates one phase from the next, and a screenshot of the final UI. Save the following as report.html. It works as written without any companion files.
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Index migration review</title>
<style>
body { max-width: 48rem; margin: 2rem auto; padding: 0 1rem; font: 1rem/1.5 system-ui; }
summary { cursor: pointer; }
</style>
<h1>Index migration review</h1>
<p>Check the query plan before switching reads to the new index.</p>
<pre class="mermaid">
flowchart LR
Build --> Verify --> Switch
</pre>
<details><summary>What the reviewer should verify</summary>
<p>Compare the chosen index and rows examined for the same query parameters.</p>
</details>
</html>
Ask the agent to embed measurements from the run alongside the diagram. A request to a local metrics server might work in the agent’s browser and fail on the reviewer’s phone. A report with a fixed dataset also lets two people inspect the same result. Put the run identifier and the revision that produced it in the document itself, especially if a reviewer might download the page and read it later.
Keep styles inside the document. If a generator emits a stylesheet next to the HTML, copy its required rules into a style element. The upload policy reports External stylesheet <link> elements are not allowed. A browser preview from the build directory can hide this problem because all the build products happen to be together there. Also drop any Mermaid CDN script your generator normally includes. Pushbag renders supported blocks marked with the Mermaid class to SVG during upload. The CLI checks the diagram locally and identifies the block number if parsing fails.
Include the screenshot the agent actually saw
For a local screenshot, add an element such as <img src="./captures/query-plan.png" alt="Query plan after the new index was built">. Keep the image at that path relative to the HTML file. By default the CLI reads the local image and replaces its reference with a data URI before it sends the document. This puts the image in the report, even on a plan that only accepts HTML artifacts. The CLI recognizes PNG, JPEG, WebP, GIF, AVIF, and SVG for inlining.
A missing file produces a path followed by : not found and the instruction Fix the references, or pass --no-inline to upload the page as written. Correct the path or regenerate the capture. Turning inlining off cannot make a reviewer’s browser read a file on your laptop. Reduce large captures before publication. Base64 encoding adds bytes, so the original HTML file’s size alone can underestimate the upload.
Have the agent keep a receipt
For a recurring report, write upload output to a file and check the command’s exit status before extracting anything. With jq installed, the following shell sequence publishes privately, keeps the artifact ID, then reads the numbered URL. Run it once for a new report.
pushbag upload report.html --private --json > upload.json &&
jq -er '.[0].id' upload.json > report.id &&
jq -er '.[0].versionUrl' upload.json
On the next run use pushbag upload report.html --artifact "$(cat report.id)" --json. Keep the ID somewhere the next agent invocation can read. Treat the receipt as data. A successful entry includes the filename, kind, visibility and version number. A failed invocation can return an error instead. Reading a URL only after success avoids posting a null or stale link when the report exceeds a limit. To notify your phone when the report is published, add --notify with a Both key. The alert targets the published version and keeps its visibility.
Budget for retained versions
| Plan | HTML per upload | Versions per artifact | Artifact count | Default inactive lifetime |
|---|---|---|---|---|
| Free | 10 MiB | 20 | 4,800 | 30 days |
| More | 10 MiB | 200 | 50,000 | 90 days |
| Even more | 20 MiB | 500 | Unlimited count | 90 days |
Inactivity runs from the later of the last view and last publish. A pin identifies the version while it is available. Keep a copy of the report with the build outputs if an audit has its own retention requirement. For a final review, open the numbered link in the browser the reviewer will use, expand the details, and check the diagram and screenshot at phone width. A private link in a signed-out browser is also a quick check that the access boundary matches your intention. Artifact limits · CLI reference · Static HTML hosting comparison
Frequently asked questions
Which link should I put in a review?
Use versionUrl for the version reviewed and url for a standing link to the latest upload.
Does the reviewer need the Mermaid library installed?
No. Supported diagrams render to SVG during publication. The reviewer receives the rendered figure.
Will a second upload update the link I already sent?
Supply the original artifact ID with --artifact. An upload without a target creates a separate artifact.