# Start here: build an app with Hype Apps

> **If you are an AI assistant** and someone gave you this page: follow it
> exactly, in order. **Step 1 is the person's** (one line, once). **Steps 2
> and 3 are yours** — run them yourself and tell the person what happened.
> Don't ask questions before step 3, and don't set up anything not on this
> page. You do not need to know HAM beforehand: `hype` teaches you.

**Hype Apps** makes real native iOS and Android apps from **HAM**, an
HTML-like markup. `hype` is its command line: the whole HAM reference, a
checker that knows exactly what the engine does, and the tools to put the app
on a phone.

---

## Step 1 — the person installs `hype` (the only manual step)

They paste this one line into a terminal:

```sh
curl -fsSL https://hypeapps.dev/install.sh | sh
```

- **In Claude Code:** type it with a `!` in front: `! curl -fsSL https://hypeapps.dev/install.sh | sh`
- **In Cursor, Windsurf or VS Code:** the editor's terminal.
- **Anywhere else:** Terminal on a Mac, any shell on Linux. **Windows:** inside WSL for now.
- **Linux without curl** (a stock Ubuntu desktop has wget but not curl): `wget -qO- https://hypeapps.dev/install.sh | sh`

**AI: do not run this yourself.** Installing software from the internet is
the person's decision (agent safety settings rightly block it). Show them the
line, and wait until it has finished. It downloads one program, checks it
against the release's SHA-256, puts it in `~/.hype/bin`, and adds that folder
to the PATH — nothing else. The script, to read first:
https://hypeapps.dev/install.sh

## Step 2 — the AI runs two commands

In the folder for the app (an empty folder is fine; so is their existing web
project), **first bring `hype` up to date, then start**:

```sh
~/.hype/bin/hype update
~/.hype/bin/hype start
```

(The full path, because your shell started before the install changed the
PATH. In a new terminal, plain `hype` works.)

`hype update` comes first on purpose: the installer may hand you an older
`hype` that does not have every command on this page yet (`start` arrived in
0.2.3). If any command says it is unknown, `hype update` is the answer. It is
quick, and does nothing when hype is already current.

`hype start` does the whole setup with no questions: makes
the folder a Hype app (in an
empty folder, a first screen that needs no server; in a Laravel, Rails,
Django or Node project, pointed at its dev server — their code is not
touched), checks it, opens it on the iPhone Simulator or an Android emulator,
and prints exactly what comes next. If something is missing on this computer
(Xcode, Android Studio), it says what and how to fix it; the app is ready
either way.

**If `hype` says the Terms of Service and the EULA are not agreed to yet**,
stop and show the person exactly what it printed. Agreeing is theirs to do:
**don't run `hype accept-terms --yes` or `hype --accept-terms`, and don't
set `HYPE_ACCEPT_TERMS`**. Ask them to run `hype accept-terms` in their own
Terminal (or `hype license buy` / `hype license activate`, which ask first):
it shows the terms and asks them there. Once they have agreed, carry on from
where you were.

**If `hype` says it needs a Hype Apps 1.0 license**, stop and show the
person exactly what it printed. Buying is theirs to do, in their browser:
**don't run `hype license buy` yourself**, don't look for a way around it,
and don't carry on writing HAM unchecked. Once they have the license,
`hype license` says so; then carry on from where you were.

## Step 3 — build

1. **Read the guide, all of it:** `~/.hype/bin/hype guide`
2. **One question, only now:** if the person hasn't said what the app is
   for, ask them that — just that. If they don't mind, build a small example
   and tell them that's what you did.
