Skip to main content
PercherPercher

Deploy instruction for AI agents

CLAUDE.md content for agentic deploys

Add this to your project's CLAUDE.md, cursor rules, or paste it when you start a new project. Your AI assistant will know how to build the app so it deploys correctly on Percher.

This app will be deployed on Percher (https://percher.app).

## Percher deployment requirements

- The app MUST expose an HTTP server on a configurable port (default 3000)
- The app MUST have a health check endpoint that returns HTTP 200, usually GET /health
- A percher.toml file must exist in the project root
- Percher uses Nixpacks to auto-detect and build — use standard project structures (package.json, requirements.txt, go.mod, etc.)

## Supported runtimes

Percher config uses runtime = "node", "bun", "python", "static", or "docker".
Use Dockerfile-based projects for Go, Rust, PHP, Ruby, Java, .NET, Elixir, and other runtimes.

## How to deploy

**Standard deploy:** `bunx percher publish` (or the percher_publish MCP tool).
Handles auth, config generation, packaging, and deploy in one call. Returns
structured errors with explanations and suggestions on failure — this is the
recommended path whether the deploy succeeds or fails. Supports `--dry-run`,
`--preview`, `-m "note"`, `--force`.

**Granular control / debugging:** `bunx percher login`, `bunx percher init`,
`bunx percher push` for stepwise execution. Use this only when you need to
isolate a single phase (e.g. validating the bundle without an upload, or
re-running a specific step). `push` errors point at `percher deploys
inspect <id>` for the full build log.

Either path hits the same server-side build pipeline; the choice is purely
about where the error surface lives.

## percher.toml

Generated by percher init. Key fields:

  [app]
  name = "my-app"          # becomes my-app.percher.run
  runtime = "node"         # auto-detected

  [web]
  port = 3000              # the port your app listens on
  health = "/health"       # health check path

## Database

For apps that need a database, add to percher.toml:

  [data]
  mode = "pocketbase"

A managed PocketBase instance is provisioned automatically.
Use the POCKETBASE_URL env var to connect from your app.

## Environment variables

Set via: bunx percher env set KEY=VALUE
Or MCP tool: percher_env_set

Available at runtime as standard environment variables.
Apps deploy to https://<app-name>.percher.run with automatic SSL.

With this context, you can just say "build me an app that does X" and the agent will structure it correctly for Percher deployment.

← PrevVersions and rollbackNext →Crash diagnostics
Percher — AI-native app hosting