Artifact tools
Command Code publishes and manages artifacts with two tools. You don't call them yourself: you ask, and Command Code picks the tool. This page is for when you want to know exactly what it can do.
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. |