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

# Installation and Setup

> Install the nom CLI, sign in, and configure your environment.

## Install the CLI

<Tabs>
  <Tab title="npm (recommended)">
    ```bash theme={null}
    npm install -g @nometria-ai/nom
    ```
  </Tab>

  <Tab title="npx (no install)">
    You can run any `nom` command without installing by prefixing it with `npx`:

    ```bash theme={null}
    npx @nometria-ai/nom deploy
    ```
  </Tab>
</Tabs>

<Info>
  The CLI requires **Node.js 18** or newer. Check your version with `node --version`.
</Info>

## Verify the installation

```bash theme={null}
nom --version
```

You should see the version number printed (e.g. `0.1.0`).

## Sign in

You need to authenticate before you can deploy. There are three ways to do this.

### Option 1: Browser sign-in (easiest)

```bash theme={null}
nom login
```

This opens your browser where you can sign in with Google, GitHub, or email. Once you sign in, the browser redirects back to the CLI automatically. No tokens to copy.

<Tip>
  The browser method creates a persistent API key and saves it to `~/.nometria/credentials.json` so you stay signed in across terminal sessions.
</Tip>

### Option 2: API key paste

If you are on a remote server or the browser method does not work:

<Steps>
  <Step title="Get an API key">
    Go to [nometria.com/settings/api-keys](https://nometria.com/settings/api-keys) and generate a new key.
  </Step>

  <Step title="Run login with the --api-key flag">
    ```bash theme={null}
    nom login --api-key
    ```

    Paste your key when prompted. The CLI verifies it and saves it.
  </Step>
</Steps>

### Option 3: Environment variable

Set the `NOMETRIA_API_KEY` environment variable and the CLI will use it automatically. This is the best option for CI/CD pipelines:

```bash theme={null}
export NOMETRIA_API_KEY=nometria_sk_your_key_here
```

<Warning>
  Keep your API key private. Never commit it to version control. Use your CI provider's secrets feature for automated deployments.
</Warning>

## Environment variables

| Variable           | Description                                                  |
| ------------------ | ------------------------------------------------------------ |
| `NOMETRIA_API_KEY` | Your API key. Overrides saved credentials from `nom login`.  |
| `NOMETRIA_API_URL` | Custom API endpoint. You almost never need to change this.   |
| `NOM_DEBUG`        | Set to any value to enable debug output for troubleshooting. |

## Verify you are signed in

```bash theme={null}
nom whoami
```

This prints your email address and confirms the CLI is ready to use.

## What's next

<CardGroup cols={2}>
  <Card title="Initialize a project" icon="folder-plus" href="/cli/commands#init">
    Run `nom init` to detect your framework and create a config file.
  </Card>

  <Card title="Deploy" icon="rocket" href="/cli/commands#deploy">
    Run `nom deploy` to push your app to production.
  </Card>
</CardGroup>
