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

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

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

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. Their parameters are on Artifact tools.

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.