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

# Quickstart

> Install the CLI and run your first mirror in under two minutes.

This is the fastest path from zero to a working mirror. Five steps, two minutes, no sign-in required for the CLI install.

<Note>
  Mirra is in private beta. The steps below work today — the CLI installs, a local stub runs, and `mirra up` provisions test mirrors. To provision real mirrors against the hosted control plane you need an access token — [request one here](https://mirra.run/access).
</Note>

## 1. Install the CLI

<Tabs>
  <Tab title="npm">
    ```bash theme={null}
    npm install -g @mirrahq/cli
    ```
  </Tab>

  <Tab title="pnpm">
    ```bash theme={null}
    pnpm add -g @mirrahq/cli
    ```
  </Tab>

  <Tab title="npx (no install)">
    ```bash theme={null}
    npx @mirrahq/cli up
    ```
  </Tab>
</Tabs>

Verify:

```bash theme={null}
$ mirra --version
mirra 0.1.0
```

## 2. Authenticate

```bash theme={null}
$ mirra login
→ opening https://app.mirra.run/cli/auth in your browser…
✓ authenticated as you@acme.com
```

The CLI stores your access token in `~/.config/mirra/credentials`. Log out any time with `mirra logout`.

## 3. Boot your first session

Run `mirra up` from any project directory:

```bash theme={null}
$ cd ~/projects/acme-app
$ mirra up

→ detected: stripe, resend, twilio
→ provisioning mirrors…
✓ stripe    → https://stripe-a7k2.mirra.run
✓ resend    → https://resend-a7k2.mirra.run
✓ twilio    → https://twilio-a7k2.mirra.run

session ses_a7k2 ready in 1.8s

Your code's requests to api.stripe.com, api.resend.com, and
api.twilio.com are now routed to the mirrors above.
Press Ctrl-C to end the session.
```

Mirra reads your `package.json`, detects the vendor SDKs you depend on, and provisions a mirror for each. A short-lived TLS proxy routes `api.stripe.com`, `api.resend.com`, and `api.twilio.com` to the mirror URLs transparently — **your existing SDK clients don't need URL changes**.

## 4. Make a request

In a second terminal, use your application as normal:

```bash theme={null}
$ node -e "
  const Stripe = require('stripe');
  const stripe = new Stripe(process.env.STRIPE_SECRET_KEY);
  stripe.customers.create({ email: 'alice@test.com' })
    .then(c => console.log('customer', c.id));
"
customer cus_test_a7k2_Nx9kKp
```

The customer was created — in the mirror. Your session terminal shows the request land in real time.

The real `api.stripe.com` was never called. No real money. No real account state. Yet the SDK client behaved identically: request shape, response shape, latency profile, error model.

## 5. End the session

Ctrl-C in the session terminal. Ephemeral mirrors tear down instantly; their state is gone.

```
^C
→ ending session ses_a7k2
✓ mirrors stopped · state cleared
```

## What to explore next

<Columns cols={2}>
  <Card title="Run a scenario" icon="file-lines" href="/guides/first-scenario">
    Write a markdown scenario and run it with `mirra run scenario.md`.
  </Card>

  <Card title="Drop into Vitest" icon="vial" href="/guides/vitest-plugin">
    Wrap your existing tests with `withMirra()` — zero code changes to the tests themselves.
  </Card>

  <Card title="Wire up your coding agent" icon="sparkles" href="/guides/coding-agents-mcp">
    Point Claude Code or Cursor at Mirra's MCP server.
  </Card>

  <Card title="Understand mirrors" icon="database" href="/concepts/mirrors">
    How mirrors differ from mocks, sandbox modes, and shared staging.
  </Card>
</Columns>
