> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meow.style/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> From an empty folder to a running TypeScript server — in about a minute.

This walkthrough assumes you've [installed meow](/installation). By the end you'll
have a project that runs TypeScript directly, serves HTTP, installs a dependency,
and passes a test — without configuring a single tool.

## 1. Scaffold a project

<Steps>
  <Step title="Initialize">
    ```bash theme={null}
    mkdir hello-meow && cd hello-meow
    meow init
    ```

    `meow init` writes three files, generates the editor/TypeScript shims, and runs
    an initial install:

    <CodeGroup>
      ```json meow.config.json theme={null}
      { "mode": "strict-web" }
      ```

      ```json package.json theme={null}
      {
        "name": "hello-meow",
        "version": "0.1.0",
        "private": true,
        "type": "module",
        "scripts": {
          "dev": "meow run main.ts"
        }
      }
      ```

      ```typescript main.ts theme={null}
      import { serve } from "meow:http";
      import { ui } from "meow:ui";

      ui.purr("meow runtime started!");

      serve((req) => {
        return new Response("🎀 🐾 Hello from meow! 🐾 🎀\n");
      }, { port: 3000 });
      ```
    </CodeGroup>

    <Note>
      `meow init` defaults to **`strict-web`** mode — a deterministic, web-standard
      sandbox. Building a Next.js/Vite app instead? Run `meow init --mode node-compat`
      for the full Node.js surface. See [Runtime modes](/concepts/modes).
    </Note>
  </Step>

  <Step title="Run it">
    ```bash theme={null}
    meow dev
    ```

    `meow dev` is shorthand for `meow run dev` — it runs the `dev` script from
    `package.json`. Your server is live on port 3000:

    ```bash theme={null}
    curl localhost:3000
    # 🎀 🐾 Hello from meow! 🐾 🎀
    ```

    No build step. No `ts-node`. No `tsconfig.json` to hand-write. meow strips the
    TypeScript types in place and runs the file.
  </Step>
</Steps>

## 2. Add a dependency

meow installs straight from the npm registry, verifies integrity, and writes a
strict, merge-friendly lockfile.

```bash theme={null}
meow add zod
```

```text theme={null}
╭─ meow install ──────────────────────────────╮
│ 🐾 1 package ready · 240ms                    │
│ materialized  1 package · 0 edges            │
│ disk          copy-on-write                  │
│ lockfile      meow.lock.jsonl                │
╰──────────────────────────────────────────────╯
```

Use it like any ESM import:

```typescript main.ts theme={null}
import { serve } from "meow:http";
import { z } from "zod";

const Greeting = z.object({ name: z.string() });

serve(async (req) => {
  const body = Greeting.parse(await req.json());
  return new Response(`Hello, ${body.name}!\n`);
}, { port: 3000 });
```

<Tip>
  `meow add -D <pkg>` adds a dev dependency. `meow remove <pkg>` removes it. Both
  update `package.json` and re-run the install. See the
  [package manager](/package-manager/overview).
</Tip>

## 3. Write a test

Create `greet.test.ts`. Test files import the matcher API from `meow:test`:

```typescript greet.test.ts theme={null}
import { test, expect } from "meow:test";

function greet(name: string) {
  return `Hello, ${name}!`;
}

test("greets by name", () => {
  expect(greet("Ada")).toBe("Hello, Ada!");
});

test("is not empty", () => {
  expect(greet("Ada")).not.toBe("");
});
```

Run the suite. meow discovers every `*.test.ts` / `*.spec.ts` file and runs each in
its own isolated, deterministic V8 isolate:

```bash theme={null}
meow test
```

```text theme={null}
greet.test.ts
  ✓ greets by name
  ✓ is not empty
╭─ meow test ─────────────────────────────────╮
│ 🐾 2 passed · 1 file                          │
╰──────────────────────────────────────────────╯
```

## 4. Run the quality gate

Everything below shares the **same parse** of your code — no tool re-reads what
another already parsed.

<CodeGroup>
  ```bash Type-check theme={null}
  meow check
  ```

  ```bash Lint theme={null}
  meow lint
  ```

  ```bash Format theme={null}
  meow fmt
  ```

  ```bash Bundle theme={null}
  meow bundle main.ts --out dist
  ```
</CodeGroup>

## You're up

In four steps you ran TypeScript, served HTTP, installed and verified a package,
and tested it — touching exactly two project files you'd actually edit
(`package.json` and your source).

<CardGroup cols={2}>
  <Card title="How the two modes work" icon="toggle-on" href="/concepts/modes">
    `strict-web` vs `node-compat`, and when to reach for each.
  </Card>

  <Card title="The omni-router" icon="wand-magic-sparkles" href="/runtime/running-code#the-omni-router">
    Why `meow build`, `meow ./script.ts`, and `meow some-cli` all just work.
  </Card>

  <Card title="Determinism by default" icon="lock" href="/concepts/determinism">
    What "frozen clock, seeded RNG" means for your tests and CI.
  </Card>

  <Card title="Full CLI reference" icon="terminal" href="/cli/overview">
    Every command and flag.
  </Card>
</CardGroup>
