> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Quick Start

Create an AngularLynx app, open it in your browser, then run it on a phone. This takes about five minutes.

## What you need

- [**Node.js**](https://nodejs.org/) 22.12 or newer. Check with `node --version`.
- **Optional:** a phone (iPhone or Android) or a simulator, to see the app as a real native app.

You don't need the Angular CLI installed globally. The project brings its own copy.

## 1. Create the app

```bash
npm create angular-lynx my-app
```

When it asks **"Would you like to add Tailwind CSS?"**, answer **Yes**. The tutorial and the examples use Tailwind.

The command takes a minute or two. It runs three steps for you:

1. `ng new` creates a standard Angular project.
2. `ng add @blotch/angular-lynx` converts that project into a Lynx app.
3. `npm install` installs the dependencies.

## 2. Start the dev server

```bash
cd my-app
npm start
```

`npm start` runs `ng serve`. After the first build, the terminal shows a large **QR code** and a few links:

```text
  Lynx       http://192.168.1.20:3000/main.lynx.bundle
  Web        http://192.168.1.20:3000/main.web.bundle
  ∟ Preview  http://192.168.1.20:3000/__web_preview?casename=main.web.bundle
```

Your addresses will differ. Leave the server running. If something else already uses port 3000, `ng serve` asks whether to use a different port, as Angular's does: answer yes, and use the port in its links.

## 3. Open it in your browser

Open the **Preview** link, but replace the IP address with `localhost`:

```text
http://localhost:3000/__web_preview?casename=main.web.bundle
```

You should see your project's name and the line "Edit src/app/app.ts to get started".

This is the [**web preview**](/guide/glossary.md#web-preview): Lynx's web renderer drawing your app in the browser. It's the fastest way to work, and its layout matches the phone closely.

:::warning Use localhost for the web preview
The preview only runs on a secure origin, and `localhost` is one. On an `http://192.168…` address it fails with "crypto.randomUUID is not a function".
:::

## 4. Open it on a phone

To run your app as a native app, install [**Lynx Explorer**](/guide/glossary.md#lynx-explorer). It's Lynx's development app: it downloads your app from the dev server and runs it.

**Android phone**

1. Install **Lynx Go** from [Google Play](https://play.google.com/store/apps/details?id=com.funcs.io.lynx.go). It's a community build of Lynx Explorer. Or install the official APK from [Lynx's releases](https://github.com/lynx-family/lynx/releases).
2. Connect the phone to the same Wi-Fi as your computer.
3. In the app, scan the QR code in your terminal.

**iPhone**

1. Install **Lynx Go Dev Explorer** from the [App Store](https://apps.apple.com/us/app/lynx-go-dev-explorer/id6743227790). It's a community build of Lynx Explorer. There's no official iPhone build.
2. Connect the phone to the same Wi-Fi as your computer.
3. In the app, scan the QR code in your terminal.

**iOS Simulator (Mac)**

The [**iOS Simulator**](/guide/glossary.md#simulator) is a virtual iPhone on your Mac. It comes with [Xcode](https://apps.apple.com/app/xcode/id497799835), Apple's free developer tools.

1. Download `LynxExplorer-arm64.app.tar.gz` (Apple silicon) or `LynxExplorer-x86_64.app.tar.gz` (Intel) from [Lynx's releases](https://github.com/lynx-family/lynx/releases).
2. Unpack it: `tar -zxf LynxExplorer-arm64.app.tar.gz`.
3. Start a simulator. On Xcode 27.1 and later, open DeviceHub (`open -a DeviceHub`) and click **Start** next to an iPhone. Earlier versions have the Simulator app instead (`open -a Simulator`), which starts one by itself.
4. Install Lynx Explorer on it: `xcrun simctl install booted LynxExplorer-arm64.app`.
5. Open Lynx Explorer, paste the **Lynx** link into **Enter Card URL** and tap **Go**.

**Android emulator**

The [**Android emulator**](/guide/glossary.md#emulator) is a virtual Android phone. It comes with [Android Studio](https://developer.android.com/studio), Google's free developer tools.

1. In Android Studio, open **Device Manager** and start a virtual device.
2. Download the Lynx Explorer APK from [Lynx's releases](https://github.com/lynx-family/lynx/releases), then drag it onto the emulator to install it.
3. In Lynx Explorer, paste the **Lynx** link into **Enter Card URL** and tap **Go**.

You should see the same screen as in the browser, drawn by the phone's own UI controls.

:::tip Your own app instead of Lynx Explorer
Lynx Explorer doesn't have your app's native modules, such as secure storage, sign-in and the share sheet. With Xcode or Android Studio installed, `ng serve --platform ios` or `ng serve --platform android` builds your own app, opens it on a simulator, emulator or phone, and updates it on every save, as Lynx Explorer does. See [Develop in the real app](/guide/native-apps/devices.md#develop-in-the-real-app-with-ng-serve).
:::

## 5. Make a change

1. Open `src/app/app.ts` and change the line "Edit src/app/app.ts to get started".
2. Save the file.

The phone updates within a second or two, on the screen it was showing. The web preview reloads the page once the rebuild finishes, so the app starts over on its first screen.

What stays as it was depends on what you edit:

- **A template or a stylesheet:** only that component re-renders, and it keeps its state.
- **Anything else**, such as a component's class or a service: the app restarts on the same screen. Its state starts over.

:::tip If the phone shows a blank or old screen
Some edits can't be applied to the running app, such as code that throws while it loads. Then the dev server reloads the whole app, which needs **Lynx DevTool** turned on in Lynx Explorer's settings. Otherwise, open the link again.
:::

## What's in the project

`ng add` changed only a few files from a standard `ng new` project:

```text
my-app/
├── angular.json              # build, serve and test use the AngularLynx builders
├── .postcssrc.json           # runs Tailwind CSS 4
└── src/
    ├── main.ts               # bootstrapApplication from @blotch/angular-lynx
    ├── rspeedy-env.d.ts      # types for importing images, fonts and CSS modules
    └── app/
        ├── app.config.ts     # the Lynx renderer and the router
        ├── app.routes.ts     # your routes
        └── app.ts            # the root component, written with Lynx elements
```

These are the commands you'll use most. Prefix them with `npx` (`npx ng build`), or install the CLI globally with `npm install -g @angular/cli`:

| Command                        | What it does                                                                                                                    |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| `ng serve`                     | Starts the dev server for the web preview and Lynx Explorer                                                                     |
| `ng serve --platform ios`      | Also runs your own app on a simulator or phone ([details](/guide/native-apps/devices.md#develop-in-the-real-app-with-ng-serve)) |
| `ng generate component <name>` | Creates a component that uses Lynx elements                                                                                     |
| `ng test`                      | Runs your unit tests                                                                                                            |
| `ng build`                     | Builds the app's bundle into `dist/`                                                                                            |
| `ng build --platform ios`      | Builds an iOS app ([details](/guide/native-apps.md))                                                                            |

## Teach your AI coding agent

If an AI coding agent writes code with you, give it the AngularLynx [skill](https://www.skills.sh/blotch-smart-frames/angularlynx/angular-lynx): Lynx's elements, events and CSS differences, and the Angular CLI commands, in the form agents read.

```bash
npx skills add https://github.com/blotch-smart-frames/angularlynx --skill angular-lynx
```

The command finds the agents installed on your machine, such as Claude Code, Cursor and Codex, and asks which to install it into.

## Next steps

- [Tutorial: Build a todo app](/guide/tutorial.md): learn elements, styling, events and signals step by step.
- [Coming from web Angular](/guide/coming-from-web.md): what's different, and which Angular features work.
- [How a Lynx app runs](/guide/concepts/how-it-runs.md): what the QR code, the bundle and Lynx Explorer are.
