Set up a coding agent

Give Claude Code, Codex or Cursor what it needs to deploy for you: the CLI, the rules, and the pages it can read.

Set it up

  1. Install the CLI and sign in where the agent runs.

    The agent uses your login.

  2. Add the agent files to your repository, so the agent reads these rules every time.
  3. Have the agent learn every command and flag from the CLI reference, or in one call with the CLI:
    Terminal
    ghaym help all --json

Rules for agents

  • Sign in through the person. The CLI uses the login of whoever runs it. If ghaym whoami fails, ask them to run ghaym login in their own terminal; never ask them to paste a key into the chat.
  • Use the CLI, not hand-written API calls.
  • A push starts a deploy. A push to the branch a service tracks builds and deploys it. The deploy has worked only when its build log says so.
  • Listen on every address, on the port Ghaym sets. Bind to 0.0.0.0, not to localhost, and read the port from PORT. Otherwise the readiness check can't reach the app and the deploy fails.
  • Every change waits until it is applied. Variables, build settings, size, replicas, routing and access stay staged until ghaym cloud changes apply, or --apply on the command that staged them. Applying a change to a variable, a bucket connection, the branch or a build setting deploys the service.
  • Try a change first. Every command that changes something takes --dry-run, and then changes nothing. services create, domains add and sessions rollback return the plan with its estimated monthly price; the rest print the request they would send.
  • Prices depend on the site. Read them with ghaym cloud regions sizes <region>.
  • Polling keeps a service awake. Services outside production sleep when idle, and compute is charged only while a service is awake.
  • Outgoing traffic past the monthly allowance is charged.
  • Sign-up needs a person. Deploying opens once Ghaym approves the account.

Which command for which job

  • Deploy code: ghaym cloud projects create, then ghaym cloud services create --project <project> --type git --repo <owner/name> --size <size> --site <slug>, then push to the branch the service tracks, as Deploy your first service shows. ghaym cloud regions list names the sites.
  • Try a change away from production: ghaym cloud environments create with its own branch, then push to that branch.
  • See why a build failed: ghaym cloud deployments logs <id>, not the result of the push.
  • Change settings: ghaym cloud vars set. Don't commit a config file with values in it.
  • Wait for a person to approve: a command that needs approval exits with 6 and an approval id. Run ghaym cloud approvals wait <id> instead of retrying.
  • Check what happened: ghaym cloud audit list and ghaym cloud sessions list, with --json.

Pages it can read

  • /docs/errors: one page per API error type. An error's docs link points here.
  • /docs/verified-prompts: prompts that get an existing repository ready to deploy.
  • /llms.txt: the site index in llms.txt format.
  • Every page under /docs is also served as Markdown: add .md to the path, for example /docs/agents.md.
  • Add ?lng=en to any address for English. Without it, pages are in Arabic.