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

# AI Tools Setup

> Generate config files so Cursor, Claude Code, Copilot, and other AI tools can deploy your project.

When you use an AI coding tool like Cursor or Claude Code, it does not automatically know how your project deploys. The `nom setup` command fixes that by generating config files that teach each tool about your deployment setup.

## Run setup

Make sure you have a `nometria.json` in your project first (run `nom init` if you have not already), then:

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

This creates 12 files in your project:

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

<Info>
  Each file is tailored to your project. It includes your app name, cloud platform, and all the deployment commands your AI tool needs to know.
</Info>

## What each file does

<AccordionGroup>
  <Accordion title="Cursor" icon="arrow-pointer">
    **File:** `.cursor/rules/nometria.mdc`

    This is a [Cursor Rules](https://docs.cursor.com/context/rules) file. It tells Cursor's AI about your deployment commands (`nom deploy`, `nom preview`, etc.) and your project config.

    The rule uses `alwaysApply: true` so Cursor always has deployment context, even if you do not mention it.

    **After setup:** Open your project in Cursor and ask something like "deploy this to production" -- Cursor will know to run `nom deploy`.
  </Accordion>

  <Accordion title="Claude Code — Project Instructions" icon="asterisk">
    **File:** `CLAUDE.md`

    Claude Code reads `CLAUDE.md` as project instructions at the start of every session. After setup, Claude Code knows your app name, platform, and the full list of CLI commands.

    **After setup:** Start a Claude Code session in your project and say "deploy this app" -- it will run `nom deploy` in the terminal.

    <Tip>
      For even deeper integration, add the [MCP server](/cli/mcp-server) so Claude Code can deploy without shelling out to the terminal.
    </Tip>
  </Accordion>

  <Accordion title="Claude Code — Slash Commands" icon="terminal">
    **Files:** `.claude/commands/deploy.md`, `.claude/commands/preview.md`, `.claude/commands/status.md`, `.claude/commands/nometria-login.md`

    These are [Claude Code slash commands](https://docs.anthropic.com/en/docs/claude-code/slash-commands) that your team can use inside Claude Code sessions. After setup, typing `/deploy` in Claude Code runs a full deployment workflow -- it finds your API token, identifies your app, checks status, and deploys or resyncs automatically.

    | Slash command     | What it does                             |
    | ----------------- | ---------------------------------------- |
    | `/deploy`         | Full deploy-to-production workflow       |
    | `/preview`        | Create a free staging preview (2hr)      |
    | `/status`         | Show deployment status for all your apps |
    | `/nometria-login` | Set up authentication with API key       |

    **After setup:** Open Claude Code in your project and type `/deploy`. Claude will handle the entire deployment pipeline including polling for completion and reporting the live URL.

    See the [slash commands guide](/cli/slash-commands) for full details.
  </Accordion>

  <Accordion title="AGENTS.md — Universal Agent Guide" icon="robot">
    **File:** `AGENTS.md`

    `AGENTS.md` is a universal agent deployment guide that any AI tool can read. It includes authentication instructions, the full API reference (with curl examples), decision logic for when to deploy vs resync, error handling, and the `nometria.json` config format.

    This file is designed for AI agents that do not have a specific config format (like Aider, custom agents, or any LLM-powered tool). If the agent can read files from the project directory, it can read `AGENTS.md` and know how to deploy.

    **After setup:** Any AI agent or tool that reads project files will find the complete deployment guide.
  </Accordion>

  <Accordion title="Cline" icon="code">
    **File:** `.clinerules`

    Cline (and Roo Code) reads `.clinerules` for project-specific instructions. The generated file includes all deployment commands and a note to never call backend APIs directly.

    **After setup:** Ask Cline to "create a staging preview" and it will run `nom preview`.
  </Accordion>

  <Accordion title="Windsurf" icon="wind">
    **File:** `.windsurfrules`

    Windsurf (by Codeium) reads `.windsurfrules` for project context. The file includes deployment commands, environment variable management, and instance control commands.

    **After setup:** Ask Windsurf to "check the deployment status" and it will run `nom status`.
  </Accordion>

  <Accordion title="GitHub Copilot" icon="github">
    **File:** `.github/copilot-instructions.md`

    GitHub Copilot reads this file for project-wide instructions. It teaches Copilot about your deployment workflow so it can suggest the right commands in chat.

    **After setup:** Ask Copilot in VS Code chat "how do I deploy this?" and it will reference the Nometria commands.
  </Accordion>

  <Accordion title="Continue.dev" icon="plug">
    **File:** `.continue/config.json`

    Continue.dev supports MCP (Model Context Protocol) servers. The setup adds the Nometria MCP server to your Continue config, which gives Continue direct access to all 20 deployment tools.

    **After setup:** Continue.dev can deploy, check status, manage env vars, and more -- all through its AI chat.
  </Accordion>

  <Accordion title="GitHub Actions" icon="gear">
    **File:** `.github/workflows/nometria-deploy.yml`

    This is a GitHub Actions workflow that automatically deploys your app whenever you push to the `main` branch. It can also be triggered manually from the Actions tab.

    **Setup required:** Add your `NOMETRIA_API_KEY` as a repository secret in GitHub (Settings > Secrets and variables > Actions).

    The workflow:

    1. Checks out your code
    2. Sets up Node.js 20
    3. Installs dependencies with `npm ci`
    4. Runs `npx @nometria-ai/nom deploy --yes`
  </Accordion>
</AccordionGroup>

## How to use after setup

Once the config files are in place, you can talk to any of these AI tools naturally:

| What you say                    | What happens                        |
| ------------------------------- | ----------------------------------- |
| "Deploy this to production"     | Runs `nom deploy`                   |
| "Create a preview"              | Runs `nom preview`                  |
| "What's the deployment status?" | Runs `nom status`                   |
| "Show me the logs"              | Runs `nom logs -f`                  |
| "Set the DATABASE\_URL env var" | Runs `nom env set DATABASE_URL=...` |
| "Connect GitHub"                | Runs `nom github connect`           |

<Tip>
  Commit these config files to your repo so every team member gets the same AI tool experience.
</Tip>

## Re-running setup

If you change your `nometria.json` (for example, switching from AWS to a different platform), run `nom setup` again to regenerate all config files with the updated info.
