All posts

Publish a Multi-File Website from ChatGPT or Claude with One Prompt

Ask your AI to publish the whole project, not just one file. Since October 2026 the Hostilo connector accepts a list of files: index.html, CSS, JavaScript, SVG logos and fonts. They go live together in one call, and the links between them are fixed automatically.

Why multi-file sites used to be a hassle

AI apps like to split code the way developers do: index.html, css/style.css, js/app.js and a logo in img/. On most hosts that leaves you two options. You merge everything into one file by hand, or you upload each file separately and check every path. One wrong path and the page loads without its styles.

What changed: the publish_files tool

The Hostilo MCP connector has a new tool, publish_files. The AI sends all the files at once and Hostilo:

The AI writes normal relative paths. It doesn’t need to know anything about the assets/ folder.

How to do it

1

Connect Hostilo once

Add https://hostilo.app/mcp as a custom connector in Claude, ChatGPT or another app that supports MCP, then sign in to Hostilo and click Allow. The full walkthrough is in Publish a website straight from Claude, ChatGPT or Perplexity.

2

Create a site or pick one

Ask: “Create a site called bakery-demo on Hostilo.” Or name a site you already have.

3

Ask for separate files and publish

A prompt that works well:

Build a landing page for my bakery as separate files: index.html,
css/style.css, js/menu.js and an SVG logo in img/logo.svg.
Publish all of them to bakery-demo on Hostilo.

The AI calls publish_files and replies with the live link and a short report: how many files went up and how many links were fixed.

What the AI actually sends

You never have to type this, but it helps to know what happens behind the scenes:

{
  "site": "bakery-demo",
  "files": [
    { "path": "index.html", "content": "<!DOCTYPE html><html>..." },
    { "path": "css/style.css", "content": "body { font-family: system-ui; }" },
    { "path": "img/logo.svg", "content": "<svg xmlns=..." },
    { "path": "fonts/brand.woff2", "content": "d09GMgABAAAA...", "encoding": "base64" }
  ]
}

Text files travel as plain text. Binary files such as fonts or PNG images travel as base64 with "encoding": "base64".

Tip

Ask for logos and icons as SVG. SVG is text, so any chat model can write it. Photos are different: a chat model can’t produce a real JPG, so upload photos in the editor or link to images you already host.

Already have the project as a ZIP?

If the files already exist (a template, an export from another tool or a folder you zipped yourself), you have two ways in:

Hostilo hosts static files: HTML, CSS, JavaScript, images and fonts. A React, Vue or Next.js project has to be built first. Zip the output folder (usually dist or build), not the source code.

For developers: the REST API

The same two operations work with an hk_ API key from the dashboard:

curl -X POST "https://hostilo.app/api?action=publish_files" \
  -H "Authorization: Bearer hk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"site_id":123,"files":[{"path":"index.html","content":"<h1>Hi</h1>"},{"path":"css/style.css","content":"h1{color:#3671E9}"}]}'

curl -X POST "https://hostilo.app/api?action=import_zip&site_id=123" \
  -H "Authorization: Bearer hk_YOUR_KEY" \
  -H "Content-Type: application/zip" --data-binary @site.zip

Add dry_run to get the report without changing anything, and clear_assets to empty assets/ first. Full reference: hostilo.app/agents.

Limits and safety

Files per publish300
Size per file10 MB
Total size20 MB, within your plan’s storage
Allowed fileshtml, css, js, json, jpg, png, gif, svg, webp, avif, ico, woff, woff2, ttf, otf, txt, xml, pdf
Skipped automaticallyPHP and other server files, hidden files such as .env, paths with ../

Every publish keeps the previous index.html in the version history (the last 10 versions). Ask the AI to “restore the previous version” or click it in the editor. Files in assets/ with the same path are replaced, everything else stays where it is.

Frequently asked questions

Do I need Hostilo PRO for this?

No. publish_files and import_zip work on the free plan, within its storage limit.

Will the AI overwrite my existing files?

Only files with the same path are replaced. Everything else stays, unless you ask to clear the assets folder first. Run a dry run to see the list before publishing.

My project already has a folder called assets. Is that a problem?

No. Paths that already start with assets/ don’t get a second prefix, so assets/css/style.css stays assets/css/style.css.

Can I publish several pages, like about.html?

Yes. Extra pages land in assets/ (for example assets/about.html), the link from index.html is updated and links back to index.html are fixed.

Short on time? Read Publish a website from Claude or ChatGPT in under 30 seconds.

Publish your next AI project in one go

Create a free account, connect Hostilo to your AI app and ask it to publish all the files. No credit card.

Start free

More from the blog