> ## 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.

# Command Reference

> Complete reference for all 16 nom CLI commands with examples.

## Quick reference

| Command         | What it does                             |
| --------------- | ---------------------------------------- |
| `nom init`      | Create a `nometria.json` config file     |
| `nom deploy`    | Deploy to production                     |
| `nom preview`   | Deploy a staging preview (free, 2 hours) |
| `nom status`    | Check deployment status                  |
| `nom logs`      | View deployment logs                     |
| `nom login`     | Sign in via browser or API key           |
| `nom whoami`    | Show your current account                |
| `nom github`    | Connect GitHub for auto-deploy           |
| `nom start`     | Start a stopped instance                 |
| `nom stop`      | Stop a running instance                  |
| `nom terminate` | Permanently delete an instance           |
| `nom upgrade`   | Resize your instance                     |
| `nom domain`    | Add a custom domain                      |
| `nom env`       | Manage environment variables             |
| `nom scan`      | Run an AI security scan                  |
| `nom setup`     | Generate AI tool config files            |

## Global options

These options work with every command:

| Option      | Short | Description                    |
| ----------- | ----- | ------------------------------ |
| `--help`    | `-h`  | Show help                      |
| `--version` | `-v`  | Show CLI version               |
| `--yes`     | `-y`  | Skip confirmation prompts      |
| `--json`    |       | Output as JSON (for scripting) |

***

## Detailed command reference

