# Rune Rune publishes one file at a stable public URL. ## Access Viewing needs no authentication. Publishing, replacement, and deletion require an owner-provided bearer token. There is no public signup. Use a configured RUNE_TOKEN. If credentials are missing, ask the owner. Keep the token out of uploaded files and chat output. ## Publish curl --fail-with-body \ 'https://api.rune.page/uploads?filename=report.html' \ -H "Authorization: Bearer $RUNE_TOKEN" \ -H 'Content-Type: text/html' \ --data-binary @report.html Use the file's MIME type and URL-encode the filename query value. The body is the file itself, not multipart. Content-Length is required; curl supplies it for the file command above. Success: HTTP 201 with { id, url, etag }. Keep the stable url for updates; the ID is in its hostname, and the current ETag can be fetched when needed. Return url to the user only after success. The link is public; do not upload secrets. ## Update the same link HEAD https://api.rune.page/uploads/ with the bearer token gets the current ETag. PUT to https://api.rune.page/uploads/?filename= with the file body, Content-Type, Content-Length, bearer token, and If-Match: . Success: HTTP 200 with { id, url, etag }. Use the API ETag, not the public viewer's ETag. Keep its surrounding quotes. On 412, stop and inspect the newer revision before replacing it. ## Delete DELETE https://api.rune.page/uploads/ with the bearer token. Success: HTTP 204. Deletion is permanent; do it only when requested. ## CLI, if already installed rune publish report.html --json rune replace report.html --json rune replace report.html --json rune delete Without --json, publishing prints just the URL. The CLI reads RUNE_TOKEN or its configured token file. Use HTTP if no CLI is installed. Use a bare ID or the root publication URL, without a query or fragment. After a successful upload, the CLI saves the URL in the local HTML file as . Preserve this tag when editing. rune replace report.html reads it and fetches the current API ETag. No separate metadata file or saved ETag is needed. Other formats and HTML without a tag use the explicit ID-or-URL form. Publishing always creates a new link, even if the file already has a tag; the CLI then updates the local tag to the new URL. It does not upload again just to add the tag to the hosted copy. If saving the tag fails, the upload still succeeded: keep the printed URL and use explicit replacement. With direct HTTP, agents can add the same stable URL tag to local HTML after publication. It needs no update after replacement at the same URL. ## Formats HTML: inline styles and scripts; embed assets as data URLs. No external assets, fetch, same-origin storage, forms, or frames. Markdown: GFM tables and task lists; embedded HTML is escaped. Large or dense documents display as text. Render limits: 64 KiB input, 2,048 non-letter/non-number/non-space characters, 512 KiB output. Images are centered; audio/video use browser controls. PDF uses the browser viewer. JSON, CSV, XML, and other text display as text. ZIP, Office, and unknown binaries show a 4 KiB hex preview, not the intact file. Rune is not an archive or Office-file transfer service. /raw on a publication host returns original supported media/PDF bytes or text source. Unsupported binaries still get a preview. Rune never requests an attachment download; browser handling may vary. ## Limits and failures 100,000,000 bytes/file. Project-wide UTC-day budget: 100 new-publication reservations and 1,000,000,000 uploaded source bytes. Replacements count their full size toward bytes, not new-publication slots. Failed uploads can retain reservations. Deletion does not refund the daily budget. Existing links have no automatic expiry. 401: check credentials. 404: check the publication ID. 411: supply Content-Length. 413: reduce file size. 429 or 503: respect Retry-After before trying again; upload bursts can be rejected. Avoid parallel uploads. Reads and mutations are throttled. Create is not idempotent. If its success response is lost, do not blindly retry: the file may already have been published. Report the uncertainty.