[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-railway-use-railway":3,"mdc-mhpft1-key":35,"related-org-railway-use-railway":4264,"related-repo-railway-use-railway":4291},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":30,"sourceUrl":33,"mdContent":34},"use-railway","operate Railway infrastructure","Operate Railway infrastructure: sign up for or sign in to a Railway account, create projects, provision services and databases, manage object storage buckets, deploy code, configure infrastructure as code, environments and variables, manage domains, troubleshoot failures, check status and metrics, manage feature flags, set up Railway agent tooling, and query Railway docs. Use this skill whenever the user mentions Railway, feature flags, flag rollout, targeting rules, signing up, creating an account, registering, logging in, deployments, services, environments, buckets, object storage, build failures, agent setup, MCP, or infrastructure operations, even if they don't say \"Railway\" explicitly. Also invoke this skill when the user asks to be signed up, registered, or onboarded to Railway: do not refuse — drive them through the unauthed `railway up` flow (deploys + signs up on the fly) or `railway login` (which creates new accounts on the fly).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"railway","Railway","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Frailway.png","railwayapp",[13,17,20],{"name":14,"slug":15,"type":16},"Deployment","deployment","tag",{"name":18,"slug":19,"type":16},"Cloud","cloud",{"name":21,"slug":22,"type":16},"Infrastructure","infrastructure",293,"https:\u002F\u002Fgithub.com\u002Frailwayapp\u002Frailway-skills","2026-07-23T05:43:58.502639",null,32,[29,22,8],"agents",{"repoUrl":24,"stars":23,"forks":27,"topics":31,"description":32},[29,22,8],"Agent skills for interacting with Railway","https:\u002F\u002Fgithub.com\u002Frailwayapp\u002Frailway-skills\u002Ftree\u002FHEAD\u002Fplugins\u002Frailway\u002Fskills\u002Fuse-railway","---\nname: use-railway\ndescription: >\n  Operate Railway infrastructure: sign up for or sign in to a Railway account,\n  create projects, provision services and databases, manage object storage\n  buckets, deploy code, configure infrastructure as code, environments and variables, manage domains,\n  troubleshoot failures, check status and metrics, manage feature flags,\n  set up Railway agent tooling, and query Railway docs. Use this skill whenever\n  the user mentions Railway, feature flags, flag rollout, targeting rules,\n  signing up, creating an account, registering, logging in, deployments,\n  services, environments, buckets, object storage, build failures, agent setup,\n  MCP, or infrastructure operations, even if they don't say \"Railway\" explicitly.\n  Also invoke this skill when the user asks to be signed up, registered, or\n  onboarded to Railway: do not refuse — drive them through the unauthed\n  `railway up` flow (deploys + signs up on the fly) or `railway login`\n  (which creates new accounts on the fly).\nallowed-tools: Bash(railway:*), Bash(which:*), Bash(command:*), Bash(npm:*), Bash(npx:*), Bash(curl:*), Bash(python3:*)\n---\n\n# Use Railway\n\n## Railway resource model\n\nRailway organizes infrastructure in a hierarchy:\n\n- **Workspace** is the billing and team scope. A user belongs to one or more workspaces.\n- **Project** is a collection of services under one workspace. It maps to one deployable unit of work.\n- **Environment** is an isolated configuration plane inside a project (for example, `production`, `staging`). Each environment has its own variables, config, and deployment history.\n- **Service** is a single deployable unit inside a project. It can be an app from a repo, a Docker image, or a managed database.\n- **Bucket** is an S3-compatible object storage resource inside a project. Buckets are created at the project level and deployed to environments. Each bucket has credentials (endpoint, access key, secret key) for S3-compatible access.\n- **Deployment** is a point-in-time release of a service in an environment. It has build logs, runtime logs, and a status lifecycle.\n\nMost CLI commands operate on the linked project\u002Fenvironment\u002Fservice context. Use `railway status --json` to see the context, and `--project`, `--environment`, `--service` flags to override.\n\n## Tool routing\n\nRailway has three agent-facing operation paths. Choose the path that matches the job:\n\n- **Railway CLI** (`railway`): workflows that depend on local machine state such as current working directory deploys, `railway up`, `railway run`, SSH, database analysis scripts, local linking, interactive setup, or exact command output.\n- **Remote MCP** (`https:\u002F\u002Fmcp.railway.com`): default plugin MCP path for account\u002Fproject\u002Fservice discovery, deployment state, bounded logs, feature flags, simple redeploys, simple project creation, or complex Railway workflows that can be handed to `railway-agent`. Remote MCP uses Railway OAuth and does not depend on local CLI state.\n- **GraphQL**: operations that neither MCP nor CLI exposes, or when a reference gives a specific GraphQL fallback.\n\nIf multiple paths are available, choose the one that preserves the needed context. The CLI fits workflows that need the current repo, local credentials, SSH, database scripts, or exact command output. Remote MCP fits OAuth-scoped platform operations that do not need local files or CLI state.\n\nOptional: if the current agent already has a user-installed local CLI MCP (`railway mcp`) configured, it can be used for CLI-backed platform operations not yet exposed by remote MCP. Published plugin configs do not install or launch local CLI MCP.\n\nUse `scripts\u002Frailway-api.sh` for GraphQL only when neither MCP nor CLI exposes the operation, or when a reference gives a specific GraphQL fallback.\n\n## Parsing Railway URLs\n\nUsers often paste Railway dashboard URLs. Extract IDs before doing anything else:\n\n```\nhttps:\u002F\u002Frailway.com\u002Fproject\u002F\u003CPROJECT_ID>\u002Fservice\u002F\u003CSERVICE_ID>?environmentId=\u003CENV_ID>\nhttps:\u002F\u002Frailway.com\u002Fproject\u002F\u003CPROJECT_ID>\u002Fservice\u002F\u003CSERVICE_ID>\n```\n\nThe URL always contains `projectId` and `serviceId`. It may contain `environmentId` as a query parameter. If the environment ID is missing and the user specifies an environment by name (e.g., \"production\"), resolve it:\n\n```bash\nscripts\u002Frailway-api.sh \\\n  'query getProject($id: String!) {\n    project(id: $id) {\n      environments { edges { node { id name } } }\n    }\n  }' \\\n  '{\"id\": \"\u003CPROJECT_ID>\"}'\n```\n\nMatch the environment name (case-insensitive) to get the `environmentId`.\n\n**Prefer passing explicit IDs** to CLI commands (`--project`, `--environment`, `--service`) and scripts (`--project-id`, `--environment-id`, `--service-id`) instead of running `railway link`. This avoids modifying global state and is faster.\n\n## Intent-based routing\n\nRoute by user intent *before* running preflight checks. The preflight ceremony below is for diagnostic and configuration work — it adds friction when the user just wants to ship something or sign up.\n\n**Deploy-from-cwd intent** (\"deploy\", \"ship\", \"push to Railway\", \"deploy this app\"):\n- Skip the `railway whoami` \u002F `railway status` preflights.\n- Run `railway up` directly — it self-validates auth, signs the user in (the CLI opens a browser) if they're unauthenticated, and chains into project + service creation and deploy.\n- Announce intent before invoking: *\"Running `railway up` — it'll sign you in if needed and deploy this directory.\"*\n- **Do NOT ask the user to run `railway login` first.** The chain handles auth as part of the deploy.\n- If the environment can't open a browser, the CLI prints a device-code sign-in link and waits — follow [Device-code sign-in: relay the link immediately](#account-creation--sign-in) (run in background, relay the link to the user the moment it prints).\n\n**Signup intent** (\"sign me up\", \"create my Railway account\", \"register me\", \"get me on Railway\"):\n- **If the current directory has a deployable app (e.g. `package.json`, `requirements.txt`, `go.mod`, `Dockerfile`, source to build), run `railway up`** — it signs the user up *and* deploys in one shot, landing them on a running app. A detected agent harness authorizes the project creation, so **bare `railway up` is enough** — there's no extra prompt to clear. Use it even when the user only said \"sign me up\": shipping their app is the goal, so don't make them pick a command and don't drop to a bare login. For scripted or agent runs, `railway up -y` is the robust form — it skips prompts and forces the create non-interactively even if harness detection misses. `railway login` is NOT the default for signup when there's something to deploy.\n- **Only when there is nothing to deploy** — an empty \u002F non-app directory, or the user explicitly says they just want an account with no deploy — use `railway login` (creates new accounts on the fly through the same OAuth surface). There is no separate signup command.\n- Signup is the flow most likely to hit the device-code wait (brand-new users in sandboxed\u002Fheadless agent environments). Follow [Device-code sign-in: relay the link immediately](#account-creation--sign-in) — a signup lost to an expired code is a lost user, not a retry.\n\n**Sandbox \u002F remote-build intent** (\"give me a sandbox\", \"spin up a scratch environment\", \"build this remotely\", \"run this remotely\", \"checkpoint\u002Fsnapshot the sandbox\", \"save this sandbox state\", \"restore my sandbox\"):\n- Load [sandbox.md](references\u002Fsandbox.md) and follow it. Sandboxes require the feature to be enabled in Priority Boarding — if a sandbox command fails with a feature-availability error, prompt the user to enable Sandboxes in Priority Boarding rather than retrying.\n\n**Other intents** (querying state, listing projects, configuring variables, debugging failures):\n- Follow the Preflight section below.\n\n## Preflight\n\nBefore any mutation, verify the tool path and context:\n\n```bash\ncommand -v railway                # CLI installed\nRAILWAY_CALLER=\"skill:use-railway@1.3.6\" RAILWAY_AGENT_SESSION=\"railway-skill-$(date +%s)-$$\" railway whoami --json\nrailway --version                 # check CLI version\n```\n\n**Exception**: `railway up` and `railway login` self-validate auth and run their own unauth-aware flows. Don't run `railway whoami` before them — it adds a redundant failing call without changing what you do next. See [Account creation & sign-in](#account-creation--sign-in).\n\n### Skill freshness\n\nOnce per session, alongside the preflight checks, verify the installed Railway agent tooling is current. Root help ends with an `Agent tooling:` health section (printed to stderr, CLI 5.9+; older CLIs print nothing — skip this check rather than retrying):\n\n```bash\nrailway --help 2>&1 | grep -A4 \"Agent tooling:\"\n```\n\nAct on what it reports:\n\n- Skills installed and up to date — continue; nothing to do.\n- An update is available (`rev \u003Ca> → \u003Cb> available`) — run `railway skills update`, then tell the user to restart their coding tool so the updated skills load. This session keeps running on the old skill revision until restart: finish the current request, and if this skill's guidance disagrees with the updated CLI's own output, trust the CLI.\n- Skills or MCP server missing (`✗` lines) — run `railway setup agent -y`, then tell the user to restart their coding tool.\n\nCheck once per session and don't re-run it after acting; the restart prompt to the user is the resolution, not another check.\n\nWhen Railway MCP is available and the job is a platform-state read, use the matching MCP read instead of shelling out. If using the CLI path, run the CLI checks above.\n\nFor Railway CLI calls made while this skill is active, prefix the command with `RAILWAY_CALLER=skill:use-railway@1.3.6` and a stable `RAILWAY_AGENT_SESSION` reused for the current user request. Generate the session id once per user request, then reuse that exact value for later Railway CLI calls in the same workflow. Do not run a separate `export` preflight solely for telemetry; inline env prefixes keep the shell output concise and avoid leaking setup steps into every response.\n\n**Context resolution - URL IDs always win:**\n- If the user provides a Railway URL, extract IDs from it. Do NOT run `railway status --json`; it returns the locally linked project, which is usually unrelated.\n- If no URL is given, fall back to `railway status --json` for the linked project\u002Fenvironment\u002Fservice.\n- When using MCP tools after resolving local context with `railway status --json`, pass the resolved project, environment, and service IDs explicitly. Do not rely on MCP implicit linked context; MCP may not share the CLI's current working directory link.\n\nIf the CLI is missing, guide the user to install it.\n\n```bash\ncurl -fsSL agents.railway.com | sh # Install CLI and configure detected agents\nbash \u003C(curl -fsSL https:\u002F\u002Frailway.com\u002Finstall.sh) --agents -y # Install CLI and configure detected agents\nbash \u003C(curl -fsSL https:\u002F\u002Frailway.com\u002Finstall.sh) # Shell script (macOS, Linux, Windows via WSL)\nnpm i -g @railway\u002Fcli # npm (macOS, Linux, Windows). Requires Node.js version 16 or higher.\nbrew install railway # Homebrew (macOS)\n```\n\nIf not authenticated, see [Account creation & sign-in](#account-creation--sign-in) below — the CLI offers unauthed `railway up` (deploy + sign up\u002Fin in one shot) or `railway login` (sign up\u002Fin only; new accounts created on the fly). If not linked and no URL was provided, run `railway link --project \u003Cid-or-name>`.\n\nIf a command is not recognized (for example, `railway environment edit`), the CLI may be outdated. Upgrade with:\n\n```bash\nrailway upgrade\n```\n\n## Account creation & sign-in\n\nRailway uses a single unified OAuth flow for both sign-in and sign-up. The backend detects fresh accounts from durable compliance state (a CLI client that hasn't accepted ToS \u002F Fair Use yet) and adapts the consent screen and post-auth landing page — new users land on a \"Welcome to Railway!\" page, existing users see the standard confirmation. The CLI does not declare signup intent up front.\n\nTwo commands surface this flow, depending on intent:\n\n| Command | When to use |\n|---|---|\n| `railway up` | Agent-friendly onboarding from the current directory. Unauthenticated → opens the browser (or device-code) to sign in \u002F sign up. With no linked project, a detected agent harness (or `-y`) auto-creates a project + service and deploys; an interactive human is offered create \u002F link-existing \u002F cancel. Add `-y` to skip prompts and force the create non-interactively (works even if harness detection misses). |\n| `railway login` | Sign in — *and* sign up. New accounts are created on the fly through the same OAuth surface; there is no separate signup command. |\n\nRelated: `railway up --new` creates a *fresh* project + service from the current directory and deploys it even if one is already linked (use when already signed in and the user wants a new app); `--name \u003Cname>` overrides the project name.\n\n**Choosing the path:**\n\n- Deploy from cwd → run `railway up` (interactive) or `railway up -y` (skips the confirm prompt). Run it yourself; don't ask the user to sign in separately first.\n- New project from cwd when already signed in → `railway up --new`.\n- **Sign up with a deployable app in cwd → `railway up`** (signs up *and* deploys — bare `up` works for a detected agent, even if the user only said \"sign me up\"; add `-y` to skip prompts \u002F force it non-interactively). Sign in, or sign up with nothing to deploy → `railway login` (creates new accounts on the fly).\n\n**Headless \u002F no browser:**\n\nThe CLI **auto-detects** SSH sessions, CI, and a missing `DISPLAY` and switches to the device-code flow on its own — you almost never need to force it.\n\n**Do NOT pass `--browserless` just because you are an agent or your shell is non-interactive.** If the human is at this machine (a local IDE or desktop session — the common case), bare `railway login` opens *their* browser directly, which completes far more reliably than relaying a device code (~90% vs ~60% success for agent-driven sign-ins). Being a coding agent does not make the machine headless.\n\n```bash\nrailway login --browserless   # ONLY for machines with genuinely no browser\n```\n\nForces the device-code flow (RFC 8628): prints a sign-in link and a short code for the user to open on any device. Reserve it for machines where no browser exists — SSH boxes, containers, remote VMs the auto-detection missed. When you do end up in a device-code flow, follow the relay procedure below: surface the sign-in link to the user the moment it prints.\n\n**Agent harness, human present**: when the CLI detects an agent harness (Claude Code, Cursor, Codex, …) with a human at the keyboard, `railway up` opens the browser and skips the confirm prompt — the agent invocation is treated as consent. A real human still has to complete OAuth in the browser.\n\n**Device-code sign-in: relay the link immediately (CRITICAL):**\n\nWhen the CLI can't open a browser (sandboxed shell, container, SSH, no `DISPLAY`), unauthed `railway up` and `railway login` print a sign-in URL + short code and then **block, polling for up to 10 minutes** while the user completes sign-in. The code expires after 10 minutes. If you run this as a normal foreground command, your harness buffers the output until the command exits — **the user never sees the link until the code is already dead**. This is the #1 cause of failed agent-driven signups. Handle it like this:\n\n1. **Preferred — background execution** (e.g. Claude Code: `run_in_background`, then poll with `BashOutput`):\n   - Start the command in the background.\n   - Poll its output. The instant a sign-in block appears (`Sign in with one click: \u003Curl>` on newer CLIs, or `Sign in at: \u003Curl>` \u002F `Enter this code: \u003Ccode>` on older ones), **stop everything and relay it to the user verbatim** — do not summarize, shorten, or defer it. Prefer the one-click URL when present; otherwise relay the URL and code together. Tell the user to open the link now.\n   - Leave the command running and keep polling. When the user completes sign-in, the same process picks up the session and continues into the deploy on its own. Then verify per the deploy rules below.\n2. **No background support — set expectations, use the longest timeout:**\n   - Before running, tell the user: *\"This will print a sign-in link — I'll show it to you the moment I have it. Please complete it promptly; the code expires in 10 minutes.\"*\n   - Run with the longest timeout your harness allows.\n   - If the command times out or is killed before sign-in completed, the printed code is **no longer being monitored** — a late click does nothing. Relay whatever link appeared anyway for context, then immediately re-run the command and relay the **new** link, telling the user to always use the newest one.\n3. **Never** wait silently for the command to finish before showing the link, and never report the sign-in as failed without first relaying the link and giving the user a chance to act.\n\nThe browser transport needs none of this — the CLI opens the browser on the user's machine itself.\n\n**JSON \u002F CI modes do not auto-prompt**: `railway up --json` and `railway up --ci` will NOT open a browser for an unauthed user. `--json` emits a structured error instead:\n\n```json\n{\"error\":\"Not signed in.\",\"code\":\"NOT_AUTHENTICATED\",\"hint\":\"Run `railway login` to authenticate, then re-run.\"}\n```\n\nWhen you see `code: NOT_AUTHENTICATED`, authenticate the user with `railway login`, then retry the original command.\n\n**Fully unattended (no human at all)**: set `RAILWAY_API_TOKEN` (account-scoped) or `RAILWAY_TOKEN` (project-scoped) instead of running an interactive login. A brand-new user with no token and no human present cannot complete signup — there is no headless account-creation path.\n\n## Agent tooling\n\nUse direct Railway CLI commands for deterministic operations. Use `railway agent` only when the user explicitly asks for Railway Agent, wants a natural-language investigation, or the task is broader than a single resource operation.\n\nSet up Railway skills, MCP, and authentication with:\n\n```bash\nrailway setup agent\nrailway setup agent -y\nrailway setup agent --remote\n```\n\n`railway setup agent -y` skips the interactive login flow. If the user isn't authenticated after setup, run `railway login`.\n\nInstall or update MCP and skills directly when the user names a target tool:\n\n```bash\nrailway mcp install --remote\nrailway mcp install --agent codex --remote\nrailway mcp install --agent cursor --remote\nrailway skills\nrailway skills update --agent codex\nrailway skills remove --agent cursor\n```\n\nSupported targets include `claude-code`, `cursor`, `codex`, `opencode`, `copilot`, and `factory-droid`. The `--remote` flag configures `https:\u002F\u002Fmcp.railway.com` instead of a local `railway mcp` stdio server.\n\nUse Railway Agent chat with:\n\n```bash\nrailway agent\nrailway agent -p \"why is my service crashing?\"\nrailway agent -p \"summarize the deployment status\" --json\nrailway agent --list --json\nrailway agent --thread-id \u003Cthread-id>\n```\n\n`railway agent` requires user OAuth authentication from `railway login`. Project tokens (`RAILWAY_TOKEN`) are not supported for Railway Agent chat. If an agent command is unavailable, upgrade with `railway upgrade --yes`.\n\n## Common quick operations\n\nThese are frequent enough to handle without loading a reference. Use the matching MCP tool when the job is platform-scoped and the tool is available; otherwise use the CLI:\n\n```bash\nrailway status --json                                    # current context\nrailway whoami --json                                    # auth and workspace info\nrailway project list --json                              # list projects\nrailway service list --json                              # services in current environment (verify before retrying `add`)\nrailway add --database \u003Ctype> --json                     # add one database; ALWAYS pass --json\nrailway add --service \u003Cname> --json                      # add empty service; ALWAYS pass --json\nrailway variable list --service \u003Csvc> --json             # list variables\nrailway variable set KEY=value --service \u003Csvc>           # set a variable\nrailway domain list --service \u003Csvc> --json               # domains and DNS status\nrailway logs --service \u003Csvc> --lines 200 --json          # recent logs\nrailway logs --service \u003Csvc> --network --lines 200 --json # network flow snapshot\nrailway metrics --service \u003Csvc> --since 1h --json        # resource and HTTP metrics summary\nrailway up --detach -m \"\u003Csummary>\"                       # deploy current directory (returns at QUEUED — verify before reporting)\nrailway deployment list --json                           # poll newest deployment status after a detached up\nrailway bucket list --json                               # list buckets in current environment\nrailway bucket info --bucket \u003Cname> --json               # bucket storage and object count\nrailway bucket credentials --bucket \u003Cname> --json        # S3-compatible credentials\n```\n\n## Routing\n\nFor anything beyond quick operations, load the reference that matches the user's intent. Load only what you need, one reference is usually enough, two at most.\n\n| Intent | Reference | Use for |\n|---|---|---|\n| **Analyze a database** (\"analyze \\\u003Curl\\>\", \"analyze db\", \"analyze database\", \"analyze service\", \"introspect\", \"check my postgres\u002Fredis\u002Fmysql\u002Fmongo\") | [analyze-db.md](references\u002Fanalyze-db.md) | Database introspection and performance analysis. analyze-db.md directs you to the DB-specific reference. **This takes priority over the status\u002Foperate routes when a Railway URL to a database service is provided alongside \"analyze\".** |\n| Create or connect resources | [setup.md](references\u002Fsetup.md) | Projects, services, databases, buckets, templates, workspaces |\n| Ship code or manage releases | [deploy.md](references\u002Fdeploy.md) | Deploy, redeploy, restart, build config, monorepo, Dockerfile |\n| Change configuration | [configure.md](references\u002Fconfigure.md) | Environments, variables, config patches, domains, networking |\n| Manage feature flags | [feature-flags.md](references\u002Ffeature-flags.md) | List\u002Fcreate\u002Fupdate project flags via MCP; workspace flags read-only; SDK runtime reads |\n| Define configuration in source control (\"IaC\", \"infrastructure as code\", \"config as code\", `.railway\u002Frailway.ts`, `railway.json`, \"config plan\u002Fapply\u002Fpull\") | [iac.md](references\u002Fiac.md) | Choose TypeScript IaC or the `railway.json` fallback, then author, import, plan, apply, or check drift safely |\n| Check health or debug failures | [operate.md](references\u002Foperate.md) | Status, logs, metrics, build\u002Fruntime triage, recovery |\n| Use a sandbox or build remotely (\"sandbox\", \"scratch environment\", \"ephemeral box\", \"build remotely\", \"remote build\", \"run this remotely\", \"checkpoint\", \"snapshot\u002Fsave\u002Frestore sandbox state\") | [sandbox.md](references\u002Fsandbox.md) | Create\u002Ffork sandboxes, run commands remotely, remote template builds, checkpoints (save\u002Frestore sandbox state), port forwarding, teardown. Requires Sandboxes enabled in Priority Boarding — if unavailable, prompt the user to enable it. |\n| Request from API, docs, or community | [request.md](references\u002Frequest.md) | Railway GraphQL API queries\u002Fmutations, metrics queries, Central Station, official docs |\n\nIf the request spans two areas (for example, \"deploy and then check if it's healthy\"), load both references and compose one response.\n\n## Execution rules\n\n1. Use Railway CLI for workflows that need the current repo, local shell, SSH, database scripts, local Railway context, or exact command output.\n2. Use Remote MCP for OAuth-scoped platform operations that match an available MCP tool and do not need local files or CLI state.\n3. Use local CLI MCP only when the current agent already has it explicitly configured and it exposes a needed operation not available through Remote MCP.\n4. Fall back to `scripts\u002Frailway-api.sh` for operations neither MCP nor CLI exposes.\n5. Use `--json` output where available for reliable parsing.\n6. Resolve context before mutation. Know which project, environment, and service you're acting on.\n7. For destructive actions (delete service, remove deployment, drop database), confirm intent and state impact before executing.\n8. After mutations, verify the result with a read-back command or MCP read.\n9. **Never report a deploy as successful without observing a terminal SUCCESS.** `railway up --detach` returning (it prints \"Build queued\") and a streaming `railway up` cut off by a shell timeout only confirm the build *started*. Poll `railway deployment list --json` with the same `--project`, `--environment`, and `--service` scope used for the deploy until the newest deployment's `status` is `SUCCESS` (report deployed). If status is `FAILED` or `CRASHED`, triage per [operate.md](references\u002Foperate.md). If status is `NEEDS_APPROVAL`, `SLEEPING`, `SKIPPED`, `REMOVED`, `REMOVING`, or an unknown value, report the exact state and next action; do not claim success. A streaming `up` that exits on its own is authoritative: exit 0 = deployed, exit 1 = failed.\n\n## User-only commands (NEVER execute directly)\n\nThese commands modify database state and require the user to run them directly in their terminal. **Do NOT execute these with Bash. Instead, show the command and ask the user to run it.**\n\n| Command | Why user-only |\n|---------|---------------|\n| `python3 scripts\u002Fenable-pg-stats.py --service \u003Cname>` | Modifies shared_preload_libraries, may restart database |\n| `python3 scripts\u002Fpg-extensions.py --service \u003Cname> install \u003Cext>` | Installs database extension |\n| `python3 scripts\u002Fpg-extensions.py --service \u003Cname> uninstall \u003Cext>` | Removes database extension |\n| `ALTER SYSTEM SET ...` | Changes PostgreSQL configuration |\n| `DROP EXTENSION ...` | Removes database extension |\n| `CREATE EXTENSION ...` | Installs database extension |\n\nWhen these operations are needed:\n1. Explain what the command does and any side effects (e.g., restart required)\n2. Show the exact command the user must run\n3. Wait for user confirmation that they ran it\n4. Verify the result with a read-only query\n\n## Composition patterns\n\nMulti-step workflows follow natural chains:\n\n- **Add object storage**: setup (create bucket), setup (get credentials), configure (set S3 variables on app service)\n- **First deploy**: setup (create project + service), configure (set variables and source), deploy, operate (verify healthy)\n- **Fix a failure**: operate (triage logs), configure (fix config\u002Fvariables), deploy (redeploy), operate (verify recovery)\n- **Add a domain**: configure (add domain + set port), operate (verify DNS and service health)\n- **Docs to action**: request (fetch docs answer), route to the relevant operational reference\n\nWhen composing, return one unified response covering all steps. Don't ask the user to invoke each step separately.\n\n## Setup decision flow\n\nWhen the user wants to create or deploy something, determine the right action from current context:\n\n1. If the intent is deploy-from-cwd or signup-from-cwd, skip `railway whoami` and run `railway up` (or `railway up -y`) directly per [Intent-based routing](#intent-based-routing) — it handles signup, project creation, service creation, and deploy in one chain. For other setup flows that need workspace\u002Faccount context first, run `railway whoami --json`; if it fails with an auth error the user has no token — route through [Account creation & sign-in](#account-creation--sign-in).\n2. Run `railway status --json` in the current directory.\n3. **If linked**: add a service to the existing project (`railway add --service \u003Cname>`). Do not create a new project unless the user explicitly says \"new project\" or \"separate project\".\n4. **If not linked**: check the parent directory (`cd .. && railway status --json`).\n   - **Parent linked**: this is likely a monorepo sub-app. Add a service and set `rootDirectory` to the sub-app path.\n   - **Parent not linked**: run `railway list --json` and look for a project matching the directory name.\n     - **Match found**: link to it (`railway link --project \u003Cname>`).\n     - **No match**: create a new project (`railway init --name \u003Cname>`).\n5. When multiple workspaces exist, match by name from `railway whoami --json`.\n\n**Naming heuristic**: app names like \"flappy-bird\" or \"my-api\" are service names, not project names. Use the directory or repo name for the project.\n\n## Response format\n\nFor all operational responses, return:\n1. What was done (action and scope).\n2. The result (IDs, status, key output).\n3. What to do next (or confirmation that the task is complete).\n\nKeep output concise. Include command evidence only when it helps the user understand what happened.\n",{"data":36,"body":38},{"name":4,"description":6,"allowed-tools":37},"Bash(railway:*), Bash(which:*), Bash(command:*), Bash(npm:*), Bash(npx:*), Bash(curl:*), Bash(python3:*)",{"type":39,"children":40},"root",[41,49,56,62,144,179,185,190,260,265,278,291,297,302,314,343,448,460,519,525,538,548,633,643,754,764,780,790,798,804,809,951,987,994,1007,1060,1065,1115,1120,1125,1154,1162,1201,1206,1362,1394,1407,1426,1431,1436,1441,1522,1550,1558,1634,1642,1662,1694,1723,1728,1745,1753,1792,1925,1930,1962,2084,2104,2130,2136,2149,2154,2219,2235,2240,2387,2458,2463,2598,2629,2635,2640,3312,3318,3323,3578,3583,3589,3785,3791,3801,3922,3927,3950,3956,3961,4014,4019,4025,4030,4214,4224,4230,4235,4253,4258],{"type":42,"tag":43,"props":44,"children":45},"element","h1",{"id":4},[46],{"type":47,"value":48},"text","Use Railway",{"type":42,"tag":50,"props":51,"children":53},"h2",{"id":52},"railway-resource-model",[54],{"type":47,"value":55},"Railway resource model",{"type":42,"tag":57,"props":58,"children":59},"p",{},[60],{"type":47,"value":61},"Railway organizes infrastructure in a hierarchy:",{"type":42,"tag":63,"props":64,"children":65},"ul",{},[66,78,88,115,125,135],{"type":42,"tag":67,"props":68,"children":69},"li",{},[70,76],{"type":42,"tag":71,"props":72,"children":73},"strong",{},[74],{"type":47,"value":75},"Workspace",{"type":47,"value":77}," is the billing and team scope. A user belongs to one or more workspaces.",{"type":42,"tag":67,"props":79,"children":80},{},[81,86],{"type":42,"tag":71,"props":82,"children":83},{},[84],{"type":47,"value":85},"Project",{"type":47,"value":87}," is a collection of services under one workspace. It maps to one deployable unit of work.",{"type":42,"tag":67,"props":89,"children":90},{},[91,96,98,105,107,113],{"type":42,"tag":71,"props":92,"children":93},{},[94],{"type":47,"value":95},"Environment",{"type":47,"value":97}," is an isolated configuration plane inside a project (for example, ",{"type":42,"tag":99,"props":100,"children":102},"code",{"className":101},[],[103],{"type":47,"value":104},"production",{"type":47,"value":106},", ",{"type":42,"tag":99,"props":108,"children":110},{"className":109},[],[111],{"type":47,"value":112},"staging",{"type":47,"value":114},"). Each environment has its own variables, config, and deployment history.",{"type":42,"tag":67,"props":116,"children":117},{},[118,123],{"type":42,"tag":71,"props":119,"children":120},{},[121],{"type":47,"value":122},"Service",{"type":47,"value":124}," is a single deployable unit inside a project. It can be an app from a repo, a Docker image, or a managed database.",{"type":42,"tag":67,"props":126,"children":127},{},[128,133],{"type":42,"tag":71,"props":129,"children":130},{},[131],{"type":47,"value":132},"Bucket",{"type":47,"value":134}," is an S3-compatible object storage resource inside a project. Buckets are created at the project level and deployed to environments. Each bucket has credentials (endpoint, access key, secret key) for S3-compatible access.",{"type":42,"tag":67,"props":136,"children":137},{},[138,142],{"type":42,"tag":71,"props":139,"children":140},{},[141],{"type":47,"value":14},{"type":47,"value":143}," is a point-in-time release of a service in an environment. It has build logs, runtime logs, and a status lifecycle.",{"type":42,"tag":57,"props":145,"children":146},{},[147,149,155,157,163,164,170,171,177],{"type":47,"value":148},"Most CLI commands operate on the linked project\u002Fenvironment\u002Fservice context. Use ",{"type":42,"tag":99,"props":150,"children":152},{"className":151},[],[153],{"type":47,"value":154},"railway status --json",{"type":47,"value":156}," to see the context, and ",{"type":42,"tag":99,"props":158,"children":160},{"className":159},[],[161],{"type":47,"value":162},"--project",{"type":47,"value":106},{"type":42,"tag":99,"props":165,"children":167},{"className":166},[],[168],{"type":47,"value":169},"--environment",{"type":47,"value":106},{"type":42,"tag":99,"props":172,"children":174},{"className":173},[],[175],{"type":47,"value":176},"--service",{"type":47,"value":178}," flags to override.",{"type":42,"tag":50,"props":180,"children":182},{"id":181},"tool-routing",[183],{"type":47,"value":184},"Tool routing",{"type":42,"tag":57,"props":186,"children":187},{},[188],{"type":47,"value":189},"Railway has three agent-facing operation paths. Choose the path that matches the job:",{"type":42,"tag":63,"props":191,"children":192},{},[193,225,250],{"type":42,"tag":67,"props":194,"children":195},{},[196,201,203,208,210,216,217,223],{"type":42,"tag":71,"props":197,"children":198},{},[199],{"type":47,"value":200},"Railway CLI",{"type":47,"value":202}," (",{"type":42,"tag":99,"props":204,"children":206},{"className":205},[],[207],{"type":47,"value":8},{"type":47,"value":209},"): workflows that depend on local machine state such as current working directory deploys, ",{"type":42,"tag":99,"props":211,"children":213},{"className":212},[],[214],{"type":47,"value":215},"railway up",{"type":47,"value":106},{"type":42,"tag":99,"props":218,"children":220},{"className":219},[],[221],{"type":47,"value":222},"railway run",{"type":47,"value":224},", SSH, database analysis scripts, local linking, interactive setup, or exact command output.",{"type":42,"tag":67,"props":226,"children":227},{},[228,233,234,240,242,248],{"type":42,"tag":71,"props":229,"children":230},{},[231],{"type":47,"value":232},"Remote MCP",{"type":47,"value":202},{"type":42,"tag":99,"props":235,"children":237},{"className":236},[],[238],{"type":47,"value":239},"https:\u002F\u002Fmcp.railway.com",{"type":47,"value":241},"): default plugin MCP path for account\u002Fproject\u002Fservice discovery, deployment state, bounded logs, feature flags, simple redeploys, simple project creation, or complex Railway workflows that can be handed to ",{"type":42,"tag":99,"props":243,"children":245},{"className":244},[],[246],{"type":47,"value":247},"railway-agent",{"type":47,"value":249},". Remote MCP uses Railway OAuth and does not depend on local CLI state.",{"type":42,"tag":67,"props":251,"children":252},{},[253,258],{"type":42,"tag":71,"props":254,"children":255},{},[256],{"type":47,"value":257},"GraphQL",{"type":47,"value":259},": operations that neither MCP nor CLI exposes, or when a reference gives a specific GraphQL fallback.",{"type":42,"tag":57,"props":261,"children":262},{},[263],{"type":47,"value":264},"If multiple paths are available, choose the one that preserves the needed context. The CLI fits workflows that need the current repo, local credentials, SSH, database scripts, or exact command output. Remote MCP fits OAuth-scoped platform operations that do not need local files or CLI state.",{"type":42,"tag":57,"props":266,"children":267},{},[268,270,276],{"type":47,"value":269},"Optional: if the current agent already has a user-installed local CLI MCP (",{"type":42,"tag":99,"props":271,"children":273},{"className":272},[],[274],{"type":47,"value":275},"railway mcp",{"type":47,"value":277},") configured, it can be used for CLI-backed platform operations not yet exposed by remote MCP. Published plugin configs do not install or launch local CLI MCP.",{"type":42,"tag":57,"props":279,"children":280},{},[281,283,289],{"type":47,"value":282},"Use ",{"type":42,"tag":99,"props":284,"children":286},{"className":285},[],[287],{"type":47,"value":288},"scripts\u002Frailway-api.sh",{"type":47,"value":290}," for GraphQL only when neither MCP nor CLI exposes the operation, or when a reference gives a specific GraphQL fallback.",{"type":42,"tag":50,"props":292,"children":294},{"id":293},"parsing-railway-urls",[295],{"type":47,"value":296},"Parsing Railway URLs",{"type":42,"tag":57,"props":298,"children":299},{},[300],{"type":47,"value":301},"Users often paste Railway dashboard URLs. Extract IDs before doing anything else:",{"type":42,"tag":303,"props":304,"children":308},"pre",{"className":305,"code":307,"language":47},[306],"language-text","https:\u002F\u002Frailway.com\u002Fproject\u002F\u003CPROJECT_ID>\u002Fservice\u002F\u003CSERVICE_ID>?environmentId=\u003CENV_ID>\nhttps:\u002F\u002Frailway.com\u002Fproject\u002F\u003CPROJECT_ID>\u002Fservice\u002F\u003CSERVICE_ID>\n",[309],{"type":42,"tag":99,"props":310,"children":312},{"__ignoreMap":311},"",[313],{"type":47,"value":307},{"type":42,"tag":57,"props":315,"children":316},{},[317,319,325,327,333,335,341],{"type":47,"value":318},"The URL always contains ",{"type":42,"tag":99,"props":320,"children":322},{"className":321},[],[323],{"type":47,"value":324},"projectId",{"type":47,"value":326}," and ",{"type":42,"tag":99,"props":328,"children":330},{"className":329},[],[331],{"type":47,"value":332},"serviceId",{"type":47,"value":334},". It may contain ",{"type":42,"tag":99,"props":336,"children":338},{"className":337},[],[339],{"type":47,"value":340},"environmentId",{"type":47,"value":342}," as a query parameter. If the environment ID is missing and the user specifies an environment by name (e.g., \"production\"), resolve it:",{"type":42,"tag":303,"props":344,"children":348},{"className":345,"code":346,"language":347,"meta":311,"style":311},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","scripts\u002Frailway-api.sh \\\n  'query getProject($id: String!) {\n    project(id: $id) {\n      environments { edges { node { id name } } }\n    }\n  }' \\\n  '{\"id\": \"\u003CPROJECT_ID>\"}'\n","bash",[349],{"type":42,"tag":99,"props":350,"children":351},{"__ignoreMap":311},[352,369,385,394,403,412,430],{"type":42,"tag":353,"props":354,"children":357},"span",{"class":355,"line":356},"line",1,[358,363],{"type":42,"tag":353,"props":359,"children":361},{"style":360},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[362],{"type":47,"value":288},{"type":42,"tag":353,"props":364,"children":366},{"style":365},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[367],{"type":47,"value":368}," \\\n",{"type":42,"tag":353,"props":370,"children":372},{"class":355,"line":371},2,[373,379],{"type":42,"tag":353,"props":374,"children":376},{"style":375},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[377],{"type":47,"value":378},"  '",{"type":42,"tag":353,"props":380,"children":382},{"style":381},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[383],{"type":47,"value":384},"query getProject($id: String!) {\n",{"type":42,"tag":353,"props":386,"children":388},{"class":355,"line":387},3,[389],{"type":42,"tag":353,"props":390,"children":391},{"style":381},[392],{"type":47,"value":393},"    project(id: $id) {\n",{"type":42,"tag":353,"props":395,"children":397},{"class":355,"line":396},4,[398],{"type":42,"tag":353,"props":399,"children":400},{"style":381},[401],{"type":47,"value":402},"      environments { edges { node { id name } } }\n",{"type":42,"tag":353,"props":404,"children":406},{"class":355,"line":405},5,[407],{"type":42,"tag":353,"props":408,"children":409},{"style":381},[410],{"type":47,"value":411},"    }\n",{"type":42,"tag":353,"props":413,"children":415},{"class":355,"line":414},6,[416,421,426],{"type":42,"tag":353,"props":417,"children":418},{"style":381},[419],{"type":47,"value":420},"  }",{"type":42,"tag":353,"props":422,"children":423},{"style":375},[424],{"type":47,"value":425},"'",{"type":42,"tag":353,"props":427,"children":428},{"style":365},[429],{"type":47,"value":368},{"type":42,"tag":353,"props":431,"children":433},{"class":355,"line":432},7,[434,438,443],{"type":42,"tag":353,"props":435,"children":436},{"style":375},[437],{"type":47,"value":378},{"type":42,"tag":353,"props":439,"children":440},{"style":381},[441],{"type":47,"value":442},"{\"id\": \"\u003CPROJECT_ID>\"}",{"type":42,"tag":353,"props":444,"children":445},{"style":375},[446],{"type":47,"value":447},"'\n",{"type":42,"tag":57,"props":449,"children":450},{},[451,453,458],{"type":47,"value":452},"Match the environment name (case-insensitive) to get the ",{"type":42,"tag":99,"props":454,"children":456},{"className":455},[],[457],{"type":47,"value":340},{"type":47,"value":459},".",{"type":42,"tag":57,"props":461,"children":462},{},[463,468,470,475,476,481,482,487,489,495,496,502,503,509,511,517],{"type":42,"tag":71,"props":464,"children":465},{},[466],{"type":47,"value":467},"Prefer passing explicit IDs",{"type":47,"value":469}," to CLI commands (",{"type":42,"tag":99,"props":471,"children":473},{"className":472},[],[474],{"type":47,"value":162},{"type":47,"value":106},{"type":42,"tag":99,"props":477,"children":479},{"className":478},[],[480],{"type":47,"value":169},{"type":47,"value":106},{"type":42,"tag":99,"props":483,"children":485},{"className":484},[],[486],{"type":47,"value":176},{"type":47,"value":488},") and scripts (",{"type":42,"tag":99,"props":490,"children":492},{"className":491},[],[493],{"type":47,"value":494},"--project-id",{"type":47,"value":106},{"type":42,"tag":99,"props":497,"children":499},{"className":498},[],[500],{"type":47,"value":501},"--environment-id",{"type":47,"value":106},{"type":42,"tag":99,"props":504,"children":506},{"className":505},[],[507],{"type":47,"value":508},"--service-id",{"type":47,"value":510},") instead of running ",{"type":42,"tag":99,"props":512,"children":514},{"className":513},[],[515],{"type":47,"value":516},"railway link",{"type":47,"value":518},". This avoids modifying global state and is faster.",{"type":42,"tag":50,"props":520,"children":522},{"id":521},"intent-based-routing",[523],{"type":47,"value":524},"Intent-based routing",{"type":42,"tag":57,"props":526,"children":527},{},[528,530,536],{"type":47,"value":529},"Route by user intent ",{"type":42,"tag":531,"props":532,"children":533},"em",{},[534],{"type":47,"value":535},"before",{"type":47,"value":537}," running preflight checks. The preflight ceremony below is for diagnostic and configuration work — it adds friction when the user just wants to ship something or sign up.",{"type":42,"tag":57,"props":539,"children":540},{},[541,546],{"type":42,"tag":71,"props":542,"children":543},{},[544],{"type":47,"value":545},"Deploy-from-cwd intent",{"type":47,"value":547}," (\"deploy\", \"ship\", \"push to Railway\", \"deploy this app\"):",{"type":42,"tag":63,"props":549,"children":550},{},[551,572,584,601,619],{"type":42,"tag":67,"props":552,"children":553},{},[554,556,562,564,570],{"type":47,"value":555},"Skip the ",{"type":42,"tag":99,"props":557,"children":559},{"className":558},[],[560],{"type":47,"value":561},"railway whoami",{"type":47,"value":563}," \u002F ",{"type":42,"tag":99,"props":565,"children":567},{"className":566},[],[568],{"type":47,"value":569},"railway status",{"type":47,"value":571}," preflights.",{"type":42,"tag":67,"props":573,"children":574},{},[575,577,582],{"type":47,"value":576},"Run ",{"type":42,"tag":99,"props":578,"children":580},{"className":579},[],[581],{"type":47,"value":215},{"type":47,"value":583}," directly — it self-validates auth, signs the user in (the CLI opens a browser) if they're unauthenticated, and chains into project + service creation and deploy.",{"type":42,"tag":67,"props":585,"children":586},{},[587,589],{"type":47,"value":588},"Announce intent before invoking: ",{"type":42,"tag":531,"props":590,"children":591},{},[592,594,599],{"type":47,"value":593},"\"Running ",{"type":42,"tag":99,"props":595,"children":597},{"className":596},[],[598],{"type":47,"value":215},{"type":47,"value":600}," — it'll sign you in if needed and deploy this directory.\"",{"type":42,"tag":67,"props":602,"children":603},{},[604,617],{"type":42,"tag":71,"props":605,"children":606},{},[607,609,615],{"type":47,"value":608},"Do NOT ask the user to run ",{"type":42,"tag":99,"props":610,"children":612},{"className":611},[],[613],{"type":47,"value":614},"railway login",{"type":47,"value":616}," first.",{"type":47,"value":618}," The chain handles auth as part of the deploy.",{"type":42,"tag":67,"props":620,"children":621},{},[622,624,631],{"type":47,"value":623},"If the environment can't open a browser, the CLI prints a device-code sign-in link and waits — follow ",{"type":42,"tag":625,"props":626,"children":628},"a",{"href":627},"#account-creation--sign-in",[629],{"type":47,"value":630},"Device-code sign-in: relay the link immediately",{"type":47,"value":632}," (run in background, relay the link to the user the moment it prints).",{"type":42,"tag":57,"props":634,"children":635},{},[636,641],{"type":42,"tag":71,"props":637,"children":638},{},[639],{"type":47,"value":640},"Signup intent",{"type":47,"value":642}," (\"sign me up\", \"create my Railway account\", \"register me\", \"get me on Railway\"):",{"type":42,"tag":63,"props":644,"children":645},{},[646,726,743],{"type":42,"tag":67,"props":647,"children":648},{},[649,688,690,695,697,709,711,717,719,724],{"type":42,"tag":71,"props":650,"children":651},{},[652,654,660,661,667,668,674,675,681,683],{"type":47,"value":653},"If the current directory has a deployable app (e.g. ",{"type":42,"tag":99,"props":655,"children":657},{"className":656},[],[658],{"type":47,"value":659},"package.json",{"type":47,"value":106},{"type":42,"tag":99,"props":662,"children":664},{"className":663},[],[665],{"type":47,"value":666},"requirements.txt",{"type":47,"value":106},{"type":42,"tag":99,"props":669,"children":671},{"className":670},[],[672],{"type":47,"value":673},"go.mod",{"type":47,"value":106},{"type":42,"tag":99,"props":676,"children":678},{"className":677},[],[679],{"type":47,"value":680},"Dockerfile",{"type":47,"value":682},", source to build), run ",{"type":42,"tag":99,"props":684,"children":686},{"className":685},[],[687],{"type":47,"value":215},{"type":47,"value":689}," — it signs the user up ",{"type":42,"tag":531,"props":691,"children":692},{},[693],{"type":47,"value":694},"and",{"type":47,"value":696}," deploys in one shot, landing them on a running app. A detected agent harness authorizes the project creation, so ",{"type":42,"tag":71,"props":698,"children":699},{},[700,702,707],{"type":47,"value":701},"bare ",{"type":42,"tag":99,"props":703,"children":705},{"className":704},[],[706],{"type":47,"value":215},{"type":47,"value":708}," is enough",{"type":47,"value":710}," — there's no extra prompt to clear. Use it even when the user only said \"sign me up\": shipping their app is the goal, so don't make them pick a command and don't drop to a bare login. For scripted or agent runs, ",{"type":42,"tag":99,"props":712,"children":714},{"className":713},[],[715],{"type":47,"value":716},"railway up -y",{"type":47,"value":718}," is the robust form — it skips prompts and forces the create non-interactively even if harness detection misses. ",{"type":42,"tag":99,"props":720,"children":722},{"className":721},[],[723],{"type":47,"value":614},{"type":47,"value":725}," is NOT the default for signup when there's something to deploy.",{"type":42,"tag":67,"props":727,"children":728},{},[729,734,736,741],{"type":42,"tag":71,"props":730,"children":731},{},[732],{"type":47,"value":733},"Only when there is nothing to deploy",{"type":47,"value":735}," — an empty \u002F non-app directory, or the user explicitly says they just want an account with no deploy — use ",{"type":42,"tag":99,"props":737,"children":739},{"className":738},[],[740],{"type":47,"value":614},{"type":47,"value":742}," (creates new accounts on the fly through the same OAuth surface). There is no separate signup command.",{"type":42,"tag":67,"props":744,"children":745},{},[746,748,752],{"type":47,"value":747},"Signup is the flow most likely to hit the device-code wait (brand-new users in sandboxed\u002Fheadless agent environments). Follow ",{"type":42,"tag":625,"props":749,"children":750},{"href":627},[751],{"type":47,"value":630},{"type":47,"value":753}," — a signup lost to an expired code is a lost user, not a retry.",{"type":42,"tag":57,"props":755,"children":756},{},[757,762],{"type":42,"tag":71,"props":758,"children":759},{},[760],{"type":47,"value":761},"Sandbox \u002F remote-build intent",{"type":47,"value":763}," (\"give me a sandbox\", \"spin up a scratch environment\", \"build this remotely\", \"run this remotely\", \"checkpoint\u002Fsnapshot the sandbox\", \"save this sandbox state\", \"restore my sandbox\"):",{"type":42,"tag":63,"props":765,"children":766},{},[767],{"type":42,"tag":67,"props":768,"children":769},{},[770,772,778],{"type":47,"value":771},"Load ",{"type":42,"tag":625,"props":773,"children":775},{"href":774},"references\u002Fsandbox.md",[776],{"type":47,"value":777},"sandbox.md",{"type":47,"value":779}," and follow it. Sandboxes require the feature to be enabled in Priority Boarding — if a sandbox command fails with a feature-availability error, prompt the user to enable Sandboxes in Priority Boarding rather than retrying.",{"type":42,"tag":57,"props":781,"children":782},{},[783,788],{"type":42,"tag":71,"props":784,"children":785},{},[786],{"type":47,"value":787},"Other intents",{"type":47,"value":789}," (querying state, listing projects, configuring variables, debugging failures):",{"type":42,"tag":63,"props":791,"children":792},{},[793],{"type":42,"tag":67,"props":794,"children":795},{},[796],{"type":47,"value":797},"Follow the Preflight section below.",{"type":42,"tag":50,"props":799,"children":801},{"id":800},"preflight",[802],{"type":47,"value":803},"Preflight",{"type":42,"tag":57,"props":805,"children":806},{},[807],{"type":47,"value":808},"Before any mutation, verify the tool path and context:",{"type":42,"tag":303,"props":810,"children":812},{"className":345,"code":811,"language":347,"meta":311,"style":311},"command -v railway                # CLI installed\nRAILWAY_CALLER=\"skill:use-railway@1.3.6\" RAILWAY_AGENT_SESSION=\"railway-skill-$(date +%s)-$$\" railway whoami --json\nrailway --version                 # check CLI version\n",[813],{"type":42,"tag":99,"props":814,"children":815},{"__ignoreMap":311},[816,841,934],{"type":42,"tag":353,"props":817,"children":818},{"class":355,"line":356},[819,825,830,835],{"type":42,"tag":353,"props":820,"children":822},{"style":821},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[823],{"type":47,"value":824},"command",{"type":42,"tag":353,"props":826,"children":827},{"style":381},[828],{"type":47,"value":829}," -v",{"type":42,"tag":353,"props":831,"children":832},{"style":381},[833],{"type":47,"value":834}," railway",{"type":42,"tag":353,"props":836,"children":838},{"style":837},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[839],{"type":47,"value":840},"                # CLI installed\n",{"type":42,"tag":353,"props":842,"children":843},{"class":355,"line":371},[844,849,854,859,864,868,873,877,881,886,891,896,901,906,911,916,920,924,929],{"type":42,"tag":353,"props":845,"children":846},{"style":365},[847],{"type":47,"value":848},"RAILWAY_CALLER",{"type":42,"tag":353,"props":850,"children":851},{"style":375},[852],{"type":47,"value":853},"=",{"type":42,"tag":353,"props":855,"children":856},{"style":375},[857],{"type":47,"value":858},"\"",{"type":42,"tag":353,"props":860,"children":861},{"style":381},[862],{"type":47,"value":863},"skill:use-railway@1.3.6",{"type":42,"tag":353,"props":865,"children":866},{"style":375},[867],{"type":47,"value":858},{"type":42,"tag":353,"props":869,"children":870},{"style":365},[871],{"type":47,"value":872}," RAILWAY_AGENT_SESSION",{"type":42,"tag":353,"props":874,"children":875},{"style":375},[876],{"type":47,"value":853},{"type":42,"tag":353,"props":878,"children":879},{"style":375},[880],{"type":47,"value":858},{"type":42,"tag":353,"props":882,"children":883},{"style":381},[884],{"type":47,"value":885},"railway-skill-",{"type":42,"tag":353,"props":887,"children":888},{"style":375},[889],{"type":47,"value":890},"$(",{"type":42,"tag":353,"props":892,"children":893},{"style":360},[894],{"type":47,"value":895},"date",{"type":42,"tag":353,"props":897,"children":898},{"style":381},[899],{"type":47,"value":900}," +%s",{"type":42,"tag":353,"props":902,"children":903},{"style":375},[904],{"type":47,"value":905},")",{"type":42,"tag":353,"props":907,"children":908},{"style":381},[909],{"type":47,"value":910},"-",{"type":42,"tag":353,"props":912,"children":913},{"style":365},[914],{"type":47,"value":915},"$$",{"type":42,"tag":353,"props":917,"children":918},{"style":375},[919],{"type":47,"value":858},{"type":42,"tag":353,"props":921,"children":922},{"style":360},[923],{"type":47,"value":834},{"type":42,"tag":353,"props":925,"children":926},{"style":381},[927],{"type":47,"value":928}," whoami",{"type":42,"tag":353,"props":930,"children":931},{"style":381},[932],{"type":47,"value":933}," --json\n",{"type":42,"tag":353,"props":935,"children":936},{"class":355,"line":387},[937,941,946],{"type":42,"tag":353,"props":938,"children":939},{"style":360},[940],{"type":47,"value":8},{"type":42,"tag":353,"props":942,"children":943},{"style":381},[944],{"type":47,"value":945}," --version",{"type":42,"tag":353,"props":947,"children":948},{"style":837},[949],{"type":47,"value":950},"                 # check CLI version\n",{"type":42,"tag":57,"props":952,"children":953},{},[954,959,961,966,967,972,974,979,981,986],{"type":42,"tag":71,"props":955,"children":956},{},[957],{"type":47,"value":958},"Exception",{"type":47,"value":960},": ",{"type":42,"tag":99,"props":962,"children":964},{"className":963},[],[965],{"type":47,"value":215},{"type":47,"value":326},{"type":42,"tag":99,"props":968,"children":970},{"className":969},[],[971],{"type":47,"value":614},{"type":47,"value":973}," self-validate auth and run their own unauth-aware flows. Don't run ",{"type":42,"tag":99,"props":975,"children":977},{"className":976},[],[978],{"type":47,"value":561},{"type":47,"value":980}," before them — it adds a redundant failing call without changing what you do next. See ",{"type":42,"tag":625,"props":982,"children":983},{"href":627},[984],{"type":47,"value":985},"Account creation & sign-in",{"type":47,"value":459},{"type":42,"tag":988,"props":989,"children":991},"h3",{"id":990},"skill-freshness",[992],{"type":47,"value":993},"Skill freshness",{"type":42,"tag":57,"props":995,"children":996},{},[997,999,1005],{"type":47,"value":998},"Once per session, alongside the preflight checks, verify the installed Railway agent tooling is current. Root help ends with an ",{"type":42,"tag":99,"props":1000,"children":1002},{"className":1001},[],[1003],{"type":47,"value":1004},"Agent tooling:",{"type":47,"value":1006}," health section (printed to stderr, CLI 5.9+; older CLIs print nothing — skip this check rather than retrying):",{"type":42,"tag":303,"props":1008,"children":1010},{"className":345,"code":1009,"language":347,"meta":311,"style":311},"railway --help 2>&1 | grep -A4 \"Agent tooling:\"\n",[1011],{"type":42,"tag":99,"props":1012,"children":1013},{"__ignoreMap":311},[1014],{"type":42,"tag":353,"props":1015,"children":1016},{"class":355,"line":356},[1017,1021,1026,1031,1036,1041,1046,1051,1055],{"type":42,"tag":353,"props":1018,"children":1019},{"style":360},[1020],{"type":47,"value":8},{"type":42,"tag":353,"props":1022,"children":1023},{"style":381},[1024],{"type":47,"value":1025}," --help",{"type":42,"tag":353,"props":1027,"children":1028},{"style":375},[1029],{"type":47,"value":1030}," 2>&1",{"type":42,"tag":353,"props":1032,"children":1033},{"style":375},[1034],{"type":47,"value":1035}," |",{"type":42,"tag":353,"props":1037,"children":1038},{"style":360},[1039],{"type":47,"value":1040}," grep",{"type":42,"tag":353,"props":1042,"children":1043},{"style":381},[1044],{"type":47,"value":1045}," -A4",{"type":42,"tag":353,"props":1047,"children":1048},{"style":375},[1049],{"type":47,"value":1050}," \"",{"type":42,"tag":353,"props":1052,"children":1053},{"style":381},[1054],{"type":47,"value":1004},{"type":42,"tag":353,"props":1056,"children":1057},{"style":375},[1058],{"type":47,"value":1059},"\"\n",{"type":42,"tag":57,"props":1061,"children":1062},{},[1063],{"type":47,"value":1064},"Act on what it reports:",{"type":42,"tag":63,"props":1066,"children":1067},{},[1068,1073,1094],{"type":42,"tag":67,"props":1069,"children":1070},{},[1071],{"type":47,"value":1072},"Skills installed and up to date — continue; nothing to do.",{"type":42,"tag":67,"props":1074,"children":1075},{},[1076,1078,1084,1086,1092],{"type":47,"value":1077},"An update is available (",{"type":42,"tag":99,"props":1079,"children":1081},{"className":1080},[],[1082],{"type":47,"value":1083},"rev \u003Ca> → \u003Cb> available",{"type":47,"value":1085},") — run ",{"type":42,"tag":99,"props":1087,"children":1089},{"className":1088},[],[1090],{"type":47,"value":1091},"railway skills update",{"type":47,"value":1093},", then tell the user to restart their coding tool so the updated skills load. This session keeps running on the old skill revision until restart: finish the current request, and if this skill's guidance disagrees with the updated CLI's own output, trust the CLI.",{"type":42,"tag":67,"props":1095,"children":1096},{},[1097,1099,1105,1107,1113],{"type":47,"value":1098},"Skills or MCP server missing (",{"type":42,"tag":99,"props":1100,"children":1102},{"className":1101},[],[1103],{"type":47,"value":1104},"✗",{"type":47,"value":1106}," lines) — run ",{"type":42,"tag":99,"props":1108,"children":1110},{"className":1109},[],[1111],{"type":47,"value":1112},"railway setup agent -y",{"type":47,"value":1114},", then tell the user to restart their coding tool.",{"type":42,"tag":57,"props":1116,"children":1117},{},[1118],{"type":47,"value":1119},"Check once per session and don't re-run it after acting; the restart prompt to the user is the resolution, not another check.",{"type":42,"tag":57,"props":1121,"children":1122},{},[1123],{"type":47,"value":1124},"When Railway MCP is available and the job is a platform-state read, use the matching MCP read instead of shelling out. If using the CLI path, run the CLI checks above.",{"type":42,"tag":57,"props":1126,"children":1127},{},[1128,1130,1136,1138,1144,1146,1152],{"type":47,"value":1129},"For Railway CLI calls made while this skill is active, prefix the command with ",{"type":42,"tag":99,"props":1131,"children":1133},{"className":1132},[],[1134],{"type":47,"value":1135},"RAILWAY_CALLER=skill:use-railway@1.3.6",{"type":47,"value":1137}," and a stable ",{"type":42,"tag":99,"props":1139,"children":1141},{"className":1140},[],[1142],{"type":47,"value":1143},"RAILWAY_AGENT_SESSION",{"type":47,"value":1145}," reused for the current user request. Generate the session id once per user request, then reuse that exact value for later Railway CLI calls in the same workflow. Do not run a separate ",{"type":42,"tag":99,"props":1147,"children":1149},{"className":1148},[],[1150],{"type":47,"value":1151},"export",{"type":47,"value":1153}," preflight solely for telemetry; inline env prefixes keep the shell output concise and avoid leaking setup steps into every response.",{"type":42,"tag":57,"props":1155,"children":1156},{},[1157],{"type":42,"tag":71,"props":1158,"children":1159},{},[1160],{"type":47,"value":1161},"Context resolution - URL IDs always win:",{"type":42,"tag":63,"props":1163,"children":1164},{},[1165,1177,1189],{"type":42,"tag":67,"props":1166,"children":1167},{},[1168,1170,1175],{"type":47,"value":1169},"If the user provides a Railway URL, extract IDs from it. Do NOT run ",{"type":42,"tag":99,"props":1171,"children":1173},{"className":1172},[],[1174],{"type":47,"value":154},{"type":47,"value":1176},"; it returns the locally linked project, which is usually unrelated.",{"type":42,"tag":67,"props":1178,"children":1179},{},[1180,1182,1187],{"type":47,"value":1181},"If no URL is given, fall back to ",{"type":42,"tag":99,"props":1183,"children":1185},{"className":1184},[],[1186],{"type":47,"value":154},{"type":47,"value":1188}," for the linked project\u002Fenvironment\u002Fservice.",{"type":42,"tag":67,"props":1190,"children":1191},{},[1192,1194,1199],{"type":47,"value":1193},"When using MCP tools after resolving local context with ",{"type":42,"tag":99,"props":1195,"children":1197},{"className":1196},[],[1198],{"type":47,"value":154},{"type":47,"value":1200},", pass the resolved project, environment, and service IDs explicitly. Do not rely on MCP implicit linked context; MCP may not share the CLI's current working directory link.",{"type":42,"tag":57,"props":1202,"children":1203},{},[1204],{"type":47,"value":1205},"If the CLI is missing, guide the user to install it.",{"type":42,"tag":303,"props":1207,"children":1209},{"className":345,"code":1208,"language":347,"meta":311,"style":311},"curl -fsSL agents.railway.com | sh # Install CLI and configure detected agents\nbash \u003C(curl -fsSL https:\u002F\u002Frailway.com\u002Finstall.sh) --agents -y # Install CLI and configure detected agents\nbash \u003C(curl -fsSL https:\u002F\u002Frailway.com\u002Finstall.sh) # Shell script (macOS, Linux, Windows via WSL)\nnpm i -g @railway\u002Fcli # npm (macOS, Linux, Windows). Requires Node.js version 16 or higher.\nbrew install railway # Homebrew (macOS)\n",[1210],{"type":42,"tag":99,"props":1211,"children":1212},{"__ignoreMap":311},[1213,1245,1284,1312,1340],{"type":42,"tag":353,"props":1214,"children":1215},{"class":355,"line":356},[1216,1221,1226,1231,1235,1240],{"type":42,"tag":353,"props":1217,"children":1218},{"style":360},[1219],{"type":47,"value":1220},"curl",{"type":42,"tag":353,"props":1222,"children":1223},{"style":381},[1224],{"type":47,"value":1225}," -fsSL",{"type":42,"tag":353,"props":1227,"children":1228},{"style":381},[1229],{"type":47,"value":1230}," agents.railway.com",{"type":42,"tag":353,"props":1232,"children":1233},{"style":375},[1234],{"type":47,"value":1035},{"type":42,"tag":353,"props":1236,"children":1237},{"style":360},[1238],{"type":47,"value":1239}," sh",{"type":42,"tag":353,"props":1241,"children":1242},{"style":837},[1243],{"type":47,"value":1244}," # Install CLI and configure detected agents\n",{"type":42,"tag":353,"props":1246,"children":1247},{"class":355,"line":371},[1248,1252,1257,1261,1266,1270,1275,1280],{"type":42,"tag":353,"props":1249,"children":1250},{"style":360},[1251],{"type":47,"value":347},{"type":42,"tag":353,"props":1253,"children":1254},{"style":375},[1255],{"type":47,"value":1256}," \u003C(",{"type":42,"tag":353,"props":1258,"children":1259},{"style":360},[1260],{"type":47,"value":1220},{"type":42,"tag":353,"props":1262,"children":1263},{"style":381},[1264],{"type":47,"value":1265}," -fsSL https:\u002F\u002Frailway.com\u002Finstall.sh",{"type":42,"tag":353,"props":1267,"children":1268},{"style":375},[1269],{"type":47,"value":905},{"type":42,"tag":353,"props":1271,"children":1272},{"style":381},[1273],{"type":47,"value":1274}," --agents",{"type":42,"tag":353,"props":1276,"children":1277},{"style":381},[1278],{"type":47,"value":1279}," -y",{"type":42,"tag":353,"props":1281,"children":1282},{"style":837},[1283],{"type":47,"value":1244},{"type":42,"tag":353,"props":1285,"children":1286},{"class":355,"line":387},[1287,1291,1295,1299,1303,1307],{"type":42,"tag":353,"props":1288,"children":1289},{"style":360},[1290],{"type":47,"value":347},{"type":42,"tag":353,"props":1292,"children":1293},{"style":375},[1294],{"type":47,"value":1256},{"type":42,"tag":353,"props":1296,"children":1297},{"style":360},[1298],{"type":47,"value":1220},{"type":42,"tag":353,"props":1300,"children":1301},{"style":381},[1302],{"type":47,"value":1265},{"type":42,"tag":353,"props":1304,"children":1305},{"style":375},[1306],{"type":47,"value":905},{"type":42,"tag":353,"props":1308,"children":1309},{"style":837},[1310],{"type":47,"value":1311}," # Shell script (macOS, Linux, Windows via WSL)\n",{"type":42,"tag":353,"props":1313,"children":1314},{"class":355,"line":396},[1315,1320,1325,1330,1335],{"type":42,"tag":353,"props":1316,"children":1317},{"style":360},[1318],{"type":47,"value":1319},"npm",{"type":42,"tag":353,"props":1321,"children":1322},{"style":381},[1323],{"type":47,"value":1324}," i",{"type":42,"tag":353,"props":1326,"children":1327},{"style":381},[1328],{"type":47,"value":1329}," -g",{"type":42,"tag":353,"props":1331,"children":1332},{"style":381},[1333],{"type":47,"value":1334}," @railway\u002Fcli",{"type":42,"tag":353,"props":1336,"children":1337},{"style":837},[1338],{"type":47,"value":1339}," # npm (macOS, Linux, Windows). Requires Node.js version 16 or higher.\n",{"type":42,"tag":353,"props":1341,"children":1342},{"class":355,"line":405},[1343,1348,1353,1357],{"type":42,"tag":353,"props":1344,"children":1345},{"style":360},[1346],{"type":47,"value":1347},"brew",{"type":42,"tag":353,"props":1349,"children":1350},{"style":381},[1351],{"type":47,"value":1352}," install",{"type":42,"tag":353,"props":1354,"children":1355},{"style":381},[1356],{"type":47,"value":834},{"type":42,"tag":353,"props":1358,"children":1359},{"style":837},[1360],{"type":47,"value":1361}," # Homebrew (macOS)\n",{"type":42,"tag":57,"props":1363,"children":1364},{},[1365,1367,1371,1373,1378,1380,1385,1387,1393],{"type":47,"value":1366},"If not authenticated, see ",{"type":42,"tag":625,"props":1368,"children":1369},{"href":627},[1370],{"type":47,"value":985},{"type":47,"value":1372}," below — the CLI offers unauthed ",{"type":42,"tag":99,"props":1374,"children":1376},{"className":1375},[],[1377],{"type":47,"value":215},{"type":47,"value":1379}," (deploy + sign up\u002Fin in one shot) or ",{"type":42,"tag":99,"props":1381,"children":1383},{"className":1382},[],[1384],{"type":47,"value":614},{"type":47,"value":1386}," (sign up\u002Fin only; new accounts created on the fly). If not linked and no URL was provided, run ",{"type":42,"tag":99,"props":1388,"children":1390},{"className":1389},[],[1391],{"type":47,"value":1392},"railway link --project \u003Cid-or-name>",{"type":47,"value":459},{"type":42,"tag":57,"props":1395,"children":1396},{},[1397,1399,1405],{"type":47,"value":1398},"If a command is not recognized (for example, ",{"type":42,"tag":99,"props":1400,"children":1402},{"className":1401},[],[1403],{"type":47,"value":1404},"railway environment edit",{"type":47,"value":1406},"), the CLI may be outdated. Upgrade with:",{"type":42,"tag":303,"props":1408,"children":1410},{"className":345,"code":1409,"language":347,"meta":311,"style":311},"railway upgrade\n",[1411],{"type":42,"tag":99,"props":1412,"children":1413},{"__ignoreMap":311},[1414],{"type":42,"tag":353,"props":1415,"children":1416},{"class":355,"line":356},[1417,1421],{"type":42,"tag":353,"props":1418,"children":1419},{"style":360},[1420],{"type":47,"value":8},{"type":42,"tag":353,"props":1422,"children":1423},{"style":381},[1424],{"type":47,"value":1425}," upgrade\n",{"type":42,"tag":50,"props":1427,"children":1429},{"id":1428},"account-creation-sign-in",[1430],{"type":47,"value":985},{"type":42,"tag":57,"props":1432,"children":1433},{},[1434],{"type":47,"value":1435},"Railway uses a single unified OAuth flow for both sign-in and sign-up. The backend detects fresh accounts from durable compliance state (a CLI client that hasn't accepted ToS \u002F Fair Use yet) and adapts the consent screen and post-auth landing page — new users land on a \"Welcome to Railway!\" page, existing users see the standard confirmation. The CLI does not declare signup intent up front.",{"type":42,"tag":57,"props":1437,"children":1438},{},[1439],{"type":47,"value":1440},"Two commands surface this flow, depending on intent:",{"type":42,"tag":1442,"props":1443,"children":1444},"table",{},[1445,1464],{"type":42,"tag":1446,"props":1447,"children":1448},"thead",{},[1449],{"type":42,"tag":1450,"props":1451,"children":1452},"tr",{},[1453,1459],{"type":42,"tag":1454,"props":1455,"children":1456},"th",{},[1457],{"type":47,"value":1458},"Command",{"type":42,"tag":1454,"props":1460,"children":1461},{},[1462],{"type":47,"value":1463},"When to use",{"type":42,"tag":1465,"props":1466,"children":1467},"tbody",{},[1468,1500],{"type":42,"tag":1450,"props":1469,"children":1470},{},[1471,1480],{"type":42,"tag":1472,"props":1473,"children":1474},"td",{},[1475],{"type":42,"tag":99,"props":1476,"children":1478},{"className":1477},[],[1479],{"type":47,"value":215},{"type":42,"tag":1472,"props":1481,"children":1482},{},[1483,1485,1491,1493,1498],{"type":47,"value":1484},"Agent-friendly onboarding from the current directory. Unauthenticated → opens the browser (or device-code) to sign in \u002F sign up. With no linked project, a detected agent harness (or ",{"type":42,"tag":99,"props":1486,"children":1488},{"className":1487},[],[1489],{"type":47,"value":1490},"-y",{"type":47,"value":1492},") auto-creates a project + service and deploys; an interactive human is offered create \u002F link-existing \u002F cancel. Add ",{"type":42,"tag":99,"props":1494,"children":1496},{"className":1495},[],[1497],{"type":47,"value":1490},{"type":47,"value":1499}," to skip prompts and force the create non-interactively (works even if harness detection misses).",{"type":42,"tag":1450,"props":1501,"children":1502},{},[1503,1511],{"type":42,"tag":1472,"props":1504,"children":1505},{},[1506],{"type":42,"tag":99,"props":1507,"children":1509},{"className":1508},[],[1510],{"type":47,"value":614},{"type":42,"tag":1472,"props":1512,"children":1513},{},[1514,1516,1520],{"type":47,"value":1515},"Sign in — ",{"type":42,"tag":531,"props":1517,"children":1518},{},[1519],{"type":47,"value":694},{"type":47,"value":1521}," sign up. New accounts are created on the fly through the same OAuth surface; there is no separate signup command.",{"type":42,"tag":57,"props":1523,"children":1524},{},[1525,1527,1533,1535,1540,1542,1548],{"type":47,"value":1526},"Related: ",{"type":42,"tag":99,"props":1528,"children":1530},{"className":1529},[],[1531],{"type":47,"value":1532},"railway up --new",{"type":47,"value":1534}," creates a ",{"type":42,"tag":531,"props":1536,"children":1537},{},[1538],{"type":47,"value":1539},"fresh",{"type":47,"value":1541}," project + service from the current directory and deploys it even if one is already linked (use when already signed in and the user wants a new app); ",{"type":42,"tag":99,"props":1543,"children":1545},{"className":1544},[],[1546],{"type":47,"value":1547},"--name \u003Cname>",{"type":47,"value":1549}," overrides the project name.",{"type":42,"tag":57,"props":1551,"children":1552},{},[1553],{"type":42,"tag":71,"props":1554,"children":1555},{},[1556],{"type":47,"value":1557},"Choosing the path:",{"type":42,"tag":63,"props":1559,"children":1560},{},[1561,1580,1591],{"type":42,"tag":67,"props":1562,"children":1563},{},[1564,1566,1571,1573,1578],{"type":47,"value":1565},"Deploy from cwd → run ",{"type":42,"tag":99,"props":1567,"children":1569},{"className":1568},[],[1570],{"type":47,"value":215},{"type":47,"value":1572}," (interactive) or ",{"type":42,"tag":99,"props":1574,"children":1576},{"className":1575},[],[1577],{"type":47,"value":716},{"type":47,"value":1579}," (skips the confirm prompt). Run it yourself; don't ask the user to sign in separately first.",{"type":42,"tag":67,"props":1581,"children":1582},{},[1583,1585,1590],{"type":47,"value":1584},"New project from cwd when already signed in → ",{"type":42,"tag":99,"props":1586,"children":1588},{"className":1587},[],[1589],{"type":47,"value":1532},{"type":47,"value":459},{"type":42,"tag":67,"props":1592,"children":1593},{},[1594,1604,1606,1610,1612,1618,1620,1625,1627,1632],{"type":42,"tag":71,"props":1595,"children":1596},{},[1597,1599],{"type":47,"value":1598},"Sign up with a deployable app in cwd → ",{"type":42,"tag":99,"props":1600,"children":1602},{"className":1601},[],[1603],{"type":47,"value":215},{"type":47,"value":1605}," (signs up ",{"type":42,"tag":531,"props":1607,"children":1608},{},[1609],{"type":47,"value":694},{"type":47,"value":1611}," deploys — bare ",{"type":42,"tag":99,"props":1613,"children":1615},{"className":1614},[],[1616],{"type":47,"value":1617},"up",{"type":47,"value":1619}," works for a detected agent, even if the user only said \"sign me up\"; add ",{"type":42,"tag":99,"props":1621,"children":1623},{"className":1622},[],[1624],{"type":47,"value":1490},{"type":47,"value":1626}," to skip prompts \u002F force it non-interactively). Sign in, or sign up with nothing to deploy → ",{"type":42,"tag":99,"props":1628,"children":1630},{"className":1629},[],[1631],{"type":47,"value":614},{"type":47,"value":1633}," (creates new accounts on the fly).",{"type":42,"tag":57,"props":1635,"children":1636},{},[1637],{"type":42,"tag":71,"props":1638,"children":1639},{},[1640],{"type":47,"value":1641},"Headless \u002F no browser:",{"type":42,"tag":57,"props":1643,"children":1644},{},[1645,1647,1652,1654,1660],{"type":47,"value":1646},"The CLI ",{"type":42,"tag":71,"props":1648,"children":1649},{},[1650],{"type":47,"value":1651},"auto-detects",{"type":47,"value":1653}," SSH sessions, CI, and a missing ",{"type":42,"tag":99,"props":1655,"children":1657},{"className":1656},[],[1658],{"type":47,"value":1659},"DISPLAY",{"type":47,"value":1661}," and switches to the device-code flow on its own — you almost never need to force it.",{"type":42,"tag":57,"props":1663,"children":1664},{},[1665,1678,1680,1685,1687,1692],{"type":42,"tag":71,"props":1666,"children":1667},{},[1668,1670,1676],{"type":47,"value":1669},"Do NOT pass ",{"type":42,"tag":99,"props":1671,"children":1673},{"className":1672},[],[1674],{"type":47,"value":1675},"--browserless",{"type":47,"value":1677}," just because you are an agent or your shell is non-interactive.",{"type":47,"value":1679}," If the human is at this machine (a local IDE or desktop session — the common case), bare ",{"type":42,"tag":99,"props":1681,"children":1683},{"className":1682},[],[1684],{"type":47,"value":614},{"type":47,"value":1686}," opens ",{"type":42,"tag":531,"props":1688,"children":1689},{},[1690],{"type":47,"value":1691},"their",{"type":47,"value":1693}," browser directly, which completes far more reliably than relaying a device code (~90% vs ~60% success for agent-driven sign-ins). Being a coding agent does not make the machine headless.",{"type":42,"tag":303,"props":1695,"children":1697},{"className":345,"code":1696,"language":347,"meta":311,"style":311},"railway login --browserless   # ONLY for machines with genuinely no browser\n",[1698],{"type":42,"tag":99,"props":1699,"children":1700},{"__ignoreMap":311},[1701],{"type":42,"tag":353,"props":1702,"children":1703},{"class":355,"line":356},[1704,1708,1713,1718],{"type":42,"tag":353,"props":1705,"children":1706},{"style":360},[1707],{"type":47,"value":8},{"type":42,"tag":353,"props":1709,"children":1710},{"style":381},[1711],{"type":47,"value":1712}," login",{"type":42,"tag":353,"props":1714,"children":1715},{"style":381},[1716],{"type":47,"value":1717}," --browserless",{"type":42,"tag":353,"props":1719,"children":1720},{"style":837},[1721],{"type":47,"value":1722},"   # ONLY for machines with genuinely no browser\n",{"type":42,"tag":57,"props":1724,"children":1725},{},[1726],{"type":47,"value":1727},"Forces the device-code flow (RFC 8628): prints a sign-in link and a short code for the user to open on any device. Reserve it for machines where no browser exists — SSH boxes, containers, remote VMs the auto-detection missed. When you do end up in a device-code flow, follow the relay procedure below: surface the sign-in link to the user the moment it prints.",{"type":42,"tag":57,"props":1729,"children":1730},{},[1731,1736,1738,1743],{"type":42,"tag":71,"props":1732,"children":1733},{},[1734],{"type":47,"value":1735},"Agent harness, human present",{"type":47,"value":1737},": when the CLI detects an agent harness (Claude Code, Cursor, Codex, …) with a human at the keyboard, ",{"type":42,"tag":99,"props":1739,"children":1741},{"className":1740},[],[1742],{"type":47,"value":215},{"type":47,"value":1744}," opens the browser and skips the confirm prompt — the agent invocation is treated as consent. A real human still has to complete OAuth in the browser.",{"type":42,"tag":57,"props":1746,"children":1747},{},[1748],{"type":42,"tag":71,"props":1749,"children":1750},{},[1751],{"type":47,"value":1752},"Device-code sign-in: relay the link immediately (CRITICAL):",{"type":42,"tag":57,"props":1754,"children":1755},{},[1756,1758,1763,1765,1770,1771,1776,1778,1783,1785,1790],{"type":47,"value":1757},"When the CLI can't open a browser (sandboxed shell, container, SSH, no ",{"type":42,"tag":99,"props":1759,"children":1761},{"className":1760},[],[1762],{"type":47,"value":1659},{"type":47,"value":1764},"), unauthed ",{"type":42,"tag":99,"props":1766,"children":1768},{"className":1767},[],[1769],{"type":47,"value":215},{"type":47,"value":326},{"type":42,"tag":99,"props":1772,"children":1774},{"className":1773},[],[1775],{"type":47,"value":614},{"type":47,"value":1777}," print a sign-in URL + short code and then ",{"type":42,"tag":71,"props":1779,"children":1780},{},[1781],{"type":47,"value":1782},"block, polling for up to 10 minutes",{"type":47,"value":1784}," while the user completes sign-in. The code expires after 10 minutes. If you run this as a normal foreground command, your harness buffers the output until the command exits — ",{"type":42,"tag":71,"props":1786,"children":1787},{},[1788],{"type":47,"value":1789},"the user never sees the link until the code is already dead",{"type":47,"value":1791},". This is the #1 cause of failed agent-driven signups. Handle it like this:",{"type":42,"tag":1793,"props":1794,"children":1795},"ol",{},[1796,1870,1915],{"type":42,"tag":67,"props":1797,"children":1798},{},[1799,1804,1806,1812,1814,1820,1822],{"type":42,"tag":71,"props":1800,"children":1801},{},[1802],{"type":47,"value":1803},"Preferred — background execution",{"type":47,"value":1805}," (e.g. Claude Code: ",{"type":42,"tag":99,"props":1807,"children":1809},{"className":1808},[],[1810],{"type":47,"value":1811},"run_in_background",{"type":47,"value":1813},", then poll with ",{"type":42,"tag":99,"props":1815,"children":1817},{"className":1816},[],[1818],{"type":47,"value":1819},"BashOutput",{"type":47,"value":1821},"):\n",{"type":42,"tag":63,"props":1823,"children":1824},{},[1825,1830,1865],{"type":42,"tag":67,"props":1826,"children":1827},{},[1828],{"type":47,"value":1829},"Start the command in the background.",{"type":42,"tag":67,"props":1831,"children":1832},{},[1833,1835,1841,1843,1849,1850,1856,1858,1863],{"type":47,"value":1834},"Poll its output. The instant a sign-in block appears (",{"type":42,"tag":99,"props":1836,"children":1838},{"className":1837},[],[1839],{"type":47,"value":1840},"Sign in with one click: \u003Curl>",{"type":47,"value":1842}," on newer CLIs, or ",{"type":42,"tag":99,"props":1844,"children":1846},{"className":1845},[],[1847],{"type":47,"value":1848},"Sign in at: \u003Curl>",{"type":47,"value":563},{"type":42,"tag":99,"props":1851,"children":1853},{"className":1852},[],[1854],{"type":47,"value":1855},"Enter this code: \u003Ccode>",{"type":47,"value":1857}," on older ones), ",{"type":42,"tag":71,"props":1859,"children":1860},{},[1861],{"type":47,"value":1862},"stop everything and relay it to the user verbatim",{"type":47,"value":1864}," — do not summarize, shorten, or defer it. Prefer the one-click URL when present; otherwise relay the URL and code together. Tell the user to open the link now.",{"type":42,"tag":67,"props":1866,"children":1867},{},[1868],{"type":47,"value":1869},"Leave the command running and keep polling. When the user completes sign-in, the same process picks up the session and continues into the deploy on its own. Then verify per the deploy rules below.",{"type":42,"tag":67,"props":1871,"children":1872},{},[1873,1878],{"type":42,"tag":71,"props":1874,"children":1875},{},[1876],{"type":47,"value":1877},"No background support — set expectations, use the longest timeout:",{"type":42,"tag":63,"props":1879,"children":1880},{},[1881,1891,1896],{"type":42,"tag":67,"props":1882,"children":1883},{},[1884,1886],{"type":47,"value":1885},"Before running, tell the user: ",{"type":42,"tag":531,"props":1887,"children":1888},{},[1889],{"type":47,"value":1890},"\"This will print a sign-in link — I'll show it to you the moment I have it. Please complete it promptly; the code expires in 10 minutes.\"",{"type":42,"tag":67,"props":1892,"children":1893},{},[1894],{"type":47,"value":1895},"Run with the longest timeout your harness allows.",{"type":42,"tag":67,"props":1897,"children":1898},{},[1899,1901,1906,1908,1913],{"type":47,"value":1900},"If the command times out or is killed before sign-in completed, the printed code is ",{"type":42,"tag":71,"props":1902,"children":1903},{},[1904],{"type":47,"value":1905},"no longer being monitored",{"type":47,"value":1907}," — a late click does nothing. Relay whatever link appeared anyway for context, then immediately re-run the command and relay the ",{"type":42,"tag":71,"props":1909,"children":1910},{},[1911],{"type":47,"value":1912},"new",{"type":47,"value":1914}," link, telling the user to always use the newest one.",{"type":42,"tag":67,"props":1916,"children":1917},{},[1918,1923],{"type":42,"tag":71,"props":1919,"children":1920},{},[1921],{"type":47,"value":1922},"Never",{"type":47,"value":1924}," wait silently for the command to finish before showing the link, and never report the sign-in as failed without first relaying the link and giving the user a chance to act.",{"type":42,"tag":57,"props":1926,"children":1927},{},[1928],{"type":47,"value":1929},"The browser transport needs none of this — the CLI opens the browser on the user's machine itself.",{"type":42,"tag":57,"props":1931,"children":1932},{},[1933,1938,1939,1945,1946,1952,1954,1960],{"type":42,"tag":71,"props":1934,"children":1935},{},[1936],{"type":47,"value":1937},"JSON \u002F CI modes do not auto-prompt",{"type":47,"value":960},{"type":42,"tag":99,"props":1940,"children":1942},{"className":1941},[],[1943],{"type":47,"value":1944},"railway up --json",{"type":47,"value":326},{"type":42,"tag":99,"props":1947,"children":1949},{"className":1948},[],[1950],{"type":47,"value":1951},"railway up --ci",{"type":47,"value":1953}," will NOT open a browser for an unauthed user. ",{"type":42,"tag":99,"props":1955,"children":1957},{"className":1956},[],[1958],{"type":47,"value":1959},"--json",{"type":47,"value":1961}," emits a structured error instead:",{"type":42,"tag":303,"props":1963,"children":1967},{"className":1964,"code":1965,"language":1966,"meta":311,"style":311},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\"error\":\"Not signed in.\",\"code\":\"NOT_AUTHENTICATED\",\"hint\":\"Run `railway login` to authenticate, then re-run.\"}\n","json",[1968],{"type":42,"tag":99,"props":1969,"children":1970},{"__ignoreMap":311},[1971],{"type":42,"tag":353,"props":1972,"children":1973},{"class":355,"line":356},[1974,1979,1983,1989,1993,1998,2002,2007,2011,2016,2020,2024,2028,2032,2036,2041,2045,2049,2053,2058,2062,2066,2070,2075,2079],{"type":42,"tag":353,"props":1975,"children":1976},{"style":375},[1977],{"type":47,"value":1978},"{",{"type":42,"tag":353,"props":1980,"children":1981},{"style":375},[1982],{"type":47,"value":858},{"type":42,"tag":353,"props":1984,"children":1986},{"style":1985},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1987],{"type":47,"value":1988},"error",{"type":42,"tag":353,"props":1990,"children":1991},{"style":375},[1992],{"type":47,"value":858},{"type":42,"tag":353,"props":1994,"children":1995},{"style":375},[1996],{"type":47,"value":1997},":",{"type":42,"tag":353,"props":1999,"children":2000},{"style":375},[2001],{"type":47,"value":858},{"type":42,"tag":353,"props":2003,"children":2004},{"style":381},[2005],{"type":47,"value":2006},"Not signed in.",{"type":42,"tag":353,"props":2008,"children":2009},{"style":375},[2010],{"type":47,"value":858},{"type":42,"tag":353,"props":2012,"children":2013},{"style":375},[2014],{"type":47,"value":2015},",",{"type":42,"tag":353,"props":2017,"children":2018},{"style":375},[2019],{"type":47,"value":858},{"type":42,"tag":353,"props":2021,"children":2022},{"style":1985},[2023],{"type":47,"value":99},{"type":42,"tag":353,"props":2025,"children":2026},{"style":375},[2027],{"type":47,"value":858},{"type":42,"tag":353,"props":2029,"children":2030},{"style":375},[2031],{"type":47,"value":1997},{"type":42,"tag":353,"props":2033,"children":2034},{"style":375},[2035],{"type":47,"value":858},{"type":42,"tag":353,"props":2037,"children":2038},{"style":381},[2039],{"type":47,"value":2040},"NOT_AUTHENTICATED",{"type":42,"tag":353,"props":2042,"children":2043},{"style":375},[2044],{"type":47,"value":858},{"type":42,"tag":353,"props":2046,"children":2047},{"style":375},[2048],{"type":47,"value":2015},{"type":42,"tag":353,"props":2050,"children":2051},{"style":375},[2052],{"type":47,"value":858},{"type":42,"tag":353,"props":2054,"children":2055},{"style":1985},[2056],{"type":47,"value":2057},"hint",{"type":42,"tag":353,"props":2059,"children":2060},{"style":375},[2061],{"type":47,"value":858},{"type":42,"tag":353,"props":2063,"children":2064},{"style":375},[2065],{"type":47,"value":1997},{"type":42,"tag":353,"props":2067,"children":2068},{"style":375},[2069],{"type":47,"value":858},{"type":42,"tag":353,"props":2071,"children":2072},{"style":381},[2073],{"type":47,"value":2074},"Run `railway login` to authenticate, then re-run.",{"type":42,"tag":353,"props":2076,"children":2077},{"style":375},[2078],{"type":47,"value":858},{"type":42,"tag":353,"props":2080,"children":2081},{"style":375},[2082],{"type":47,"value":2083},"}\n",{"type":42,"tag":57,"props":2085,"children":2086},{},[2087,2089,2095,2097,2102],{"type":47,"value":2088},"When you see ",{"type":42,"tag":99,"props":2090,"children":2092},{"className":2091},[],[2093],{"type":47,"value":2094},"code: NOT_AUTHENTICATED",{"type":47,"value":2096},", authenticate the user with ",{"type":42,"tag":99,"props":2098,"children":2100},{"className":2099},[],[2101],{"type":47,"value":614},{"type":47,"value":2103},", then retry the original command.",{"type":42,"tag":57,"props":2105,"children":2106},{},[2107,2112,2114,2120,2122,2128],{"type":42,"tag":71,"props":2108,"children":2109},{},[2110],{"type":47,"value":2111},"Fully unattended (no human at all)",{"type":47,"value":2113},": set ",{"type":42,"tag":99,"props":2115,"children":2117},{"className":2116},[],[2118],{"type":47,"value":2119},"RAILWAY_API_TOKEN",{"type":47,"value":2121}," (account-scoped) or ",{"type":42,"tag":99,"props":2123,"children":2125},{"className":2124},[],[2126],{"type":47,"value":2127},"RAILWAY_TOKEN",{"type":47,"value":2129}," (project-scoped) instead of running an interactive login. A brand-new user with no token and no human present cannot complete signup — there is no headless account-creation path.",{"type":42,"tag":50,"props":2131,"children":2133},{"id":2132},"agent-tooling",[2134],{"type":47,"value":2135},"Agent tooling",{"type":42,"tag":57,"props":2137,"children":2138},{},[2139,2141,2147],{"type":47,"value":2140},"Use direct Railway CLI commands for deterministic operations. Use ",{"type":42,"tag":99,"props":2142,"children":2144},{"className":2143},[],[2145],{"type":47,"value":2146},"railway agent",{"type":47,"value":2148}," only when the user explicitly asks for Railway Agent, wants a natural-language investigation, or the task is broader than a single resource operation.",{"type":42,"tag":57,"props":2150,"children":2151},{},[2152],{"type":47,"value":2153},"Set up Railway skills, MCP, and authentication with:",{"type":42,"tag":303,"props":2155,"children":2157},{"className":345,"code":2156,"language":347,"meta":311,"style":311},"railway setup agent\nrailway setup agent -y\nrailway setup agent --remote\n",[2158],{"type":42,"tag":99,"props":2159,"children":2160},{"__ignoreMap":311},[2161,2178,2199],{"type":42,"tag":353,"props":2162,"children":2163},{"class":355,"line":356},[2164,2168,2173],{"type":42,"tag":353,"props":2165,"children":2166},{"style":360},[2167],{"type":47,"value":8},{"type":42,"tag":353,"props":2169,"children":2170},{"style":381},[2171],{"type":47,"value":2172}," setup",{"type":42,"tag":353,"props":2174,"children":2175},{"style":381},[2176],{"type":47,"value":2177}," agent\n",{"type":42,"tag":353,"props":2179,"children":2180},{"class":355,"line":371},[2181,2185,2189,2194],{"type":42,"tag":353,"props":2182,"children":2183},{"style":360},[2184],{"type":47,"value":8},{"type":42,"tag":353,"props":2186,"children":2187},{"style":381},[2188],{"type":47,"value":2172},{"type":42,"tag":353,"props":2190,"children":2191},{"style":381},[2192],{"type":47,"value":2193}," agent",{"type":42,"tag":353,"props":2195,"children":2196},{"style":381},[2197],{"type":47,"value":2198}," -y\n",{"type":42,"tag":353,"props":2200,"children":2201},{"class":355,"line":387},[2202,2206,2210,2214],{"type":42,"tag":353,"props":2203,"children":2204},{"style":360},[2205],{"type":47,"value":8},{"type":42,"tag":353,"props":2207,"children":2208},{"style":381},[2209],{"type":47,"value":2172},{"type":42,"tag":353,"props":2211,"children":2212},{"style":381},[2213],{"type":47,"value":2193},{"type":42,"tag":353,"props":2215,"children":2216},{"style":381},[2217],{"type":47,"value":2218}," --remote\n",{"type":42,"tag":57,"props":2220,"children":2221},{},[2222,2227,2229,2234],{"type":42,"tag":99,"props":2223,"children":2225},{"className":2224},[],[2226],{"type":47,"value":1112},{"type":47,"value":2228}," skips the interactive login flow. If the user isn't authenticated after setup, run ",{"type":42,"tag":99,"props":2230,"children":2232},{"className":2231},[],[2233],{"type":47,"value":614},{"type":47,"value":459},{"type":42,"tag":57,"props":2236,"children":2237},{},[2238],{"type":47,"value":2239},"Install or update MCP and skills directly when the user names a target tool:",{"type":42,"tag":303,"props":2241,"children":2243},{"className":345,"code":2242,"language":347,"meta":311,"style":311},"railway mcp install --remote\nrailway mcp install --agent codex --remote\nrailway mcp install --agent cursor --remote\nrailway skills\nrailway skills update --agent codex\nrailway skills remove --agent cursor\n",[2244],{"type":42,"tag":99,"props":2245,"children":2246},{"__ignoreMap":311},[2247,2267,2296,2324,2336,2362],{"type":42,"tag":353,"props":2248,"children":2249},{"class":355,"line":356},[2250,2254,2259,2263],{"type":42,"tag":353,"props":2251,"children":2252},{"style":360},[2253],{"type":47,"value":8},{"type":42,"tag":353,"props":2255,"children":2256},{"style":381},[2257],{"type":47,"value":2258}," mcp",{"type":42,"tag":353,"props":2260,"children":2261},{"style":381},[2262],{"type":47,"value":1352},{"type":42,"tag":353,"props":2264,"children":2265},{"style":381},[2266],{"type":47,"value":2218},{"type":42,"tag":353,"props":2268,"children":2269},{"class":355,"line":371},[2270,2274,2278,2282,2287,2292],{"type":42,"tag":353,"props":2271,"children":2272},{"style":360},[2273],{"type":47,"value":8},{"type":42,"tag":353,"props":2275,"children":2276},{"style":381},[2277],{"type":47,"value":2258},{"type":42,"tag":353,"props":2279,"children":2280},{"style":381},[2281],{"type":47,"value":1352},{"type":42,"tag":353,"props":2283,"children":2284},{"style":381},[2285],{"type":47,"value":2286}," --agent",{"type":42,"tag":353,"props":2288,"children":2289},{"style":381},[2290],{"type":47,"value":2291}," codex",{"type":42,"tag":353,"props":2293,"children":2294},{"style":381},[2295],{"type":47,"value":2218},{"type":42,"tag":353,"props":2297,"children":2298},{"class":355,"line":387},[2299,2303,2307,2311,2315,2320],{"type":42,"tag":353,"props":2300,"children":2301},{"style":360},[2302],{"type":47,"value":8},{"type":42,"tag":353,"props":2304,"children":2305},{"style":381},[2306],{"type":47,"value":2258},{"type":42,"tag":353,"props":2308,"children":2309},{"style":381},[2310],{"type":47,"value":1352},{"type":42,"tag":353,"props":2312,"children":2313},{"style":381},[2314],{"type":47,"value":2286},{"type":42,"tag":353,"props":2316,"children":2317},{"style":381},[2318],{"type":47,"value":2319}," cursor",{"type":42,"tag":353,"props":2321,"children":2322},{"style":381},[2323],{"type":47,"value":2218},{"type":42,"tag":353,"props":2325,"children":2326},{"class":355,"line":396},[2327,2331],{"type":42,"tag":353,"props":2328,"children":2329},{"style":360},[2330],{"type":47,"value":8},{"type":42,"tag":353,"props":2332,"children":2333},{"style":381},[2334],{"type":47,"value":2335}," skills\n",{"type":42,"tag":353,"props":2337,"children":2338},{"class":355,"line":405},[2339,2343,2348,2353,2357],{"type":42,"tag":353,"props":2340,"children":2341},{"style":360},[2342],{"type":47,"value":8},{"type":42,"tag":353,"props":2344,"children":2345},{"style":381},[2346],{"type":47,"value":2347}," skills",{"type":42,"tag":353,"props":2349,"children":2350},{"style":381},[2351],{"type":47,"value":2352}," update",{"type":42,"tag":353,"props":2354,"children":2355},{"style":381},[2356],{"type":47,"value":2286},{"type":42,"tag":353,"props":2358,"children":2359},{"style":381},[2360],{"type":47,"value":2361}," codex\n",{"type":42,"tag":353,"props":2363,"children":2364},{"class":355,"line":414},[2365,2369,2373,2378,2382],{"type":42,"tag":353,"props":2366,"children":2367},{"style":360},[2368],{"type":47,"value":8},{"type":42,"tag":353,"props":2370,"children":2371},{"style":381},[2372],{"type":47,"value":2347},{"type":42,"tag":353,"props":2374,"children":2375},{"style":381},[2376],{"type":47,"value":2377}," remove",{"type":42,"tag":353,"props":2379,"children":2380},{"style":381},[2381],{"type":47,"value":2286},{"type":42,"tag":353,"props":2383,"children":2384},{"style":381},[2385],{"type":47,"value":2386}," cursor\n",{"type":42,"tag":57,"props":2388,"children":2389},{},[2390,2392,2398,2399,2405,2406,2412,2413,2419,2420,2426,2428,2434,2436,2442,2444,2449,2451,2456],{"type":47,"value":2391},"Supported targets include ",{"type":42,"tag":99,"props":2393,"children":2395},{"className":2394},[],[2396],{"type":47,"value":2397},"claude-code",{"type":47,"value":106},{"type":42,"tag":99,"props":2400,"children":2402},{"className":2401},[],[2403],{"type":47,"value":2404},"cursor",{"type":47,"value":106},{"type":42,"tag":99,"props":2407,"children":2409},{"className":2408},[],[2410],{"type":47,"value":2411},"codex",{"type":47,"value":106},{"type":42,"tag":99,"props":2414,"children":2416},{"className":2415},[],[2417],{"type":47,"value":2418},"opencode",{"type":47,"value":106},{"type":42,"tag":99,"props":2421,"children":2423},{"className":2422},[],[2424],{"type":47,"value":2425},"copilot",{"type":47,"value":2427},", and ",{"type":42,"tag":99,"props":2429,"children":2431},{"className":2430},[],[2432],{"type":47,"value":2433},"factory-droid",{"type":47,"value":2435},". The ",{"type":42,"tag":99,"props":2437,"children":2439},{"className":2438},[],[2440],{"type":47,"value":2441},"--remote",{"type":47,"value":2443}," flag configures ",{"type":42,"tag":99,"props":2445,"children":2447},{"className":2446},[],[2448],{"type":47,"value":239},{"type":47,"value":2450}," instead of a local ",{"type":42,"tag":99,"props":2452,"children":2454},{"className":2453},[],[2455],{"type":47,"value":275},{"type":47,"value":2457}," stdio server.",{"type":42,"tag":57,"props":2459,"children":2460},{},[2461],{"type":47,"value":2462},"Use Railway Agent chat with:",{"type":42,"tag":303,"props":2464,"children":2466},{"className":345,"code":2465,"language":347,"meta":311,"style":311},"railway agent\nrailway agent -p \"why is my service crashing?\"\nrailway agent -p \"summarize the deployment status\" --json\nrailway agent --list --json\nrailway agent --thread-id \u003Cthread-id>\n",[2467],{"type":42,"tag":99,"props":2468,"children":2469},{"__ignoreMap":311},[2470,2481,2510,2542,2562],{"type":42,"tag":353,"props":2471,"children":2472},{"class":355,"line":356},[2473,2477],{"type":42,"tag":353,"props":2474,"children":2475},{"style":360},[2476],{"type":47,"value":8},{"type":42,"tag":353,"props":2478,"children":2479},{"style":381},[2480],{"type":47,"value":2177},{"type":42,"tag":353,"props":2482,"children":2483},{"class":355,"line":371},[2484,2488,2492,2497,2501,2506],{"type":42,"tag":353,"props":2485,"children":2486},{"style":360},[2487],{"type":47,"value":8},{"type":42,"tag":353,"props":2489,"children":2490},{"style":381},[2491],{"type":47,"value":2193},{"type":42,"tag":353,"props":2493,"children":2494},{"style":381},[2495],{"type":47,"value":2496}," -p",{"type":42,"tag":353,"props":2498,"children":2499},{"style":375},[2500],{"type":47,"value":1050},{"type":42,"tag":353,"props":2502,"children":2503},{"style":381},[2504],{"type":47,"value":2505},"why is my service crashing?",{"type":42,"tag":353,"props":2507,"children":2508},{"style":375},[2509],{"type":47,"value":1059},{"type":42,"tag":353,"props":2511,"children":2512},{"class":355,"line":387},[2513,2517,2521,2525,2529,2534,2538],{"type":42,"tag":353,"props":2514,"children":2515},{"style":360},[2516],{"type":47,"value":8},{"type":42,"tag":353,"props":2518,"children":2519},{"style":381},[2520],{"type":47,"value":2193},{"type":42,"tag":353,"props":2522,"children":2523},{"style":381},[2524],{"type":47,"value":2496},{"type":42,"tag":353,"props":2526,"children":2527},{"style":375},[2528],{"type":47,"value":1050},{"type":42,"tag":353,"props":2530,"children":2531},{"style":381},[2532],{"type":47,"value":2533},"summarize the deployment status",{"type":42,"tag":353,"props":2535,"children":2536},{"style":375},[2537],{"type":47,"value":858},{"type":42,"tag":353,"props":2539,"children":2540},{"style":381},[2541],{"type":47,"value":933},{"type":42,"tag":353,"props":2543,"children":2544},{"class":355,"line":396},[2545,2549,2553,2558],{"type":42,"tag":353,"props":2546,"children":2547},{"style":360},[2548],{"type":47,"value":8},{"type":42,"tag":353,"props":2550,"children":2551},{"style":381},[2552],{"type":47,"value":2193},{"type":42,"tag":353,"props":2554,"children":2555},{"style":381},[2556],{"type":47,"value":2557}," --list",{"type":42,"tag":353,"props":2559,"children":2560},{"style":381},[2561],{"type":47,"value":933},{"type":42,"tag":353,"props":2563,"children":2564},{"class":355,"line":405},[2565,2569,2573,2578,2583,2588,2593],{"type":42,"tag":353,"props":2566,"children":2567},{"style":360},[2568],{"type":47,"value":8},{"type":42,"tag":353,"props":2570,"children":2571},{"style":381},[2572],{"type":47,"value":2193},{"type":42,"tag":353,"props":2574,"children":2575},{"style":381},[2576],{"type":47,"value":2577}," --thread-id",{"type":42,"tag":353,"props":2579,"children":2580},{"style":375},[2581],{"type":47,"value":2582}," \u003C",{"type":42,"tag":353,"props":2584,"children":2585},{"style":381},[2586],{"type":47,"value":2587},"thread-i",{"type":42,"tag":353,"props":2589,"children":2590},{"style":365},[2591],{"type":47,"value":2592},"d",{"type":42,"tag":353,"props":2594,"children":2595},{"style":375},[2596],{"type":47,"value":2597},">\n",{"type":42,"tag":57,"props":2599,"children":2600},{},[2601,2606,2608,2613,2615,2620,2622,2628],{"type":42,"tag":99,"props":2602,"children":2604},{"className":2603},[],[2605],{"type":47,"value":2146},{"type":47,"value":2607}," requires user OAuth authentication from ",{"type":42,"tag":99,"props":2609,"children":2611},{"className":2610},[],[2612],{"type":47,"value":614},{"type":47,"value":2614},". Project tokens (",{"type":42,"tag":99,"props":2616,"children":2618},{"className":2617},[],[2619],{"type":47,"value":2127},{"type":47,"value":2621},") are not supported for Railway Agent chat. If an agent command is unavailable, upgrade with ",{"type":42,"tag":99,"props":2623,"children":2625},{"className":2624},[],[2626],{"type":47,"value":2627},"railway upgrade --yes",{"type":47,"value":459},{"type":42,"tag":50,"props":2630,"children":2632},{"id":2631},"common-quick-operations",[2633],{"type":47,"value":2634},"Common quick operations",{"type":42,"tag":57,"props":2636,"children":2637},{},[2638],{"type":47,"value":2639},"These are frequent enough to handle without loading a reference. Use the matching MCP tool when the job is platform-scoped and the tool is available; otherwise use the CLI:",{"type":42,"tag":303,"props":2641,"children":2643},{"className":345,"code":2642,"language":347,"meta":311,"style":311},"railway status --json                                    # current context\nrailway whoami --json                                    # auth and workspace info\nrailway project list --json                              # list projects\nrailway service list --json                              # services in current environment (verify before retrying `add`)\nrailway add --database \u003Ctype> --json                     # add one database; ALWAYS pass --json\nrailway add --service \u003Cname> --json                      # add empty service; ALWAYS pass --json\nrailway variable list --service \u003Csvc> --json             # list variables\nrailway variable set KEY=value --service \u003Csvc>           # set a variable\nrailway domain list --service \u003Csvc> --json               # domains and DNS status\nrailway logs --service \u003Csvc> --lines 200 --json          # recent logs\nrailway logs --service \u003Csvc> --network --lines 200 --json # network flow snapshot\nrailway metrics --service \u003Csvc> --since 1h --json        # resource and HTTP metrics summary\nrailway up --detach -m \"\u003Csummary>\"                       # deploy current directory (returns at QUEUED — verify before reporting)\nrailway deployment list --json                           # poll newest deployment status after a detached up\nrailway bucket list --json                               # list buckets in current environment\nrailway bucket info --bucket \u003Cname> --json               # bucket storage and object count\nrailway bucket credentials --bucket \u003Cname> --json        # S3-compatible credentials\n",[2644],{"type":42,"tag":99,"props":2645,"children":2646},{"__ignoreMap":311},[2647,2669,2689,2715,2740,2785,2827,2874,2921,2967,3020,3074,3126,3167,3193,3219,3266],{"type":42,"tag":353,"props":2648,"children":2649},{"class":355,"line":356},[2650,2654,2659,2664],{"type":42,"tag":353,"props":2651,"children":2652},{"style":360},[2653],{"type":47,"value":8},{"type":42,"tag":353,"props":2655,"children":2656},{"style":381},[2657],{"type":47,"value":2658}," status",{"type":42,"tag":353,"props":2660,"children":2661},{"style":381},[2662],{"type":47,"value":2663}," --json",{"type":42,"tag":353,"props":2665,"children":2666},{"style":837},[2667],{"type":47,"value":2668},"                                    # current context\n",{"type":42,"tag":353,"props":2670,"children":2671},{"class":355,"line":371},[2672,2676,2680,2684],{"type":42,"tag":353,"props":2673,"children":2674},{"style":360},[2675],{"type":47,"value":8},{"type":42,"tag":353,"props":2677,"children":2678},{"style":381},[2679],{"type":47,"value":928},{"type":42,"tag":353,"props":2681,"children":2682},{"style":381},[2683],{"type":47,"value":2663},{"type":42,"tag":353,"props":2685,"children":2686},{"style":837},[2687],{"type":47,"value":2688},"                                    # auth and workspace info\n",{"type":42,"tag":353,"props":2690,"children":2691},{"class":355,"line":387},[2692,2696,2701,2706,2710],{"type":42,"tag":353,"props":2693,"children":2694},{"style":360},[2695],{"type":47,"value":8},{"type":42,"tag":353,"props":2697,"children":2698},{"style":381},[2699],{"type":47,"value":2700}," project",{"type":42,"tag":353,"props":2702,"children":2703},{"style":381},[2704],{"type":47,"value":2705}," list",{"type":42,"tag":353,"props":2707,"children":2708},{"style":381},[2709],{"type":47,"value":2663},{"type":42,"tag":353,"props":2711,"children":2712},{"style":837},[2713],{"type":47,"value":2714},"                              # list projects\n",{"type":42,"tag":353,"props":2716,"children":2717},{"class":355,"line":396},[2718,2722,2727,2731,2735],{"type":42,"tag":353,"props":2719,"children":2720},{"style":360},[2721],{"type":47,"value":8},{"type":42,"tag":353,"props":2723,"children":2724},{"style":381},[2725],{"type":47,"value":2726}," service",{"type":42,"tag":353,"props":2728,"children":2729},{"style":381},[2730],{"type":47,"value":2705},{"type":42,"tag":353,"props":2732,"children":2733},{"style":381},[2734],{"type":47,"value":2663},{"type":42,"tag":353,"props":2736,"children":2737},{"style":837},[2738],{"type":47,"value":2739},"                              # services in current environment (verify before retrying `add`)\n",{"type":42,"tag":353,"props":2741,"children":2742},{"class":355,"line":405},[2743,2747,2752,2757,2761,2766,2771,2776,2780],{"type":42,"tag":353,"props":2744,"children":2745},{"style":360},[2746],{"type":47,"value":8},{"type":42,"tag":353,"props":2748,"children":2749},{"style":381},[2750],{"type":47,"value":2751}," add",{"type":42,"tag":353,"props":2753,"children":2754},{"style":381},[2755],{"type":47,"value":2756}," --database",{"type":42,"tag":353,"props":2758,"children":2759},{"style":375},[2760],{"type":47,"value":2582},{"type":42,"tag":353,"props":2762,"children":2763},{"style":381},[2764],{"type":47,"value":2765},"typ",{"type":42,"tag":353,"props":2767,"children":2768},{"style":365},[2769],{"type":47,"value":2770},"e",{"type":42,"tag":353,"props":2772,"children":2773},{"style":375},[2774],{"type":47,"value":2775},">",{"type":42,"tag":353,"props":2777,"children":2778},{"style":381},[2779],{"type":47,"value":2663},{"type":42,"tag":353,"props":2781,"children":2782},{"style":837},[2783],{"type":47,"value":2784},"                     # add one database; ALWAYS pass --json\n",{"type":42,"tag":353,"props":2786,"children":2787},{"class":355,"line":414},[2788,2792,2796,2801,2805,2810,2814,2818,2822],{"type":42,"tag":353,"props":2789,"children":2790},{"style":360},[2791],{"type":47,"value":8},{"type":42,"tag":353,"props":2793,"children":2794},{"style":381},[2795],{"type":47,"value":2751},{"type":42,"tag":353,"props":2797,"children":2798},{"style":381},[2799],{"type":47,"value":2800}," --service",{"type":42,"tag":353,"props":2802,"children":2803},{"style":375},[2804],{"type":47,"value":2582},{"type":42,"tag":353,"props":2806,"children":2807},{"style":381},[2808],{"type":47,"value":2809},"nam",{"type":42,"tag":353,"props":2811,"children":2812},{"style":365},[2813],{"type":47,"value":2770},{"type":42,"tag":353,"props":2815,"children":2816},{"style":375},[2817],{"type":47,"value":2775},{"type":42,"tag":353,"props":2819,"children":2820},{"style":381},[2821],{"type":47,"value":2663},{"type":42,"tag":353,"props":2823,"children":2824},{"style":837},[2825],{"type":47,"value":2826},"                      # add empty service; ALWAYS pass --json\n",{"type":42,"tag":353,"props":2828,"children":2829},{"class":355,"line":432},[2830,2834,2839,2843,2847,2851,2856,2861,2865,2869],{"type":42,"tag":353,"props":2831,"children":2832},{"style":360},[2833],{"type":47,"value":8},{"type":42,"tag":353,"props":2835,"children":2836},{"style":381},[2837],{"type":47,"value":2838}," variable",{"type":42,"tag":353,"props":2840,"children":2841},{"style":381},[2842],{"type":47,"value":2705},{"type":42,"tag":353,"props":2844,"children":2845},{"style":381},[2846],{"type":47,"value":2800},{"type":42,"tag":353,"props":2848,"children":2849},{"style":375},[2850],{"type":47,"value":2582},{"type":42,"tag":353,"props":2852,"children":2853},{"style":381},[2854],{"type":47,"value":2855},"sv",{"type":42,"tag":353,"props":2857,"children":2858},{"style":365},[2859],{"type":47,"value":2860},"c",{"type":42,"tag":353,"props":2862,"children":2863},{"style":375},[2864],{"type":47,"value":2775},{"type":42,"tag":353,"props":2866,"children":2867},{"style":381},[2868],{"type":47,"value":2663},{"type":42,"tag":353,"props":2870,"children":2871},{"style":837},[2872],{"type":47,"value":2873},"             # list variables\n",{"type":42,"tag":353,"props":2875,"children":2877},{"class":355,"line":2876},8,[2878,2882,2886,2891,2896,2900,2904,2908,2912,2916],{"type":42,"tag":353,"props":2879,"children":2880},{"style":360},[2881],{"type":47,"value":8},{"type":42,"tag":353,"props":2883,"children":2884},{"style":381},[2885],{"type":47,"value":2838},{"type":42,"tag":353,"props":2887,"children":2888},{"style":381},[2889],{"type":47,"value":2890}," set",{"type":42,"tag":353,"props":2892,"children":2893},{"style":381},[2894],{"type":47,"value":2895}," KEY=value",{"type":42,"tag":353,"props":2897,"children":2898},{"style":381},[2899],{"type":47,"value":2800},{"type":42,"tag":353,"props":2901,"children":2902},{"style":375},[2903],{"type":47,"value":2582},{"type":42,"tag":353,"props":2905,"children":2906},{"style":381},[2907],{"type":47,"value":2855},{"type":42,"tag":353,"props":2909,"children":2910},{"style":365},[2911],{"type":47,"value":2860},{"type":42,"tag":353,"props":2913,"children":2914},{"style":375},[2915],{"type":47,"value":2775},{"type":42,"tag":353,"props":2917,"children":2918},{"style":837},[2919],{"type":47,"value":2920},"           # set a variable\n",{"type":42,"tag":353,"props":2922,"children":2924},{"class":355,"line":2923},9,[2925,2929,2934,2938,2942,2946,2950,2954,2958,2962],{"type":42,"tag":353,"props":2926,"children":2927},{"style":360},[2928],{"type":47,"value":8},{"type":42,"tag":353,"props":2930,"children":2931},{"style":381},[2932],{"type":47,"value":2933}," domain",{"type":42,"tag":353,"props":2935,"children":2936},{"style":381},[2937],{"type":47,"value":2705},{"type":42,"tag":353,"props":2939,"children":2940},{"style":381},[2941],{"type":47,"value":2800},{"type":42,"tag":353,"props":2943,"children":2944},{"style":375},[2945],{"type":47,"value":2582},{"type":42,"tag":353,"props":2947,"children":2948},{"style":381},[2949],{"type":47,"value":2855},{"type":42,"tag":353,"props":2951,"children":2952},{"style":365},[2953],{"type":47,"value":2860},{"type":42,"tag":353,"props":2955,"children":2956},{"style":375},[2957],{"type":47,"value":2775},{"type":42,"tag":353,"props":2959,"children":2960},{"style":381},[2961],{"type":47,"value":2663},{"type":42,"tag":353,"props":2963,"children":2964},{"style":837},[2965],{"type":47,"value":2966},"               # domains and DNS status\n",{"type":42,"tag":353,"props":2968,"children":2970},{"class":355,"line":2969},10,[2971,2975,2980,2984,2988,2992,2996,3000,3005,3011,3015],{"type":42,"tag":353,"props":2972,"children":2973},{"style":360},[2974],{"type":47,"value":8},{"type":42,"tag":353,"props":2976,"children":2977},{"style":381},[2978],{"type":47,"value":2979}," logs",{"type":42,"tag":353,"props":2981,"children":2982},{"style":381},[2983],{"type":47,"value":2800},{"type":42,"tag":353,"props":2985,"children":2986},{"style":375},[2987],{"type":47,"value":2582},{"type":42,"tag":353,"props":2989,"children":2990},{"style":381},[2991],{"type":47,"value":2855},{"type":42,"tag":353,"props":2993,"children":2994},{"style":365},[2995],{"type":47,"value":2860},{"type":42,"tag":353,"props":2997,"children":2998},{"style":375},[2999],{"type":47,"value":2775},{"type":42,"tag":353,"props":3001,"children":3002},{"style":381},[3003],{"type":47,"value":3004}," --lines",{"type":42,"tag":353,"props":3006,"children":3008},{"style":3007},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[3009],{"type":47,"value":3010}," 200",{"type":42,"tag":353,"props":3012,"children":3013},{"style":381},[3014],{"type":47,"value":2663},{"type":42,"tag":353,"props":3016,"children":3017},{"style":837},[3018],{"type":47,"value":3019},"          # recent logs\n",{"type":42,"tag":353,"props":3021,"children":3023},{"class":355,"line":3022},11,[3024,3028,3032,3036,3040,3044,3048,3052,3057,3061,3065,3069],{"type":42,"tag":353,"props":3025,"children":3026},{"style":360},[3027],{"type":47,"value":8},{"type":42,"tag":353,"props":3029,"children":3030},{"style":381},[3031],{"type":47,"value":2979},{"type":42,"tag":353,"props":3033,"children":3034},{"style":381},[3035],{"type":47,"value":2800},{"type":42,"tag":353,"props":3037,"children":3038},{"style":375},[3039],{"type":47,"value":2582},{"type":42,"tag":353,"props":3041,"children":3042},{"style":381},[3043],{"type":47,"value":2855},{"type":42,"tag":353,"props":3045,"children":3046},{"style":365},[3047],{"type":47,"value":2860},{"type":42,"tag":353,"props":3049,"children":3050},{"style":375},[3051],{"type":47,"value":2775},{"type":42,"tag":353,"props":3053,"children":3054},{"style":381},[3055],{"type":47,"value":3056}," --network",{"type":42,"tag":353,"props":3058,"children":3059},{"style":381},[3060],{"type":47,"value":3004},{"type":42,"tag":353,"props":3062,"children":3063},{"style":3007},[3064],{"type":47,"value":3010},{"type":42,"tag":353,"props":3066,"children":3067},{"style":381},[3068],{"type":47,"value":2663},{"type":42,"tag":353,"props":3070,"children":3071},{"style":837},[3072],{"type":47,"value":3073}," # network flow snapshot\n",{"type":42,"tag":353,"props":3075,"children":3077},{"class":355,"line":3076},12,[3078,3082,3087,3091,3095,3099,3103,3107,3112,3117,3121],{"type":42,"tag":353,"props":3079,"children":3080},{"style":360},[3081],{"type":47,"value":8},{"type":42,"tag":353,"props":3083,"children":3084},{"style":381},[3085],{"type":47,"value":3086}," metrics",{"type":42,"tag":353,"props":3088,"children":3089},{"style":381},[3090],{"type":47,"value":2800},{"type":42,"tag":353,"props":3092,"children":3093},{"style":375},[3094],{"type":47,"value":2582},{"type":42,"tag":353,"props":3096,"children":3097},{"style":381},[3098],{"type":47,"value":2855},{"type":42,"tag":353,"props":3100,"children":3101},{"style":365},[3102],{"type":47,"value":2860},{"type":42,"tag":353,"props":3104,"children":3105},{"style":375},[3106],{"type":47,"value":2775},{"type":42,"tag":353,"props":3108,"children":3109},{"style":381},[3110],{"type":47,"value":3111}," --since",{"type":42,"tag":353,"props":3113,"children":3114},{"style":381},[3115],{"type":47,"value":3116}," 1h",{"type":42,"tag":353,"props":3118,"children":3119},{"style":381},[3120],{"type":47,"value":2663},{"type":42,"tag":353,"props":3122,"children":3123},{"style":837},[3124],{"type":47,"value":3125},"        # resource and HTTP metrics summary\n",{"type":42,"tag":353,"props":3127,"children":3129},{"class":355,"line":3128},13,[3130,3134,3139,3144,3149,3153,3158,3162],{"type":42,"tag":353,"props":3131,"children":3132},{"style":360},[3133],{"type":47,"value":8},{"type":42,"tag":353,"props":3135,"children":3136},{"style":381},[3137],{"type":47,"value":3138}," up",{"type":42,"tag":353,"props":3140,"children":3141},{"style":381},[3142],{"type":47,"value":3143}," --detach",{"type":42,"tag":353,"props":3145,"children":3146},{"style":381},[3147],{"type":47,"value":3148}," -m",{"type":42,"tag":353,"props":3150,"children":3151},{"style":375},[3152],{"type":47,"value":1050},{"type":42,"tag":353,"props":3154,"children":3155},{"style":381},[3156],{"type":47,"value":3157},"\u003Csummary>",{"type":42,"tag":353,"props":3159,"children":3160},{"style":375},[3161],{"type":47,"value":858},{"type":42,"tag":353,"props":3163,"children":3164},{"style":837},[3165],{"type":47,"value":3166},"                       # deploy current directory (returns at QUEUED — verify before reporting)\n",{"type":42,"tag":353,"props":3168,"children":3170},{"class":355,"line":3169},14,[3171,3175,3180,3184,3188],{"type":42,"tag":353,"props":3172,"children":3173},{"style":360},[3174],{"type":47,"value":8},{"type":42,"tag":353,"props":3176,"children":3177},{"style":381},[3178],{"type":47,"value":3179}," deployment",{"type":42,"tag":353,"props":3181,"children":3182},{"style":381},[3183],{"type":47,"value":2705},{"type":42,"tag":353,"props":3185,"children":3186},{"style":381},[3187],{"type":47,"value":2663},{"type":42,"tag":353,"props":3189,"children":3190},{"style":837},[3191],{"type":47,"value":3192},"                           # poll newest deployment status after a detached up\n",{"type":42,"tag":353,"props":3194,"children":3196},{"class":355,"line":3195},15,[3197,3201,3206,3210,3214],{"type":42,"tag":353,"props":3198,"children":3199},{"style":360},[3200],{"type":47,"value":8},{"type":42,"tag":353,"props":3202,"children":3203},{"style":381},[3204],{"type":47,"value":3205}," bucket",{"type":42,"tag":353,"props":3207,"children":3208},{"style":381},[3209],{"type":47,"value":2705},{"type":42,"tag":353,"props":3211,"children":3212},{"style":381},[3213],{"type":47,"value":2663},{"type":42,"tag":353,"props":3215,"children":3216},{"style":837},[3217],{"type":47,"value":3218},"                               # list buckets in current environment\n",{"type":42,"tag":353,"props":3220,"children":3222},{"class":355,"line":3221},16,[3223,3227,3231,3236,3241,3245,3249,3253,3257,3261],{"type":42,"tag":353,"props":3224,"children":3225},{"style":360},[3226],{"type":47,"value":8},{"type":42,"tag":353,"props":3228,"children":3229},{"style":381},[3230],{"type":47,"value":3205},{"type":42,"tag":353,"props":3232,"children":3233},{"style":381},[3234],{"type":47,"value":3235}," info",{"type":42,"tag":353,"props":3237,"children":3238},{"style":381},[3239],{"type":47,"value":3240}," --bucket",{"type":42,"tag":353,"props":3242,"children":3243},{"style":375},[3244],{"type":47,"value":2582},{"type":42,"tag":353,"props":3246,"children":3247},{"style":381},[3248],{"type":47,"value":2809},{"type":42,"tag":353,"props":3250,"children":3251},{"style":365},[3252],{"type":47,"value":2770},{"type":42,"tag":353,"props":3254,"children":3255},{"style":375},[3256],{"type":47,"value":2775},{"type":42,"tag":353,"props":3258,"children":3259},{"style":381},[3260],{"type":47,"value":2663},{"type":42,"tag":353,"props":3262,"children":3263},{"style":837},[3264],{"type":47,"value":3265},"               # bucket storage and object count\n",{"type":42,"tag":353,"props":3267,"children":3269},{"class":355,"line":3268},17,[3270,3274,3278,3283,3287,3291,3295,3299,3303,3307],{"type":42,"tag":353,"props":3271,"children":3272},{"style":360},[3273],{"type":47,"value":8},{"type":42,"tag":353,"props":3275,"children":3276},{"style":381},[3277],{"type":47,"value":3205},{"type":42,"tag":353,"props":3279,"children":3280},{"style":381},[3281],{"type":47,"value":3282}," credentials",{"type":42,"tag":353,"props":3284,"children":3285},{"style":381},[3286],{"type":47,"value":3240},{"type":42,"tag":353,"props":3288,"children":3289},{"style":375},[3290],{"type":47,"value":2582},{"type":42,"tag":353,"props":3292,"children":3293},{"style":381},[3294],{"type":47,"value":2809},{"type":42,"tag":353,"props":3296,"children":3297},{"style":365},[3298],{"type":47,"value":2770},{"type":42,"tag":353,"props":3300,"children":3301},{"style":375},[3302],{"type":47,"value":2775},{"type":42,"tag":353,"props":3304,"children":3305},{"style":381},[3306],{"type":47,"value":2663},{"type":42,"tag":353,"props":3308,"children":3309},{"style":837},[3310],{"type":47,"value":3311},"        # S3-compatible credentials\n",{"type":42,"tag":50,"props":3313,"children":3315},{"id":3314},"routing",[3316],{"type":47,"value":3317},"Routing",{"type":42,"tag":57,"props":3319,"children":3320},{},[3321],{"type":47,"value":3322},"For anything beyond quick operations, load the reference that matches the user's intent. Load only what you need, one reference is usually enough, two at most.",{"type":42,"tag":1442,"props":3324,"children":3325},{},[3326,3347],{"type":42,"tag":1446,"props":3327,"children":3328},{},[3329],{"type":42,"tag":1450,"props":3330,"children":3331},{},[3332,3337,3342],{"type":42,"tag":1454,"props":3333,"children":3334},{},[3335],{"type":47,"value":3336},"Intent",{"type":42,"tag":1454,"props":3338,"children":3339},{},[3340],{"type":47,"value":3341},"Reference",{"type":42,"tag":1454,"props":3343,"children":3344},{},[3345],{"type":47,"value":3346},"Use for",{"type":42,"tag":1465,"props":3348,"children":3349},{},[3350,3382,3404,3426,3448,3470,3514,3536,3556],{"type":42,"tag":1450,"props":3351,"children":3352},{},[3353,3363,3372],{"type":42,"tag":1472,"props":3354,"children":3355},{},[3356,3361],{"type":42,"tag":71,"props":3357,"children":3358},{},[3359],{"type":47,"value":3360},"Analyze a database",{"type":47,"value":3362}," (\"analyze \u003Curl>\", \"analyze db\", \"analyze database\", \"analyze service\", \"introspect\", \"check my postgres\u002Fredis\u002Fmysql\u002Fmongo\")",{"type":42,"tag":1472,"props":3364,"children":3365},{},[3366],{"type":42,"tag":625,"props":3367,"children":3369},{"href":3368},"references\u002Fanalyze-db.md",[3370],{"type":47,"value":3371},"analyze-db.md",{"type":42,"tag":1472,"props":3373,"children":3374},{},[3375,3377],{"type":47,"value":3376},"Database introspection and performance analysis. analyze-db.md directs you to the DB-specific reference. ",{"type":42,"tag":71,"props":3378,"children":3379},{},[3380],{"type":47,"value":3381},"This takes priority over the status\u002Foperate routes when a Railway URL to a database service is provided alongside \"analyze\".",{"type":42,"tag":1450,"props":3383,"children":3384},{},[3385,3390,3399],{"type":42,"tag":1472,"props":3386,"children":3387},{},[3388],{"type":47,"value":3389},"Create or connect resources",{"type":42,"tag":1472,"props":3391,"children":3392},{},[3393],{"type":42,"tag":625,"props":3394,"children":3396},{"href":3395},"references\u002Fsetup.md",[3397],{"type":47,"value":3398},"setup.md",{"type":42,"tag":1472,"props":3400,"children":3401},{},[3402],{"type":47,"value":3403},"Projects, services, databases, buckets, templates, workspaces",{"type":42,"tag":1450,"props":3405,"children":3406},{},[3407,3412,3421],{"type":42,"tag":1472,"props":3408,"children":3409},{},[3410],{"type":47,"value":3411},"Ship code or manage releases",{"type":42,"tag":1472,"props":3413,"children":3414},{},[3415],{"type":42,"tag":625,"props":3416,"children":3418},{"href":3417},"references\u002Fdeploy.md",[3419],{"type":47,"value":3420},"deploy.md",{"type":42,"tag":1472,"props":3422,"children":3423},{},[3424],{"type":47,"value":3425},"Deploy, redeploy, restart, build config, monorepo, Dockerfile",{"type":42,"tag":1450,"props":3427,"children":3428},{},[3429,3434,3443],{"type":42,"tag":1472,"props":3430,"children":3431},{},[3432],{"type":47,"value":3433},"Change configuration",{"type":42,"tag":1472,"props":3435,"children":3436},{},[3437],{"type":42,"tag":625,"props":3438,"children":3440},{"href":3439},"references\u002Fconfigure.md",[3441],{"type":47,"value":3442},"configure.md",{"type":42,"tag":1472,"props":3444,"children":3445},{},[3446],{"type":47,"value":3447},"Environments, variables, config patches, domains, networking",{"type":42,"tag":1450,"props":3449,"children":3450},{},[3451,3456,3465],{"type":42,"tag":1472,"props":3452,"children":3453},{},[3454],{"type":47,"value":3455},"Manage feature flags",{"type":42,"tag":1472,"props":3457,"children":3458},{},[3459],{"type":42,"tag":625,"props":3460,"children":3462},{"href":3461},"references\u002Ffeature-flags.md",[3463],{"type":47,"value":3464},"feature-flags.md",{"type":42,"tag":1472,"props":3466,"children":3467},{},[3468],{"type":47,"value":3469},"List\u002Fcreate\u002Fupdate project flags via MCP; workspace flags read-only; SDK runtime reads",{"type":42,"tag":1450,"props":3471,"children":3472},{},[3473,3493,3502],{"type":42,"tag":1472,"props":3474,"children":3475},{},[3476,3478,3484,3485,3491],{"type":47,"value":3477},"Define configuration in source control (\"IaC\", \"infrastructure as code\", \"config as code\", ",{"type":42,"tag":99,"props":3479,"children":3481},{"className":3480},[],[3482],{"type":47,"value":3483},".railway\u002Frailway.ts",{"type":47,"value":106},{"type":42,"tag":99,"props":3486,"children":3488},{"className":3487},[],[3489],{"type":47,"value":3490},"railway.json",{"type":47,"value":3492},", \"config plan\u002Fapply\u002Fpull\")",{"type":42,"tag":1472,"props":3494,"children":3495},{},[3496],{"type":42,"tag":625,"props":3497,"children":3499},{"href":3498},"references\u002Fiac.md",[3500],{"type":47,"value":3501},"iac.md",{"type":42,"tag":1472,"props":3503,"children":3504},{},[3505,3507,3512],{"type":47,"value":3506},"Choose TypeScript IaC or the ",{"type":42,"tag":99,"props":3508,"children":3510},{"className":3509},[],[3511],{"type":47,"value":3490},{"type":47,"value":3513}," fallback, then author, import, plan, apply, or check drift safely",{"type":42,"tag":1450,"props":3515,"children":3516},{},[3517,3522,3531],{"type":42,"tag":1472,"props":3518,"children":3519},{},[3520],{"type":47,"value":3521},"Check health or debug failures",{"type":42,"tag":1472,"props":3523,"children":3524},{},[3525],{"type":42,"tag":625,"props":3526,"children":3528},{"href":3527},"references\u002Foperate.md",[3529],{"type":47,"value":3530},"operate.md",{"type":42,"tag":1472,"props":3532,"children":3533},{},[3534],{"type":47,"value":3535},"Status, logs, metrics, build\u002Fruntime triage, recovery",{"type":42,"tag":1450,"props":3537,"children":3538},{},[3539,3544,3551],{"type":42,"tag":1472,"props":3540,"children":3541},{},[3542],{"type":47,"value":3543},"Use a sandbox or build remotely (\"sandbox\", \"scratch environment\", \"ephemeral box\", \"build remotely\", \"remote build\", \"run this remotely\", \"checkpoint\", \"snapshot\u002Fsave\u002Frestore sandbox state\")",{"type":42,"tag":1472,"props":3545,"children":3546},{},[3547],{"type":42,"tag":625,"props":3548,"children":3549},{"href":774},[3550],{"type":47,"value":777},{"type":42,"tag":1472,"props":3552,"children":3553},{},[3554],{"type":47,"value":3555},"Create\u002Ffork sandboxes, run commands remotely, remote template builds, checkpoints (save\u002Frestore sandbox state), port forwarding, teardown. Requires Sandboxes enabled in Priority Boarding — if unavailable, prompt the user to enable it.",{"type":42,"tag":1450,"props":3557,"children":3558},{},[3559,3564,3573],{"type":42,"tag":1472,"props":3560,"children":3561},{},[3562],{"type":47,"value":3563},"Request from API, docs, or community",{"type":42,"tag":1472,"props":3565,"children":3566},{},[3567],{"type":42,"tag":625,"props":3568,"children":3570},{"href":3569},"references\u002Frequest.md",[3571],{"type":47,"value":3572},"request.md",{"type":42,"tag":1472,"props":3574,"children":3575},{},[3576],{"type":47,"value":3577},"Railway GraphQL API queries\u002Fmutations, metrics queries, Central Station, official docs",{"type":42,"tag":57,"props":3579,"children":3580},{},[3581],{"type":47,"value":3582},"If the request spans two areas (for example, \"deploy and then check if it's healthy\"), load both references and compose one response.",{"type":42,"tag":50,"props":3584,"children":3586},{"id":3585},"execution-rules",[3587],{"type":47,"value":3588},"Execution rules",{"type":42,"tag":1793,"props":3590,"children":3591},{},[3592,3597,3602,3607,3619,3630,3635,3640,3645],{"type":42,"tag":67,"props":3593,"children":3594},{},[3595],{"type":47,"value":3596},"Use Railway CLI for workflows that need the current repo, local shell, SSH, database scripts, local Railway context, or exact command output.",{"type":42,"tag":67,"props":3598,"children":3599},{},[3600],{"type":47,"value":3601},"Use Remote MCP for OAuth-scoped platform operations that match an available MCP tool and do not need local files or CLI state.",{"type":42,"tag":67,"props":3603,"children":3604},{},[3605],{"type":47,"value":3606},"Use local CLI MCP only when the current agent already has it explicitly configured and it exposes a needed operation not available through Remote MCP.",{"type":42,"tag":67,"props":3608,"children":3609},{},[3610,3612,3617],{"type":47,"value":3611},"Fall back to ",{"type":42,"tag":99,"props":3613,"children":3615},{"className":3614},[],[3616],{"type":47,"value":288},{"type":47,"value":3618}," for operations neither MCP nor CLI exposes.",{"type":42,"tag":67,"props":3620,"children":3621},{},[3622,3623,3628],{"type":47,"value":282},{"type":42,"tag":99,"props":3624,"children":3626},{"className":3625},[],[3627],{"type":47,"value":1959},{"type":47,"value":3629}," output where available for reliable parsing.",{"type":42,"tag":67,"props":3631,"children":3632},{},[3633],{"type":47,"value":3634},"Resolve context before mutation. Know which project, environment, and service you're acting on.",{"type":42,"tag":67,"props":3636,"children":3637},{},[3638],{"type":47,"value":3639},"For destructive actions (delete service, remove deployment, drop database), confirm intent and state impact before executing.",{"type":42,"tag":67,"props":3641,"children":3642},{},[3643],{"type":47,"value":3644},"After mutations, verify the result with a read-back command or MCP read.",{"type":42,"tag":67,"props":3646,"children":3647},{},[3648,3653,3655,3661,3663,3668,3670,3675,3677,3683,3685,3690,3691,3696,3697,3702,3704,3710,3712,3718,3720,3726,3728,3734,3736,3740,3742,3748,3749,3755,3756,3762,3763,3769,3770,3776,3778,3783],{"type":42,"tag":71,"props":3649,"children":3650},{},[3651],{"type":47,"value":3652},"Never report a deploy as successful without observing a terminal SUCCESS.",{"type":47,"value":3654}," ",{"type":42,"tag":99,"props":3656,"children":3658},{"className":3657},[],[3659],{"type":47,"value":3660},"railway up --detach",{"type":47,"value":3662}," returning (it prints \"Build queued\") and a streaming ",{"type":42,"tag":99,"props":3664,"children":3666},{"className":3665},[],[3667],{"type":47,"value":215},{"type":47,"value":3669}," cut off by a shell timeout only confirm the build ",{"type":42,"tag":531,"props":3671,"children":3672},{},[3673],{"type":47,"value":3674},"started",{"type":47,"value":3676},". Poll ",{"type":42,"tag":99,"props":3678,"children":3680},{"className":3679},[],[3681],{"type":47,"value":3682},"railway deployment list --json",{"type":47,"value":3684}," with the same ",{"type":42,"tag":99,"props":3686,"children":3688},{"className":3687},[],[3689],{"type":47,"value":162},{"type":47,"value":106},{"type":42,"tag":99,"props":3692,"children":3694},{"className":3693},[],[3695],{"type":47,"value":169},{"type":47,"value":2427},{"type":42,"tag":99,"props":3698,"children":3700},{"className":3699},[],[3701],{"type":47,"value":176},{"type":47,"value":3703}," scope used for the deploy until the newest deployment's ",{"type":42,"tag":99,"props":3705,"children":3707},{"className":3706},[],[3708],{"type":47,"value":3709},"status",{"type":47,"value":3711}," is ",{"type":42,"tag":99,"props":3713,"children":3715},{"className":3714},[],[3716],{"type":47,"value":3717},"SUCCESS",{"type":47,"value":3719}," (report deployed). If status is ",{"type":42,"tag":99,"props":3721,"children":3723},{"className":3722},[],[3724],{"type":47,"value":3725},"FAILED",{"type":47,"value":3727}," or ",{"type":42,"tag":99,"props":3729,"children":3731},{"className":3730},[],[3732],{"type":47,"value":3733},"CRASHED",{"type":47,"value":3735},", triage per ",{"type":42,"tag":625,"props":3737,"children":3738},{"href":3527},[3739],{"type":47,"value":3530},{"type":47,"value":3741},". If status is ",{"type":42,"tag":99,"props":3743,"children":3745},{"className":3744},[],[3746],{"type":47,"value":3747},"NEEDS_APPROVAL",{"type":47,"value":106},{"type":42,"tag":99,"props":3750,"children":3752},{"className":3751},[],[3753],{"type":47,"value":3754},"SLEEPING",{"type":47,"value":106},{"type":42,"tag":99,"props":3757,"children":3759},{"className":3758},[],[3760],{"type":47,"value":3761},"SKIPPED",{"type":47,"value":106},{"type":42,"tag":99,"props":3764,"children":3766},{"className":3765},[],[3767],{"type":47,"value":3768},"REMOVED",{"type":47,"value":106},{"type":42,"tag":99,"props":3771,"children":3773},{"className":3772},[],[3774],{"type":47,"value":3775},"REMOVING",{"type":47,"value":3777},", or an unknown value, report the exact state and next action; do not claim success. A streaming ",{"type":42,"tag":99,"props":3779,"children":3781},{"className":3780},[],[3782],{"type":47,"value":1617},{"type":47,"value":3784}," that exits on its own is authoritative: exit 0 = deployed, exit 1 = failed.",{"type":42,"tag":50,"props":3786,"children":3788},{"id":3787},"user-only-commands-never-execute-directly",[3789],{"type":47,"value":3790},"User-only commands (NEVER execute directly)",{"type":42,"tag":57,"props":3792,"children":3793},{},[3794,3796],{"type":47,"value":3795},"These commands modify database state and require the user to run them directly in their terminal. ",{"type":42,"tag":71,"props":3797,"children":3798},{},[3799],{"type":47,"value":3800},"Do NOT execute these with Bash. Instead, show the command and ask the user to run it.",{"type":42,"tag":1442,"props":3802,"children":3803},{},[3804,3819],{"type":42,"tag":1446,"props":3805,"children":3806},{},[3807],{"type":42,"tag":1450,"props":3808,"children":3809},{},[3810,3814],{"type":42,"tag":1454,"props":3811,"children":3812},{},[3813],{"type":47,"value":1458},{"type":42,"tag":1454,"props":3815,"children":3816},{},[3817],{"type":47,"value":3818},"Why user-only",{"type":42,"tag":1465,"props":3820,"children":3821},{},[3822,3839,3856,3873,3890,3906],{"type":42,"tag":1450,"props":3823,"children":3824},{},[3825,3834],{"type":42,"tag":1472,"props":3826,"children":3827},{},[3828],{"type":42,"tag":99,"props":3829,"children":3831},{"className":3830},[],[3832],{"type":47,"value":3833},"python3 scripts\u002Fenable-pg-stats.py --service \u003Cname>",{"type":42,"tag":1472,"props":3835,"children":3836},{},[3837],{"type":47,"value":3838},"Modifies shared_preload_libraries, may restart database",{"type":42,"tag":1450,"props":3840,"children":3841},{},[3842,3851],{"type":42,"tag":1472,"props":3843,"children":3844},{},[3845],{"type":42,"tag":99,"props":3846,"children":3848},{"className":3847},[],[3849],{"type":47,"value":3850},"python3 scripts\u002Fpg-extensions.py --service \u003Cname> install \u003Cext>",{"type":42,"tag":1472,"props":3852,"children":3853},{},[3854],{"type":47,"value":3855},"Installs database extension",{"type":42,"tag":1450,"props":3857,"children":3858},{},[3859,3868],{"type":42,"tag":1472,"props":3860,"children":3861},{},[3862],{"type":42,"tag":99,"props":3863,"children":3865},{"className":3864},[],[3866],{"type":47,"value":3867},"python3 scripts\u002Fpg-extensions.py --service \u003Cname> uninstall \u003Cext>",{"type":42,"tag":1472,"props":3869,"children":3870},{},[3871],{"type":47,"value":3872},"Removes database extension",{"type":42,"tag":1450,"props":3874,"children":3875},{},[3876,3885],{"type":42,"tag":1472,"props":3877,"children":3878},{},[3879],{"type":42,"tag":99,"props":3880,"children":3882},{"className":3881},[],[3883],{"type":47,"value":3884},"ALTER SYSTEM SET ...",{"type":42,"tag":1472,"props":3886,"children":3887},{},[3888],{"type":47,"value":3889},"Changes PostgreSQL configuration",{"type":42,"tag":1450,"props":3891,"children":3892},{},[3893,3902],{"type":42,"tag":1472,"props":3894,"children":3895},{},[3896],{"type":42,"tag":99,"props":3897,"children":3899},{"className":3898},[],[3900],{"type":47,"value":3901},"DROP EXTENSION ...",{"type":42,"tag":1472,"props":3903,"children":3904},{},[3905],{"type":47,"value":3872},{"type":42,"tag":1450,"props":3907,"children":3908},{},[3909,3918],{"type":42,"tag":1472,"props":3910,"children":3911},{},[3912],{"type":42,"tag":99,"props":3913,"children":3915},{"className":3914},[],[3916],{"type":47,"value":3917},"CREATE EXTENSION ...",{"type":42,"tag":1472,"props":3919,"children":3920},{},[3921],{"type":47,"value":3855},{"type":42,"tag":57,"props":3923,"children":3924},{},[3925],{"type":47,"value":3926},"When these operations are needed:",{"type":42,"tag":1793,"props":3928,"children":3929},{},[3930,3935,3940,3945],{"type":42,"tag":67,"props":3931,"children":3932},{},[3933],{"type":47,"value":3934},"Explain what the command does and any side effects (e.g., restart required)",{"type":42,"tag":67,"props":3936,"children":3937},{},[3938],{"type":47,"value":3939},"Show the exact command the user must run",{"type":42,"tag":67,"props":3941,"children":3942},{},[3943],{"type":47,"value":3944},"Wait for user confirmation that they ran it",{"type":42,"tag":67,"props":3946,"children":3947},{},[3948],{"type":47,"value":3949},"Verify the result with a read-only query",{"type":42,"tag":50,"props":3951,"children":3953},{"id":3952},"composition-patterns",[3954],{"type":47,"value":3955},"Composition patterns",{"type":42,"tag":57,"props":3957,"children":3958},{},[3959],{"type":47,"value":3960},"Multi-step workflows follow natural chains:",{"type":42,"tag":63,"props":3962,"children":3963},{},[3964,3974,3984,3994,4004],{"type":42,"tag":67,"props":3965,"children":3966},{},[3967,3972],{"type":42,"tag":71,"props":3968,"children":3969},{},[3970],{"type":47,"value":3971},"Add object storage",{"type":47,"value":3973},": setup (create bucket), setup (get credentials), configure (set S3 variables on app service)",{"type":42,"tag":67,"props":3975,"children":3976},{},[3977,3982],{"type":42,"tag":71,"props":3978,"children":3979},{},[3980],{"type":47,"value":3981},"First deploy",{"type":47,"value":3983},": setup (create project + service), configure (set variables and source), deploy, operate (verify healthy)",{"type":42,"tag":67,"props":3985,"children":3986},{},[3987,3992],{"type":42,"tag":71,"props":3988,"children":3989},{},[3990],{"type":47,"value":3991},"Fix a failure",{"type":47,"value":3993},": operate (triage logs), configure (fix config\u002Fvariables), deploy (redeploy), operate (verify recovery)",{"type":42,"tag":67,"props":3995,"children":3996},{},[3997,4002],{"type":42,"tag":71,"props":3998,"children":3999},{},[4000],{"type":47,"value":4001},"Add a domain",{"type":47,"value":4003},": configure (add domain + set port), operate (verify DNS and service health)",{"type":42,"tag":67,"props":4005,"children":4006},{},[4007,4012],{"type":42,"tag":71,"props":4008,"children":4009},{},[4010],{"type":47,"value":4011},"Docs to action",{"type":47,"value":4013},": request (fetch docs answer), route to the relevant operational reference",{"type":42,"tag":57,"props":4015,"children":4016},{},[4017],{"type":47,"value":4018},"When composing, return one unified response covering all steps. Don't ask the user to invoke each step separately.",{"type":42,"tag":50,"props":4020,"children":4022},{"id":4021},"setup-decision-flow",[4023],{"type":47,"value":4024},"Setup decision flow",{"type":42,"tag":57,"props":4026,"children":4027},{},[4028],{"type":47,"value":4029},"When the user wants to create or deploy something, determine the right action from current context:",{"type":42,"tag":1793,"props":4031,"children":4032},{},[4033,4079,4090,4108,4203],{"type":42,"tag":67,"props":4034,"children":4035},{},[4036,4038,4043,4045,4050,4052,4057,4059,4064,4066,4072,4074,4078],{"type":47,"value":4037},"If the intent is deploy-from-cwd or signup-from-cwd, skip ",{"type":42,"tag":99,"props":4039,"children":4041},{"className":4040},[],[4042],{"type":47,"value":561},{"type":47,"value":4044}," and run ",{"type":42,"tag":99,"props":4046,"children":4048},{"className":4047},[],[4049],{"type":47,"value":215},{"type":47,"value":4051}," (or ",{"type":42,"tag":99,"props":4053,"children":4055},{"className":4054},[],[4056],{"type":47,"value":716},{"type":47,"value":4058},") directly per ",{"type":42,"tag":625,"props":4060,"children":4062},{"href":4061},"#intent-based-routing",[4063],{"type":47,"value":524},{"type":47,"value":4065}," — it handles signup, project creation, service creation, and deploy in one chain. For other setup flows that need workspace\u002Faccount context first, run ",{"type":42,"tag":99,"props":4067,"children":4069},{"className":4068},[],[4070],{"type":47,"value":4071},"railway whoami --json",{"type":47,"value":4073},"; if it fails with an auth error the user has no token — route through ",{"type":42,"tag":625,"props":4075,"children":4076},{"href":627},[4077],{"type":47,"value":985},{"type":47,"value":459},{"type":42,"tag":67,"props":4080,"children":4081},{},[4082,4083,4088],{"type":47,"value":576},{"type":42,"tag":99,"props":4084,"children":4086},{"className":4085},[],[4087],{"type":47,"value":154},{"type":47,"value":4089}," in the current directory.",{"type":42,"tag":67,"props":4091,"children":4092},{},[4093,4098,4100,4106],{"type":42,"tag":71,"props":4094,"children":4095},{},[4096],{"type":47,"value":4097},"If linked",{"type":47,"value":4099},": add a service to the existing project (",{"type":42,"tag":99,"props":4101,"children":4103},{"className":4102},[],[4104],{"type":47,"value":4105},"railway add --service \u003Cname>",{"type":47,"value":4107},"). Do not create a new project unless the user explicitly says \"new project\" or \"separate project\".",{"type":42,"tag":67,"props":4109,"children":4110},{},[4111,4116,4118,4124,4126],{"type":42,"tag":71,"props":4112,"children":4113},{},[4114],{"type":47,"value":4115},"If not linked",{"type":47,"value":4117},": check the parent directory (",{"type":42,"tag":99,"props":4119,"children":4121},{"className":4120},[],[4122],{"type":47,"value":4123},"cd .. && railway status --json",{"type":47,"value":4125},").\n",{"type":42,"tag":63,"props":4127,"children":4128},{},[4129,4147],{"type":42,"tag":67,"props":4130,"children":4131},{},[4132,4137,4139,4145],{"type":42,"tag":71,"props":4133,"children":4134},{},[4135],{"type":47,"value":4136},"Parent linked",{"type":47,"value":4138},": this is likely a monorepo sub-app. Add a service and set ",{"type":42,"tag":99,"props":4140,"children":4142},{"className":4141},[],[4143],{"type":47,"value":4144},"rootDirectory",{"type":47,"value":4146}," to the sub-app path.",{"type":42,"tag":67,"props":4148,"children":4149},{},[4150,4155,4157,4163,4165],{"type":42,"tag":71,"props":4151,"children":4152},{},[4153],{"type":47,"value":4154},"Parent not linked",{"type":47,"value":4156},": run ",{"type":42,"tag":99,"props":4158,"children":4160},{"className":4159},[],[4161],{"type":47,"value":4162},"railway list --json",{"type":47,"value":4164}," and look for a project matching the directory name.\n",{"type":42,"tag":63,"props":4166,"children":4167},{},[4168,4186],{"type":42,"tag":67,"props":4169,"children":4170},{},[4171,4176,4178,4184],{"type":42,"tag":71,"props":4172,"children":4173},{},[4174],{"type":47,"value":4175},"Match found",{"type":47,"value":4177},": link to it (",{"type":42,"tag":99,"props":4179,"children":4181},{"className":4180},[],[4182],{"type":47,"value":4183},"railway link --project \u003Cname>",{"type":47,"value":4185},").",{"type":42,"tag":67,"props":4187,"children":4188},{},[4189,4194,4196,4202],{"type":42,"tag":71,"props":4190,"children":4191},{},[4192],{"type":47,"value":4193},"No match",{"type":47,"value":4195},": create a new project (",{"type":42,"tag":99,"props":4197,"children":4199},{"className":4198},[],[4200],{"type":47,"value":4201},"railway init --name \u003Cname>",{"type":47,"value":4185},{"type":42,"tag":67,"props":4204,"children":4205},{},[4206,4208,4213],{"type":47,"value":4207},"When multiple workspaces exist, match by name from ",{"type":42,"tag":99,"props":4209,"children":4211},{"className":4210},[],[4212],{"type":47,"value":4071},{"type":47,"value":459},{"type":42,"tag":57,"props":4215,"children":4216},{},[4217,4222],{"type":42,"tag":71,"props":4218,"children":4219},{},[4220],{"type":47,"value":4221},"Naming heuristic",{"type":47,"value":4223},": app names like \"flappy-bird\" or \"my-api\" are service names, not project names. Use the directory or repo name for the project.",{"type":42,"tag":50,"props":4225,"children":4227},{"id":4226},"response-format",[4228],{"type":47,"value":4229},"Response format",{"type":42,"tag":57,"props":4231,"children":4232},{},[4233],{"type":47,"value":4234},"For all operational responses, return:",{"type":42,"tag":1793,"props":4236,"children":4237},{},[4238,4243,4248],{"type":42,"tag":67,"props":4239,"children":4240},{},[4241],{"type":47,"value":4242},"What was done (action and scope).",{"type":42,"tag":67,"props":4244,"children":4245},{},[4246],{"type":47,"value":4247},"The result (IDs, status, key output).",{"type":42,"tag":67,"props":4249,"children":4250},{},[4251],{"type":47,"value":4252},"What to do next (or confirmation that the task is complete).",{"type":42,"tag":57,"props":4254,"children":4255},{},[4256],{"type":47,"value":4257},"Keep output concise. Include command evidence only when it helps the user understand what happened.",{"type":42,"tag":4259,"props":4260,"children":4261},"style",{},[4262],{"type":47,"value":4263},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":4265,"total":371},[4266,4285],{"slug":4267,"name":4267,"fn":4268,"description":4269,"org":4270,"tags":4271,"stars":4282,"repoUrl":4283,"updatedAt":4284},"railpack","configure and troubleshoot Railpack builds","Configure and troubleshoot Railpack builds, with emphasis on RAILPACK_* environment variables, railpack.json overlays, build-plan inspection, local CLI installation and usage, and local BuildKit containers. Use for Railpack provider configuration, custom install\u002Fbuild\u002Fstart commands, Mise or Apt packages, build or runtime variables and secrets, generated-plan debugging, BUILDKIT_HOST errors, or running Railpack from a release or source checkout.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4272,4275,4278,4279],{"name":4273,"slug":4274,"type":16},"CLI","cli",{"name":4276,"slug":4277,"type":16},"Configuration","configuration",{"name":14,"slug":15,"type":16},{"name":4280,"slug":4281,"type":16},"Engineering","engineering",1129,"https:\u002F\u002Fgithub.com\u002Frailwayapp\u002Frailpack","2026-07-30T05:53:37.044659",{"slug":4,"name":4,"fn":5,"description":6,"org":4286,"tags":4287,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4288,4289,4290],{"name":18,"slug":19,"type":16},{"name":14,"slug":15,"type":16},{"name":21,"slug":22,"type":16},{"items":4292,"total":356},[4293],{"slug":4,"name":4,"fn":5,"description":6,"org":4294,"tags":4295,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4296,4297,4298],{"name":18,"slug":19,"type":16},{"name":14,"slug":15,"type":16},{"name":21,"slug":22,"type":16}]