npm install.claude-artifact-app/ containing index.html (your exported artifact), main.js (the desktop shell) and a package.json with a ready build block.npm start, no browser chrome around it.dist/: a .dmg (and .zip) for macOS and an .exe (NSIS installer plus portable) for Windows, built by electron-builder.Put your exported artifact into a new folder as index.html, then run:
mkdir claude-artifact-app && cd claude-artifact-app
npm init -y && npm install --save-dev electron@latest electron-builder@latest
cat > main.js <<'EOF'
const { app, BrowserWindow } = require('electron');
function createWindow() {
const win = new BrowserWindow({ width: 1200, height: 800, webPreferences: { contextIsolation: true, nodeIntegration: false } });
win.loadFile('index.html');
}
app.whenReady().then(createWindow);
app.on('window-all-closed', () => app.quit());
EOF
npx electron .Details and verification — in the steps below.

node -v and npm -v must both print a version).What to do: Open the artifact in Claude, use the copy/download control in the artifact panel, and save the result as claude-artifact-app/index.html. The exact control label depends on your plan and UI version — check the documentation if you don't see a download option, and fall back to selecting the code and pasting it into a file.
Why: The desktop shell loads a local file. Whatever you export is the app's entire front end; there is no server behind it.
How to check: Open the file in a browser before touching Electron.
cd claude-artifact-app
python3 -m http.server 8080Пример: open http://localhost:8080/index.html. You should see exactly what the artifact panel showed: same layout, same buttons. Click the main interactive element (a form, a calculator) and confirm it responds. Stop the server with Ctrl+C.
If the artifact is a React/JSX snippet rather than a full HTML document, you need a build step (Vite or similar) first — the procedure is the same as for any web app, see How to Build an App with Vibe Coding.

What to do: Create the project, install Electron (the runtime that renders HTML inside a native window) and electron-builder (the packager), then add main.js and the build config.
npm init -y
npm install --save-dev electron@latest electron-builder@latestReplace the generated package.json with this, keeping name, version and the dependency versions npm wrote:
{
"name": "claude-artifact-app",
"version": "1.0.0",
"main": "main.js",
"scripts": {
"start": "electron .",
"dist": "electron-builder"
},
"build": {
"appId": "org.example.artifactapp",
"files": ["main.js", "index.html", "assets/**/*"],
"mac": { "target": ["dmg", "zip"], "category": "public.app-category.productivity" },
"win": { "target": ["nsis", "portable"] }
},
"devDependencies": {}
}Why: main tells Electron which file opens the window; files tells the packager what to include — anything not listed (your node_modules sources, test files) stays out of the installer. contextIsolation: true and nodeIntegration: false in main.js keep the artifact's JavaScript away from Node APIs, so pasted-in code can't touch the file system.
On Windows, create main.js in PowerShell instead of the heredoc:
@'
const { app, BrowserWindow } = require('electron');
function createWindow() {
const win = new BrowserWindow({ width: 1200, height: 800, webPreferences: { contextIsolation: true, nodeIntegration: false } });
win.loadFile('index.html');
}
app.whenReady().then(createWindow);
app.on('window-all-closed', () => app.quit());
'@ | Set-Content -Encoding UTF8 main.jsHow to check:
npm startA native window opens with your artifact inside. Open the menu View → Toggle Developer Tools and confirm the Console tab is empty of red errors. Ctrl+C in the terminal closes it.

What to do: Run the packager on each target OS.
npm run distWhy: electron-builder reads the build block, bundles the Electron runtime with your files, and emits platform-native installers. A .dmg is the macOS disk image users drag the app from; NSIS is the standard Windows setup wizard.
How to check: Inspect dist/ before installing.
ls -1 distYou should see the packaged app directory plus files named like claude-artifact-app-1.0.0.dmg, ...-mac.zip, ... Setup 1.0.0.exe and a portable .exe. The exact names follow your name and version fields.
Checklist before you ship:
npm start shows the artifact with an empty Consoledist/ contains both a macOS and a Windows artifacthttp://localhost:8080 still work in the windowassets/Install what you built: double-click the .dmg and drag the app to Applications on macOS; run the Setup .exe on Windows. If macOS refuses to open it, see Troubleshooting.
Problem. Electron never installs, npm start fails immediately
Error: Electron failed to install correctly, please delete node_modules/electron and try installing againrm -rf node_modules/electron
npm cache clean --force
npm install --save-dev electron@latestThen re-run npm start. On a corporate network, set HTTPS_PROXY before installing.
Problem. The window opens but the content area is white
Not allowed to load local resource: file:///... or a failed GET for a CDN script./assets/app.js) or pulls a library from a CDN that the packaged app can't reach../assets/app.js) in index.html, put the files inside assets/, and confirm assets/**/* is listed in the files array of package.json. Rebuild with npm run dist.Problem. The installed app is blocked by the operating system
“claude-artifact-app” cannot be opened because the developer cannot be verified.Windows protected your PC with a Don't run button.Open on macOS, or More info → Run anyway on Windows. For distribution, sign and notarize the build — check the Apple and Microsoft signing documentation for current requirements, since the exact flags change between electron-builder releases.You now have the same artifact code running as a native window on macOS and Windows, plus installers in dist/. Next, sign the builds before sharing them, and if you also ship a mobile version, follow How to Publish a Private App on Google Play; if you want to package the logic as a reusable Claude capability instead of a window, see How to Create a Claude Skill.
Can I build the Windows .exe on a Mac?
Yes in principle — electron-builder uses Wine to produce NSIS installers on macOS — but Wine setup is fragile and its output differs from a native Windows build. Building on Windows is the reliable path.
Do I need a paid developer account?
Not to build or run the app locally. Signing certificates are only needed to distribute without the Gatekeeper/SmartScreen warnings; check the platform documentation for what your distribution model requires.
Does the app work offline?
Only if index.html has no external references. Test it by disconnecting the network and running npm start; a blank area or a missing font means a CDN dependency you must bundle locally.
Can I update the artifact later without rebuilding everything?
Replace index.html (and any files in assets/) and run npm run dist again. Bump version in package.json each time so the new installers don't overwrite the old ones.
Status: practical guide. Some statements come from vendors; verify in your environment.
Time to complete: 40–60 minutes Difficulty: Intermediate
Machine data: Citation Map JSON · JSON-LD · Semantic Embeddings — separate stage.
| Entity | Type | Role |
|---|---|---|
| Claude артефакты как приложения | тема/инструмент | упоминается в заголовке, TL;DR или разделах гайда |
| как установить артефакт Claude на Mac | тема/инструмент | упоминается в заголовке, TL;DR или разделах гайда |
| Claude artifacts Windows | тема/инструмент | упоминается в заголовке, TL;DR или разделах гайда |
| Windows | платформа/технология | упоминается в заголовке, TL;DR или разделах гайда |
| macOS | платформа/технология | упоминается в заголовке, TL;DR или разделах гайда |
| Node.js | платформа/технология | упоминается в заголовке, TL;DR или разделах гайда |
| npm | платформа/технология | упоминается в заголовке, TL;DR или разделах гайда |
| Claude | тема/инструмент | упоминается в заголовке, TL;DR или разделах гайда |
No independent confirmation is provided; source claims and editorial conclusions are separated below.
| Source | Type | Role |
|---|---|---|
| No external links | — | — |
Cite as: AI Release. Пошаговое руководство: как превратить артефакт Claude в приложение для macOS и Windows. ai-release.org.