[ Web Proxy ]
URL:
Viewing: https://commandcode.ai/docs/artifacts [Back]  [Original]

Artifacts | Command Code - Command Code Docs

Artifacts

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.

In a session

make me a page that charts last week's signups
Copy

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:

Sharing

share it publicly # anyone with the link can open it make it private again # the link stops working for them right away
Copy

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.

Managing

list my artifacts # each one with its link delete the signups page # gone everywhere, every version
Copy

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.

LimitValue
Page size2 MB
Artifacts per account200 at a time
Versions per artifact50
Publishes20 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.

ToolDoes
artifact_publishPublishes an HTML file as a new artifact, or a new version.
artifact_manageLists 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.

ParameterTypeRequiredDescription
file_pathstringyesAbsolute path of the HTML file, inside the workspace. Up to 2 MB.
titlestringfor a new artifactTitle shown above the page. On a new version, renames it.
artifact_idstringnoPublish a new version of this one. Same link.
visibilitystringnoprivate (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.

ParameterTypeRequiredDescription
actionstringyeslist, visibility or delete.
artifact_idstringfor visibility and deleteThe artifact to act on.
visibilitystringfor visibilityprivate or public.
ActionDoes
listYour artifacts, newest first, with each one's link and deletion date.
visibilitypublic lets anyone with the link open it. private takes that back.
deleteDeletes it and every version. The link stops working.

What you seeWhy
The file is too bigPages are capped at 2 MB. Move big data or images to outside URLs.
Too many artifact publishes20 publishes a minute. Wait a minute.
Usage exceededYou have 200 artifacts, or this one has 50 versions. Delete some first.
Not foundIt was deleted, or it expired 7 days after its last publish.
Table of ContentsOn This Page

Join our Discord

Chat with us and become part of the Command Code community.

Join Discord

Need help?

Open an issue on GitHub, ask on Discord, or reach out on .

Get help

Web Proxy Viewer  |  New URL  |  Original Page