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

# Claude Code Slash Commands

> Deploy, preview, and check status directly from Claude Code with built-in slash commands.

When you run `nom setup`, it generates four Claude Code [slash commands](https://docs.anthropic.com/en/docs/claude-code/slash-commands) in your project's `.claude/commands/` directory. These let you deploy, preview, and manage your app without ever leaving the conversation.

## Setup

Run this once in your project:

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

This creates `.claude/commands/deploy.md`, `.claude/commands/preview.md`, `.claude/commands/status.md`, and `.claude/commands/nometria-login.md`.

<Info>
  You need `nom` installed (`npm i -g @nometria-ai/nom`) and a `nometria.json` config in your project. Run `nom init` if you don't have one yet.
</Info>

## Available commands

<AccordionGroup>
  <Accordion title="/deploy" icon="rocket">
    Deploys your app to production. This is the most common command.

    **What it does:**

    1. Finds your API token (env var, `.env`, or `~/.nometria/credentials.json`)
    2. Reads `nometria.json` to identify your app
    3. Checks current deployment status
    4. If running: resyncs code (fast update)
    5. If stopped: starts the instance, then resyncs
    6. If not deployed: creates a new instance
    7. Polls until deployment completes
    8. Reports the live URL

    **Usage:**

    ```
    /deploy
    /deploy MyApp
    ```

    You can pass an app name if you have multiple apps. Otherwise it uses the app linked in `nometria.json`.

    **Example output from Claude:**

    ```
    Deployed successfully!

       App:  my-app
       URL:  https://my-app.nometria.com
       IP:   54.123.45.67
       Type: 4gb
    ```
  </Accordion>

  <Accordion title="/preview" icon="eye">
    Creates a free staging preview that expires in 2 hours.

    **What it does:**

    1. Finds your API token
    2. Identifies your app from `nometria.json` or asks you to pick
    3. Calls the staging preview API
    4. Returns a temporary preview URL

    **Usage:**

    ```
    /preview
    /preview MyApp
    ```

    **Example output from Claude:**

    ```
    Preview deployed!

       URL: https://preview-a1b2c3.nometria.com
       Expires: ~2 hours

       This is a temporary preview. Use /deploy for production.
    ```

    <Tip>
      Previews are perfect for sharing with teammates or testing before going live.
    </Tip>
  </Accordion>

  <Accordion title="/status" icon="circle-info">
    Shows the deployment status of all your Nometria apps in a formatted table.

    **What it does:**

    1. Finds your API token
    2. Lists all your migrations
    3. Checks AWS status for each hosting app
    4. Displays a formatted table with status indicators

    **Usage:**

    ```
    /status
    /status MyApp
    ```

    **Example output from Claude:**

    ```
    App              Platform   Status      URL                             Instance
    MyApp            Base44     running     https://myapp.nometria.com         4gb (t4g.med)
    OtherApp         Lovable    stopped     https://otherapp.nometria.com      2gb (t4g.small)

    Total: 2  |  Running: 1  |  Stopped: 1
    ```
  </Accordion>

  <Accordion title="/nometria-login" icon="right-to-bracket">
    Helps you set up authentication. Claude Code walks you through getting and storing your API key.

    **What it does:**

    1. Checks if you already have a token (env var, `.env`, credentials file)
    2. If not, guides you to [https://nometria.com/settings/api-keys](https://nometria.com/settings/api-keys)
    3. Validates the token you paste
    4. Stores it in `.env` and warns about `.gitignore`
    5. Optionally links the workspace to one of your apps

    **Usage:**

    ```
    /nometria-login
    ```
  </Accordion>
</AccordionGroup>

## How it works

Each slash command is a markdown file in `.claude/commands/` that contains step-by-step instructions for Claude. When you type `/deploy`, Claude reads the corresponding file and executes the workflow — making API calls with `curl`, polling for results, and reporting back.

The commands use these allowed tools:

* `Bash(curl:*)` — API calls to the Nometria backend
* `Bash(cat:*)`, `Bash(grep:*)` — reading config files and tokens
* `Read` and `Write` — managing `nometria.json` and `.env`

## Distributing to your team

The `.claude/commands/` directory is part of your project. Commit it to git and every team member who uses Claude Code will have access to the same commands.

```bash theme={null}
git add .claude/commands/
git commit -m "Add Nometria deployment commands for Claude Code"
```

<Tip>
  Combine slash commands with the [MCP server](/cli/mcp-server) for the most powerful Claude Code experience. The MCP server provides 20 tools that Claude can call programmatically, while slash commands provide guided workflows for common tasks.
</Tip>

## Regenerating

If you update your `nometria.json` (different app name, platform, etc.), run `nom setup` again to regenerate all config files including the slash commands.
