Skip to content

Clone any website into a pixel-accurate Next.js app with AI — Playwright-measured extraction (no eyeballing), spec-gated parallel builder agents, and scored pixel-diff QA at phone/tablet/desktop. Works with Claude Code, Cursor, Copilot + 9 more.

Add update script and Updating section to README (#1)

Mahan Aie6812fcafae5
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 920f029..2c089ea 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [0.3.1] - 2026-10-30
+
+### Added
+
+- `scripts/update.sh` — pulls the latest version into a fork or clone, keeps your own commits, and runs `npm install` when dependencies change. Template copies get a clear message instead of a broken merge
+
## [0.3.0] - 2026-07-22
Renamed **site-cloner → ai-site-cloner**. Efficiency overhaul driven by measurements from a full plausible.io benchmark run (now in `examples/plausible/`): ~50% less agent-facing artifact surface and a QA phase that costs a handful of page loads on a good clone.
@@ -72,6 +78,7 @@ Renamed **site-cloner → ai-site-cloner**. Efficiency overhaul driven by measur
- Uploadthing example clone in `examples/`
- MIT license
+[0.3.1]: https://github.com/Mahanaicoach/ai-site-cloner/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/Mahanaicoach/ai-site-cloner/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/Mahanaicoach/ai-site-cloner/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/Mahanaicoach/ai-site-cloner/releases/tag/v0.1.0
diff --git a/README.md b/README.md
index 8344ed3..b856fd6 100644
--- a/README.md
+++ b/README.md
@@ -160,6 +160,21 @@ Platform migration of sites you own · recovering lost source code · learning h
**Not for** phishing, impersonation, or passing off someone else's design as your own. Check a site's terms before cloning it. The example clones in this repo (plausible.io, uploadthing.com) are technical demonstrations — don't republish anyone's brand.
+## Updating
+
+In a fork or a clone of this repo, pull the latest version with:
+
+```bash
+bash scripts/update.sh
+```
+
+It keeps your own commits and runs `npm install` when dependencies change.
+Forked it on GitHub? Run `git push` afterwards, or click **Sync fork** on your fork's
+page.
+
+Made your repo with **Use this template**? It shares no history with this one, so git can't merge
+updates into it. Read the [CHANGELOG](CHANGELOG.md) and copy over the files you want.
+
## License
MIT
diff --git a/package-lock.json b/package-lock.json
index d1a5320..619a975 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "site-cloner",
- "version": "0.1.0",
+ "version": "0.3.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "site-cloner",
- "version": "0.1.0",
+ "version": "0.3.1",
"license": "MIT",
"dependencies": {
"@base-ui/react": "^1.3.0",
diff --git a/package.json b/package.json
index 8c6b9dc..3a66c40 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ai-site-cloner",
- "version": "0.3.0",
+ "version": "0.3.1",
"private": true,
"description": "Clone any website into a pixel-accurate Next.js codebase with AI — scripted Playwright extraction (no eyeballing), spec-gated parallel builder agents, and scored pixel-diff QA at phone/tablet/desktop",
"author": "Mahanaicoach",
diff --git a/scripts/update.sh b/scripts/update.sh
new file mode 100755
index 0000000..ea7e915
--- /dev/null
+++ b/scripts/update.sh
@@ -0,0 +1,59 @@
+#!/usr/bin/env bash
+# Update this kit to the latest version from github.com/Mahanaicoach/ai-site-cloner.
+# Works whether you cloned the original repo or your own fork. Your own commits
+# are kept: git merges the update into them.
+#
+# bash scripts/update.sh
+set -euo pipefail
+
+UPSTREAM="https://github.com/Mahanaicoach/ai-site-cloner.git"
+BRANCH="main"
+
+KIT_DIR="$(cd "$(dirname "$0")/.." && pwd -P)"
+cd "$KIT_DIR"
+
+# A ZIP download has no git history. Check the top level too, so a copy inside
+# another repo (for example a git-tracked ~/.claude) is never merged into it.
+if [ "$(git rev-parse --show-toplevel 2>/dev/null)" != "$KIT_DIR" ]; then
+ echo "This folder is not a git clone of the kit, so it can't update itself."
+ echo "Clone it again: git clone $UPSTREAM"
+ exit 1
+fi
+
+if ! git diff --quiet HEAD --; then
+ echo "You have uncommitted changes. Save them with 'git stash' (or commit them), then run this again."
+ exit 1
+fi
+
+git remote get-url upstream >/dev/null 2>&1 || git remote add upstream "$UPSTREAM"
+git fetch --quiet upstream "$BRANCH"
+
+if ! git merge-base HEAD "upstream/$BRANCH" >/dev/null; then
+ echo "This copy shares no history with the original (it was made with 'Use this template',"
+ echo "or it is a shallow clone), so git can't merge updates into it."
+ echo "See what changed: https://github.com/Mahanaicoach/ai-site-cloner/commits/$BRANCH"
+ exit 1
+fi
+
+BEFORE="$(git rev-parse HEAD)"
+if ! git merge --no-edit "upstream/$BRANCH"; then
+ echo
+ echo "The update conflicts with your own changes in the files listed above."
+ echo "Fix them, then run: git add -A && git commit --no-edit"
+ echo "Or undo the update: git merge --abort"
+ exit 1
+fi
+
+if [ "$BEFORE" = "$(git rev-parse HEAD)" ]; then
+ echo "Already up to date."
+else
+ echo "Updated. What's new:"
+ git log --oneline --no-merges -n 20 "$BEFORE..HEAD"
+ if ! git remote get-url origin 2>/dev/null | grep -qi "mahanaicoach/ai-site-cloner"; then
+ echo "Your fork on GitHub is still on the old version. Run 'git push' to update it too."
+ fi
+fi
+
+if ! git diff --quiet "$BEFORE" HEAD -- package.json package-lock.json; then
+ npm install
+fi