Skip to main content

/gws-setup

Zero-config bootstrap. Type /gws-setup inside Claude Code, GitHub Copilot CLI, Codex CLI, Cursor, or Amp and the agent will set up the GWS environment for the current project end-to-end.

When to use it

  • You just cloned a repo and want to deploy it locally with one command
  • You're starting a new project and want gws.json + Dockerfiles + K8s manifests generated for you
  • You want to add a sibling repo to an existing GWS project (multi-repo setup)

What it does

  1. Detects the project — calls gws detect --json for structured framework / port / dependency info, then refines by reading manifests, env files, and framework configs
  2. Asks about multi-repo siblings — if you mention a sibling repo, the skill verifies all repos share a single parent directory (a hard GWS requirement) before merging them into one gws.json
  3. Generates artifacts — uses gws generate-template and gws generate-helm-values for a known-good Dockerfile and K8s manifest per service, written under .gws/services/<svc>/
  4. Writes gws.json — validates against the live JSON schema (via gws schema --json) before saving
  5. Registers with the API — runs gws config import so the project exists in the dashboard
  6. Deploys — runs gws up -y
  7. Validates — health-checks each pod and HTTP-probes service URLs; iterates fixes (capped at 5 attempts) using gws doctor --json findings

Multi-repo requirement

GWS multi-repo projects require all repos under one parent directory (e.g. ~/myapp/{frontend,backend,workers}). The merged gws.json references siblings by relative path ("path": "../frontend"). If your repos aren't already siblings, the skill will stop and ask you to move them before continuing.

Failure handling

If a service crashes after deploy, the skill runs gws doctor --json and applies the highest-severity remediation, then gws rebuild <svc>. After 5 failed attempts on the same service it stops and hands off to /gws-debug.

See also