<AccordionGroup>
  <Accordion title="nom init" icon="folder-plus">
    Create a `nometria.json` config file in the current directory. The CLI auto-detects your framework (Next.js, Vite, Remix, or static) and sets sensible defaults.

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

    **What it creates:**

    ```json theme={null}
    {
      "name": "my-app",
      "framework": "vite",
      "platform": "aws",
      "region": "us-east-1",
      "instanceType": "4gb",
      "build": {
        "command": "npm run build",
        "output": "dist"
      },
      "env": {},
      "ignore": []
    }
    ```

    <Tip>
      The CLI detects your framework by looking for config files like `next.config.js`, `vite.config.ts`, or `remix.config.js`. If nothing is found, it defaults to `static`.
    </Tip>
  </Accordion>

  <Accordion title="nom deploy" icon="rocket">
    Build and deploy your project to production. This is the default command -- running `nom` with no arguments does the same thing.

    <CodeGroup>
      ```bash Basic deploy theme={null}
      nom deploy
      ```

      ```bash Deploy without prompts theme={null}
      nom deploy --yes
      ```

      ```bash Deploy from a GitHub URL theme={null}
      nom deploy --from https://github.com/user/repo
      ```
    </CodeGroup>

    **What happens:**

    1. Reads `nometria.json` for your config
    2. Runs your build command (e.g. `npm run build`)
    3. Packages your code (excluding `node_modules`, `.git`, `.env`)
    4. Uploads and deploys to your chosen cloud
    5. Returns a live URL

    **Example output:**

    ```
      Deploying my-app to aws (us-east-1)...

      Building... done (4.2s)
      Uploading... done (1.8s)
      Deploying... started

      URL: https://my-app.nometria.com
      Status: deploying

      Run `nom status` to check progress.
    ```
  </Accordion>

  <Accordion title="nom preview" icon="eye">
    Deploy a temporary staging version of your app. Previews are free and expire after 2 hours.

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

    **Example output:**

    ```
      Preview ready!
      URL: https://preview-a1b2c3.nometria.com
      Expires: 2 hours
    ```

    <Tip>
      Previews are perfect for sharing a quick link with a teammate or testing a change before going to production.
    </Tip>
  </Accordion>

  <Accordion title="nom status" icon="circle-info">
    Check the current deployment status of your app.

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

    **Example output:**

    ```
      App: my-app
      Status: running
      URL: https://my-app.nometria.com
      Instance: 4gb
      IP: 54.123.45.67
    ```

    Use `--json` to get machine-readable output for scripts:

    ```bash theme={null}
    nom status --json
    ```
  </Accordion>

  <Accordion title="nom logs" icon="scroll">
    View deployment and runtime logs.

    <CodeGroup>
      ```bash View recent logs theme={null}
      nom logs
      ```

      ```bash Stream logs in real-time theme={null}
      nom logs -f
      ```
    </CodeGroup>

    The `-f` (follow) flag keeps the connection open and streams new log lines as they happen, similar to `tail -f`.
  </Accordion>

  <Accordion title="nom login" icon="right-to-bracket">
    Sign in to your Nometria account. See the [installation guide](/cli/install) for details on all login methods.

    <CodeGroup>
      ```bash Browser sign-in (default) theme={null}
      nom login
      ```

      ```bash API key paste theme={null}
      nom login --api-key
      ```
    </CodeGroup>

    The browser method opens a sign-in page where you authenticate with Google, GitHub, or email. The CLI picks up the credentials automatically.
  </Accordion>

  <Accordion title="nom whoami" icon="user">
    Show the email address of the currently signed-in user.

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

    **Example output:**

    ```
      Authenticated as you@example.com
    ```
  </Accordion>

  <Accordion title="nom github" icon="github">
    Manage GitHub integration for automatic deployments. This command has four subcommands.

    <Tabs>
      <Tab title="connect">
        ```bash theme={null}
        nom github connect
        ```

        Opens your browser to authorize GitHub access via OAuth. Once connected, pushes to your repo can trigger automatic deploys.
      </Tab>

      <Tab title="status">
        ```bash theme={null}
        nom github status
        ```

        Check whether GitHub is connected and which account is linked.

        **Example output:**

        ```
          GitHub connected as octocat
        ```
      </Tab>

      <Tab title="repos">
        ```bash theme={null}
        nom github repos
        ```

        List all GitHub repos connected to your Nometria account.

        **Example output:**

        ```
          octocat/my-app (TypeScript) [private]
          octocat/landing-page (JavaScript)
        ```
      </Tab>

      <Tab title="push">
        ```bash theme={null}
        nom github push -m "Add new feature"
        ```

        Stage, commit, and push your local changes to the connected GitHub repo. If auto-deploy is enabled, this also triggers a new deployment.
      </Tab>
    </Tabs>
  </Accordion>

  <Accordion title="nom start" icon="play">
    Start an instance that was previously stopped.

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

    The instance resumes from where it left off. Your data and configuration are preserved.
  </Accordion>

  <Accordion title="nom stop" icon="pause">
    Stop a running instance. The instance is paused but not deleted -- you can restart it later with `nom start`.

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

    <Tip>
      Stopping an instance reduces your costs when you are not actively using it.
    </Tip>
  </Accordion>

  <Accordion title="nom terminate" icon="trash">
    Permanently delete an instance and all its data. This cannot be undone.

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

    <Warning>
      This is destructive. The CLI will ask for confirmation unless you pass `--yes`.
    </Warning>
  </Accordion>

  <Accordion title="nom upgrade" icon="arrow-up">
    Resize your instance to a different size. Available sizes: `2gb`, `4gb`, `8gb`, `16gb`.

    ```bash theme={null}
    nom upgrade 8gb
    ```

    **Example output:**

    ```
      Upgraded to 8gb.
    ```

    The upgrade happens with minimal downtime -- your app restarts on the new instance size.
  </Accordion>

  <Accordion title="nom domain" icon="globe">
    Add a custom domain to your app.

    ```bash theme={null}
    nom domain add myapp.example.com
    ```

    After running this, you will need to add a DNS record (usually a CNAME) pointing to your Nometria instance. SSL is provisioned automatically.

    <Tip>
      If you do not have a domain yet, your app is available at `your-app-name.nometria.com` by default.
    </Tip>
  </Accordion>

  <Accordion title="nom env" icon="key">
    Manage environment variables for your deployed app.

    <Tabs>
      <Tab title="set">
        ```bash theme={null}
        nom env set DATABASE_URL=postgres://...
        ```

        Set one or more environment variables. The app redeploys automatically with the new values.
      </Tab>

      <Tab title="list">
        ```bash theme={null}
        nom env list
        ```

        List all environment variable keys (values are hidden for security).

        **Example output:**

        ```
          DATABASE_URL
          STRIPE_SECRET_KEY
          NEXT_PUBLIC_API_URL
        ```
      </Tab>

      <Tab title="delete">
        ```bash theme={null}
        nom env delete STRIPE_SECRET_KEY
        ```

        Remove an environment variable.
      </Tab>
    </Tabs>
  </Accordion>

  <Accordion title="nom scan" icon="shield-halved">
    Run an AI-powered security and performance scan on your deployed app.

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

    **Example output:**

    ```
      Security: 92/100
      Performance: 87/100
      Code Quality: 95/100

      Issues:
      - [medium] Missing CSP header: Add a Content-Security-Policy header
      - [low] Unoptimized images: 3 images could be compressed further
    ```
  </Accordion>

  <Accordion title="nom setup" icon="wand-magic-sparkles">
    Generate configuration files so that AI coding tools (Cursor, Claude Code, Copilot, Cline, Windsurf, Continue.dev) know how to deploy your project. Also creates Claude Code slash commands, an AGENTS.md guide, and a GitHub Actions workflow.

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

    **Example output:**

    ```
      Setting up AI tool integrations for Nometria

        .cursor/rules/nometria.mdc
        .clinerules
        .windsurfrules
        .github/copilot-instructions.md
        .github/workflows/nometria-deploy.yml
        CLAUDE.md
        AGENTS.md
        .claude/commands/deploy.md
        .claude/commands/preview.md
        .claude/commands/status.md
        .claude/commands/nometria-login.md
        .continue/config.json

      All AI tools now know how to deploy this project with Nometria.

      Claude Code users can now type:
        /deploy            Deploy to production
        /preview           Staging preview (free, 2hr)
        /status            Check deployment status
        /nometria-login    Set up authentication
    ```

    See the [AI tools setup guide](/cli/ai-tools-setup) for details on each file, and the [slash commands guide](/cli/slash-commands) for Claude Code commands.
  </Accordion>
</AccordionGroup>