3. **Build it** in the `.ham` files (or, for their web project, the HAM their
   server sends). After **every** change:
   ```sh
   ~/.hype/bin/hype fmt .       # the house style: 4 spaces, one element per line
   ~/.hype/bin/hype check .     # fix everything it reports — errors and warnings
   ~/.hype/bin/hype run         # on the phone; prints runtime errors (overflows…)
   ```
   On a Mac, keep `hype preview` open while you build instead: a phone-sized
   window that reloads about a second after every save and checks what
   changed. It keeps running, so start it in the background (an AI: as a
   background command). `hype shot`, `hype tap` and `hype test` work on it
   too. Run `hype run` before you say you are done — the preview is for
   layout and logic; camera, mic and ads only work on a device.
   ```sh
   ~/.hype/bin/hype shot        # a screenshot once it has settled: read it
   ```
   `hype check` passes markup it cannot see the layout of — the screenshot
   is how you know it looks right. Try what a person would do:
   `hype tap "Sign in"`, `hype type "Email" "me@example.com"`,
   `hype set found=true` (any state, no editing the files), and put a whole
   flow in a file to re-run after every change: `hype test flow.txt`.
   `hype run` shows the app from `hype.toml`: the server's dev URL, or the
   `.ham` files in this folder. To run a different folder of `.ham` files,
   `hype run --files <folder>` — a **folder** whose `index.ham` is the first
   screen, never a list of files.
   Run `hype fmt` on every file you write, every time: four spaces per
   level, one element per line, attributes lined up. The rules are in
   `hype guide` (House style); `hype check` warns until a file follows them.
4. **Never guess** a tag, attribute, style or icon — HAM looks like HTML but
   only its own words exist: `hype ref <words>`, `hype ref <tag>`,
   `hype icons <word>`.

5. **Each new session:** run `hype update` first (quick; nothing happens
   when it is current), whenever `hype` says a newer version is out, and
   whenever a command on this page is reported as unknown.

That's the whole process.

---

## If you can't run commands

A chat-only AI (no terminal) can't do steps 2 and 3. Tell the person that an
AI that runs commands — Claude Code, Cursor, Windsurf, Codex, GitHub Copilot's
agent — does all of this for them; or give them each command to run, one at a
time. To read about HAM meanwhile: https://hypeapps.dev/llms.txt

## Extras — optional, never needed

None of these are part of the steps above. They change the AI tool's own
setup, so they are the person's to run, if they want them:

| | |
|---|---|
| `hype skill install` | a Claude Code skill, so Claude reaches for `hype` whenever HAM comes up |
| `hype init --agent claude` | in a project: Claude Code's MCP server, a CLAUDE.md section, and a hook that checks every `.ham` file Claude edits |
| `hype mcp` | an MCP server for any MCP-capable editor (Cursor, Windsurf, …): command `hype`, args `mcp` |

## Other commands

| Command | |
|---|---|
| `hype docs` | every tag, one line each, with a snippet |
| `hype doctor` | what this computer can run the app on, and how to fix the rest |
| `hype devices` | every simulator, emulator and phone `hype run` can use (`hype run -d "<name>"`) |
| `hype run --files <folder>` | run the `.ham` files in that folder (its `index.ham` first), built into the app, offline |
| `hype tree` | what is on the screen: text, ids, fields, with positions |
| `hype go file:/x.ham` | open a screen in the running app (`back`, `reload`) |
| `hype errors` | runtime errors since the last look (`--all`: every one since the app started) |
| `-v` on any command | every step on stderr: commands run, driver calls, the device and player picked, what is on screen (stdout stays the same; `HYPE_VERBOSE=1` for a whole session). When a result is unclear, run it again with `-v` |
| `hype check http://…` | check what a server actually sends |
| `hype fmt .` | tidy the `.ham` files |
| `hype preview` | a live phone-sized window on a Mac, reloaded on every save |
| `hype keys` | connect Apple, Google and your Android upload key, for publishing |
| `hype update` | the newest `hype` |

## If something is wrong

- **`hype: command not found`** — use the full path, `~/.hype/bin/hype`, or open a new terminal.
- **Alpine Linux (or another musl Linux)** — the installer says so: `apk add gcompat`, then the install line again.
- **A download fails** — check the network and run the install line again; it is safe to rerun.
- **The check says a tag, attribute, style or icon does nothing** — it is right: the checker is generated from the engine itself. Its hint usually names the real one.
- **Anything else** — `hype doctor`, and https://hypeapps.dev.
