htmlhost.co
clicloneworkflowtutorialproject setup

Clone Any Deployed Site into a Local Project

htmlhost.co·September 17, 2026·3 min read
Clone Any Deployed Site into a Local Project

Starting from the browser, continuing in your editor

Not every project starts in a code editor. Maybe you built a quick landing page using the htmlhost web editor. Maybe you used the AI to generate a page and published it on the spot. Or maybe someone shared a deployed site with you and you want to work on it locally.

In all of these cases, the site exists on the server but you don't have the files on your machine. That's where htmlhost clone comes in.

How cloning works

Run the command with the site's slug (the part before .htmlhost.co in the URL):

htmlhost clone my-site

The CLI creates a new folder called my-site in your current directory, downloads every page and asset from the live site, and writes them as local files. It also creates a .htmlhost link file so you can immediately start using htmlhost deploy and htmlhost pull.

The output shows each file as it's written:

  ℹ Cloning my-site.htmlhost.co…
    Version 3 · 4 pages · 2 assets

  ✓ index.html (3.2 KB)
  ✓ about.html (1.8 KB)
  ✓ contact.html (1.1 KB)
  ✓ blog.html (2.4 KB)
  ✓ styles.css (4.7 KB)
  ✓ logo.png (12.3 KB)

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  ✓ Cloned 6 files into ./my-site
    Linked → .htmlhost · my-site.htmlhost.co

    Deploy changes:  htmlhost deploy
    Pull updates:    htmlhost pull

Cloning into a specific directory

By default, the CLI creates a folder named after the slug. If you want a different folder name, pass it as a second argument:

htmlhost clone my-site ./portfolio

This clones the site into ./portfolio instead of ./my-site.

When the folder already exists

If the target directory exists and contains files, the CLI stops and suggests using htmlhost pull instead (since pull is designed for syncing an existing project). If you're sure you want to overwrite, use the --force flag:

htmlhost clone my-site --force

Use case: moving a browser project to VS Code

This is the most common reason to clone. You prototyped a site in the web editor, maybe used the AI to flesh out the design, and now you want the full power of your local development environment. VS Code extensions, Git version control, your own build tools.

Clone the site, open the folder in your editor, and you're off. Every change you make locally can be pushed live with htmlhost deploy.

Use case: onboarding a new team member

If you've invited a collaborator to a site, they can clone it to get a local copy without needing access to your machine or your Git repo. They run:

htmlhost clone the-shared-site

And they have every file. From there, they can make changes locally and deploy, or use htmlhost pull to stay in sync with edits made by others.

Use case: creating a local backup

Even if you don't plan to edit locally, cloning is a quick way to snapshot a live site's files onto your machine. It's a one-command backup that preserves the full file structure.

What happens after cloning

Once you've cloned, your local folder is a fully linked htmlhost project. The workflow from here is the same as if you'd started locally:

  • htmlhost deploy pushes your local changes to the live site
  • htmlhost pull downloads any changes made on the server (via the web editor or by collaborators)
  • The CLI checks for conflicts before you deploy, so you won't accidentally overwrite someone else's work

Quick reference

CommandWhat it does
htmlhost clone my-siteClone into a ./my-site folder
htmlhost clone my-site ./projClone into a specific directory
htmlhost clone my-site --forceOverwrite an existing non-empty directory

Ready to try it yourself?

Paste HTML, get a link. Deploy your site in under 3 seconds — no config, no build step.

Start hosting