Skip to content

About

Open Artifacts plugin for Codex and ChatGPT desktop (prebuilt; also its plugin marketplace)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Open Artifacts for Codex and ChatGPT desktop

Slide decks, design canvases, whiteboards, spreadsheets, data dashboards, docs, animated films and design systems as folders of files that open in one local page where you view, edit and comment. Ask for /open-artifacts slides …, design …, whiteboard …, sheets …, data …, docs …, motion … or page … (the skill is open-artifacts:open-artifacts).

Install

With Node.js 22.18+ installed, add the prebuilt plugin repository as a marketplace with the Codex CLI. Nothing is downloaded by hand:

codex plugin marketplace add openartifactsai/open-artifacts-codex

Then install Open Artifacts from /plugins in the Codex CLI or the Plugins tab of the Codex or ChatGPT desktop app (or codex plugin add open-artifacts@open-artifacts), and start a new session. Codex runs plugin hooks only once you approve them in /hooks (again after each update); the tools work before that.

Without network access to GitHub, download open-artifacts-plugins.zip from GitHub Releases, extract it to a permanent location and register that folder instead: codex plugin marketplace add "/path/to/open-artifacts-plugins".

Upgrade

codex plugin marketplace upgrade open-artifacts

This fetches the newest release and updates the installed plugin. Restart the desktop app to refresh the plugin, and start a new session.

If you registered the extracted ZIP or a checkout's dist/plugins directory, run codex plugin marketplace remove open-artifacts once, then follow Install to switch to the repository. To stay on the ZIP, replace the extracted folder at the same path with the one from the new ZIP and run codex plugin add open-artifacts@open-artifacts again.

Switching from open-artifact

Up to 0.22 the plugin was named open-artifact. It keeps working until you switch: its runtime keeps updating itself, to the newest @openartifactsai/cli (see Switching from the open-artifact plugin). To switch, remove the old plugin and its catalog (or uninstall Open Artifact in /plugins or the Plugins tab), then follow Install:

codex plugin remove open-artifact@open-artifact
codex plugin marketplace remove open-artifact

Where artifacts go

New artifacts go under the thread's folder (artifacts/<slug>). In a Git checkout the daemon adds artifacts/.gitignore when it makes that folder, so they stay out of git status. Codex starts the MCP server in the plugin's own folder, so the daemon looks the thread's folder up: from its hook, or from the thread's rollout file in ~/.codex/sessions ($CODEX_HOME).

To keep them under your own Open Artifacts folder instead (~/OpenArtifacts/<project>/<slug>), run open-artifacts config set artifactsLocation home and let Codex write there: codex --add-dir ~/OpenArtifacts, or sandbox_workspace_write.writable_roots = ["/Users/you/OpenArtifacts"] in config.toml (without it, workspace-write refuses the write). See Settings.

What it adds

  • mcp.json: the Artifact, ArtifactData and ArtifactComments tools (stdio, through the local daemon);
  • skills/open-artifacts/: the skill, carrying the daemon;
  • hooks/hooks.json: SessionStart, UserPromptSubmit and Stop.

Pages that ask a model

A page can ask a model for text (use("sample")). The Codex CLI can answer it with your own Codex plan: the page's consent dialog lists Codex, "through its command line", with the line "Uses your Codex plan. While it writes, Codex's command line can still read files on this computer, and text in the page could steer it to." Nothing is sent until you allow the page, and the Shell's AI models panel shows each artifact's calls.

  • Each round runs codex exec --sandbox read-only --ephemeral once, in an empty temporary folder, without your Codex config or rules (generate in packages/daemon/harnesses/codex.json). Its arguments make it read-only but cannot take its tools away, hence the notice. The page's prompt never becomes a turn of your session.
  • Every tier answers with Codex's own default model. The answer arrives whole, not as it is written. Text only, no images; a page's tools are described to the model in text.
  • It is offered only when codex is on PATH, or the copy inside the ChatGPT desktop app is installed (or OPEN_ARTIFACTS_CODEX_BIN names the program). open-artifacts doctor --harness codex says whether Codex can answer, and by which way.

This entry was checked against one captured run of codex.

Publish to a server

Codex gives a plugin's MCP server only a few variables of its own (HOME, PATH, USER, …), so OPEN_ARTIFACTS_* variables in your shell do not reach Open Artifacts. Put them in ~/.agents/open-artifacts/preset.json instead ({ "OPEN_ARTIFACTS_REMOTE": "https://artifacts.example.com" }), or link a site yourself with open-artifacts remote add <name> <https://host>. See the plugins README.

Send to agent

Comments sent from the page reach the thread that made the artifact at session start, with your next message, or, when they arrive while Codex works, by keeping its turn going (the Stop hook). Without the hooks they come with the thread's next Open Artifacts tool call. While the thread is idle, the daemon queues a short message for it with codex queue --thread <id> --message … (the codex the ChatGPT app carries, else the one on the PATH; $OPEN_ARTIFACTS_CODEX_BIN names another). The desktop app runs a queued message as soon as the thread is idle (tried with a thread open in the ChatGPT app), which starts a turn that handles the comments. A thread run only from the command line (codex exec) gets it the next time it is resumed.

The page opens in the app's built-in browser, which the agent opens with the page's view_url, not in the computer's browser.

The card in the conversation

Codex shows MCP Apps, so the agent also gets ShowArtifact. Codex frames only https pages inside these cards, and the daemon serves the page over http on this computer, so the card cannot show the page itself: it says so at once and offers Open in browser (Codex opens the address where its Local URL open destination setting says) and the page's address to copy. The agent's reply still carries view_url.

About

Open Artifacts plugin for Codex and ChatGPT desktop (prebuilt; also its plugin marketplace)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages