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