| name | publish |
| description | Publish complete HTML pages to a live public The Artifact URL. Use when the user asks to publish, host, share, deploy, upload, or update a static HTML report, page, or artifact online with The Artifact. Supports creating no-login API keys, creating artifacts, updating an artifact by id, listing artifacts, and deleting artifacts through The Artifact API. |
Publish
Requirements
- Python 3.10 or newer.
- A deployed Convex HTTP URL for The Artifact, set as
ARTIFACT_API_BASE or passed with --api-base.
- An API key for The Artifact, set as
ARTIFACT_API_KEY or passed with --api-key. If the user does not have a key, create one with --create-key.
Use scripts/publish_html.py for deterministic publishing. Generate or verify a complete HTML document before publishing; include <html>, <head>, and <body>, not only a fragment.
First-time setup
- Set the API base for the user's deployment:
export ARTIFACT_API_BASE="https://<your-deployment>.convex.site"
- If the user does not already have an API key, create one:
python3 scripts/publish_html.py --create-key
- Save the returned
apiKey for future requests:
export ARTIFACT_API_KEY="artifact_..."
Operations
Create a new public artifact:
python3 scripts/publish_html.py page.html --title "My Page"
Create a key and publish in one command when the user wants the simplest one-off flow:
python3 scripts/publish_html.py page.html --title "My Page" --create-key
Update an existing artifact while preserving its URL:
python3 scripts/publish_html.py page.html --id abc123 --title "Updated title"
List active artifacts:
python3 scripts/publish_html.py --list
Delete an artifact:
python3 scripts/publish_html.py --delete abc123
Notes
- The public skill must not embed private API keys. Use
ARTIFACT_API_KEY or --api-key.
- Use
ARTIFACT_API_BASE or --api-base to point at the user's Convex HTTP deployment.
- Legacy
MYSITE_API_BASE and MYSITE_API_KEY env vars are still accepted as fallbacks.
- Send
X-Artifact-Title when a title is known.
- Use file upload mode instead of inline shell
-d '<html>...' to avoid escaping bugs.
- Show the returned public
url to the user.
- Keep the returned
id if the user may want the same URL updated later.
- Keep the returned
claimUrl if a generated key may need to be claimed by an account later.
- Do not publish local secrets,
.env contents, private tokens, or non-public customer data unless the user explicitly asks and publication is appropriate.
- If publishing fails with quota or auth errors, list artifacts to inspect existing items, then report the blocker.