| [ Web Proxy ] |
| Viewing: https://commandcode.ai/docs/artifacts | [Back] [Original] |
Ask for something to look at, like a report, a dashboard, a chart or a quick prototype, and Command Code builds it as a web page and hands you a link. Open it in your browser. Share it if you want to.
There is no command to learn. You just ask.
make me a page that charts last week's signups
Command Code writes the page to an HTML file in your project, publishes it, and gives you the link. In the default permission mode it asks you first, the same as for any tool that changes something.
It does this on its own when the answer is easier to look at than to read in the terminal, and whenever you mention an artifact.
A new artifact is private. The link opens for you, signed in to commandcode.ai in your browser, and shows "not found" to everyone else. The first time, it sends you through sign-in and straight back to the page.
To let someone else see it, say so:
share it publicly # anyone with the link can open it
make it private again # the link stops working for them right away
Nobody but you can change it, whether it is private or public.
Ask for the change. Command Code edits the same file and publishes a new version, and the link stays the same, so whoever you sent it to sees the new page next time they open it.
list my artifacts # each one with its link
delete the signups page # gone everywhere, every version
An artifact is deleted 7 days after the last time it was published. Publishing a new version starts the 7 days again.
The HTML file stays in your project, so nothing is lost. Ask Command Code to publish it again and you get a fresh link.
A page is one HTML file. It can use inline CSS and JavaScript, and scripts or styles from a CDN.
It runs in a sandbox, so it can't see your Command Code account, your cookies or anything else on the site. That also means it can't save anything in the browser: localStorage, sessionStorage, IndexedDB and cookies all fail, so a page keeps its state in memory. It can't navigate the whole browser tab away either. Command Code knows this and builds pages that way.
| Limit | Value |
|---|---|
| Page size | 2 MB |
| Artifacts per account | 200 at a time |
| Versions per artifact | 50 |
| Publishes | 20 a minute |
Deleted and expired artifacts don't count toward the 200.
Don't want Command Code publishing anything? Open /config and switch Artifacts off. From your next message it can't publish, and it stops offering to. Your existing artifacts stay up until they expire, and you can still open them. To share, unshare or delete one, switch it back on first.
Switch it back on the same way. The setting is saved as artifactsEnabled in config.json, and the desktop app shows the same switch in its settings.
Command Code uses two tools for this. You don't call them yourself: you ask, and Command Code picks the tool. This section is for when you want to know exactly what it can do.
| Tool | Does |
|---|---|
artifact_publish | Publishes an HTML file as a new artifact, or a new version. |
artifact_manage | Lists your artifacts, makes one public or private, deletes one. |
Both run through Command Code's own servers, like the web tools, so they work with every model. They load only when a session needs them. artifact_manage with list runs without asking; everything else asks first in the default permission mode.
Publishes an HTML file from your project as a new artifact, or as a new version of one you already have.
| Parameter | Type | Required | Description |
|---|---|---|---|
file_path | string | yes | Absolute path of the HTML file, inside the workspace. Up to 2 MB. |
title | string | for a new artifact | Title shown above the page. On a new version, renames it. |
artifact_id | string | no | Publish a new version of this one. Same link. |
visibility | string | no | private (the default) or public. |
A new title or visibility goes out together with the new version. If the publish fails, nothing changes: the old version stays up, shared or not, exactly as it was.
The result has the link, the artifact_id, whether it is private or public, and when it will be deleted.
Everything else about your artifacts.
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | yes | list, visibility or delete. |
artifact_id | string | for visibility and delete | The artifact to act on. |
visibility | string | for visibility | private or public. |
| Action | Does |
|---|---|
list | Your artifacts, newest first, with each one's link and deletion date. |
visibility | public lets anyone with the link open it. private takes that back. |
delete | Deletes it and every version. The link stops working. |
| What you see | Why |
|---|---|
| The file is too big | Pages are capped at 2 MB. Move big data or images to outside URLs. |
| Too many artifact publishes | 20 publishes a minute. Wait a minute. |
| Usage exceeded | You have 200 artifacts, or this one has 50 versions. Delete some first. |
| Not found | It was deleted, or it expired 7 days after its last publish. |
| Web Proxy Viewer | New URL | Original Page |