docs: a README about this repo, not the scaffold it was generated from

It documented a generated starter — an /improve project URL, 'Share -> Publish'
to deploy, and `npm i && npm run dev` for a repo that builds with pnpm and a
frozen lockfile. None of it described hanzo.sh, and the deploy section pointed
somewhere that has never deployed this host.

It now says what the one command installs, that the served file is a polyglot,
that downloading belongs to hanzoai/cli/install.sh and should stay there, and how
to exercise an installer change under both published shells before deploying.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
Hanzo Dev
2026-08-01 11:42:02 -07:00
parent da709476bd
commit 7099ac68a5
+43 -56
View File
@@ -1,74 +1,61 @@
# hanzo.sh
## Welcome to your Hanzo project
## Project info
**URL**: https://hanzo.app/projects/dedf1346-02b9-4baa-9273-6df78b702788/improve
## How can I edit this code?
There are several ways of editing your application.
**Use Hanzo App**
Simply visit Hanzo App at [hanzo.app](https://hanzo.app) and start prompting.
**Use your preferred IDE**
If you want to work locally using your own IDE, you can clone this repo and push
changes. Pushed changes will also be reflected in the Hanzo App.
The only requirement is having Node.js & npm installed - [install with nvm](https://github.com/nvm-sh/nvm#installing-and-updating)
Follow these steps:
The install surface for the Hanzo tools. One command:
```sh
# Step 1: Clone the repository using the project's Git URL.
git clone <YOUR_GIT_URL>
# Step 2: Navigate to the project directory.
cd <YOUR_PROJECT_NAME>
# Step 3: Install the necessary dependencies.
npm i
# Step 4: Start the development server with auto-reloading and an instant preview.
npm run dev
curl -fsSL https://hanzo.sh | sh
```
**Edit a file directly in GitHub**
That downloads one prebuilt native binary per tool, verifies its sha256, and puts
it on PATH — no runtime, no package manager, no build step:
- Navigate to the desired file(s).
- Click the "Edit" button (pencil icon) at the top right of the file view.
- Make your changes and commit the changes.
| tool | also installed as | source |
|---|---|---|
| `hanzo` | `hanzo-node` | [hanzoai/cli](https://github.com/hanzoai/cli) |
| `hanzo-mcp` | `mcp` | [hanzoai/mcp](https://github.com/hanzoai/mcp) |
**Use GitHub Codespaces**
Each pair is one build, symlinked, so the two names can never be two versions.
Re-run to upgrade. One tool at a time:
- Navigate to the main page of your repository.
- Click on the "Code" button (green button) near the top right.
- Select the "Codespaces" tab.
- Click on "New codespace" to launch a new Codespace environment.
- Edit files directly within the Codespace and commit and push your changes once you're done.
```sh
curl -fsSL https://hanzo.sh/cli | sh
curl -fsSL https://hanzo.sh/mcp | sh
```
## What technologies are used for this project?
## This repo
This project is built with Hanzo and these open source projects:
`dist/index.html` is a **polyglot** — the same bytes are the landing page in a
browser and the installer under `sh`. `public/install.sh` is the installer;
`scripts/build-polyglot.js` wraps the built HTML in a heredoc and appends it.
- Vite
- TypeScript
- React
- shadcn-ui
- Tailwind CSS
Downloading is NOT implemented here. `hanzoai/cli/install.sh` is the one
implementation of "fetch a Hanzo binary" — platform detection, asset naming,
checksum verification, the second-name symlink — and this drives it once per
tool. Keep it that way; a second copy of platform detection is a second thing to
drift.
## How can I deploy this project?
```sh
pnpm install
pnpm dev # vite, :8080
pnpm build # -> dist/, including the polyglot rewrite
pnpm lint
```
All Hanzo projects can be deployed directly via Hanzo App and the Hanzo
Platform.
Test an installer change without deploying, under **both** published shells:
Simply visit your project at [Hanzo App](https://hanzo.app/projects/dedf1346-02b9-4baa-9273-6df78b702788/improve) and click on Share -> Publish.
```sh
cd dist && python3 -m http.server 8791 &
curl -fsSL http://127.0.0.1:8791 | sh
curl -fsSL http://127.0.0.1:8791 | bash
```
## I want to use a custom domain - is that possible?
## Deploying
Yes we do. Please deploy with Hanzo Platform for this advanced functionality.
Automatic: `.github/workflows/deploy.yml` builds and publishes the Cloudflare
Worker on every push to `main`, then re-fetches https://hanzo.sh and **fails if
the live bytes are not the bytes it just built**. This host was hand-published
for a long time, which is how a merged fix sat unseen for weeks while
`curl hanzo.sh | sh` kept handing out the old installer — so verifying the live
URL is part of deploying, not a follow-up.
`LLM.md` has the details, including the unfinished migration to `hanzoai/static`.