vybekiit 0.7.26 → 0.7.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +3891 -1301
- package/dist/global-skills/aws-cdk/SKILL.md +19 -5
- package/dist/global-skills/aws-cdk/references/fast-deployments.md +191 -0
- package/dist/global-skills/aws-cdk/references/troubleshooting-deployment.md +16 -0
- package/dist/global-skills/aws-cloudformation/SKILL.md +16 -26
- package/dist/global-skills/aws-cloudformation/references/check-cloudformation-template-compliance.script.md +7 -3
- package/dist/global-skills/aws-cloudformation/references/cloudformation-language-server.md +177 -0
- package/dist/global-skills/aws-cloudformation/references/cloudformation-pre-deploy-validation.script.md +8 -2
- package/dist/global-skills/aws-cloudformation/references/persist-template-context.script.md +5 -8
- package/dist/global-skills/aws-cloudformation/references/retrieve-template-context.script.md +1 -1
- package/dist/global-skills/aws-cloudformation/references/security-considerations.md +51 -0
- package/dist/global-skills/aws-cloudformation/references/troubleshoot-failed-stack.script.md +138 -0
- package/dist/global-skills/aws-cloudformation/references/{validate-cloudformation-template.script.md → validate-with-cfn-lint.script.md} +15 -27
- package/dist/global-skills/aws-cloudformation/references/validate-with-cloudformation-validate.script.md +181 -0
- package/dist/global-skills/aws-cloudformation/references/validation-tool-selection.md +44 -0
- package/dist/global-skills/aws-serverless/SKILL.md +9 -1
- package/dist/global-skills/aws-serverless/references/architecture.md +3 -1
- package/dist/global-skills/aws-serverless/references/lambda.md +3 -1
- package/dist/global-skills/aws-serverless/references/orchestration.md +1 -0
- package/dist/global-skills/better-auth-best-practices/SKILL.md +18 -8
- package/dist/global-skills/eas-app-stores/SKILL.md +31 -15
- package/dist/global-skills/eas-app-stores/agents/openai.yaml +2 -2
- package/dist/global-skills/eas-app-stores/references/ios-app-store.md +37 -32
- package/dist/global-skills/eas-app-stores/references/native-ios.md +167 -0
- package/dist/global-skills/eas-app-stores/references/play-store.md +3 -7
- package/dist/global-skills/eas-app-stores/references/testflight.md +39 -35
- package/dist/global-skills/eas-simulator/SKILL.md +48 -26
- package/dist/global-skills/eas-simulator/references/controllers.md +32 -3
- package/dist/global-skills/eas-simulator/references/run-your-app.md +34 -4
- package/dist/global-skills/eas-simulator/references/troubleshooting.md +8 -4
- package/dist/global-skills/eas-update/SKILL.md +146 -0
- package/dist/global-skills/eas-update/agents/openai.yaml +4 -0
- package/dist/global-skills/expo-animation/RECIPES.md +2 -2
- package/dist/global-skills/expo-animation/SKILL.md +9 -2
- package/dist/global-skills/expo-brownfield/SKILL.md +18 -11
- package/dist/global-skills/expo-brownfield/agents/openai.yaml +2 -2
- package/dist/global-skills/expo-brownfield/references/brownfield-integrated.md +94 -69
- package/dist/global-skills/expo-brownfield/references/brownfield-isolated.md +40 -42
- package/dist/global-skills/expo-brownfield/references/comparison.md +5 -5
- package/dist/global-skills/expo-brownfield/references/feature-integration.md +163 -0
- package/dist/global-skills/expo-brownfield/references/troubleshooting.md +17 -17
- package/dist/global-skills/expo-brownfield/references/version-compatibility.md +40 -0
- package/dist/global-skills/expo-data-fetching/SKILL.md +27 -6
- package/dist/global-skills/expo-design-system/SKILL.md +27 -7
- package/dist/global-skills/expo-design-system/references/audit.md +7 -2
- package/dist/global-skills/expo-design-system/references/native-slop.md +74 -0
- package/dist/global-skills/expo-examples/SKILL.md +0 -1
- package/dist/global-skills/expo-examples/references/catalog.md +1 -1
- package/dist/global-skills/expo-migrate-module/SKILL.md +21 -10
- package/dist/global-skills/expo-migrate-module/references/compatibility.md +80 -23
- package/dist/global-skills/expo-migrate-module/references/migration-map.md +162 -11
- package/dist/global-skills/expo-native-ui/SKILL.md +25 -16
- package/dist/global-skills/expo-native-ui/agents/openai.yaml +2 -2
- package/dist/global-skills/expo-native-ui/references/controls.md +5 -46
- package/dist/global-skills/expo-native-ui/references/icons.md +21 -2
- package/dist/global-skills/expo-native-ui/references/media.md +15 -20
- package/dist/global-skills/expo-native-ui/references/visual-effects.md +12 -11
- package/dist/global-skills/expo-overview/SKILL.md +17 -12
- package/dist/global-skills/expo-router/SKILL.md +5 -3
- package/dist/global-skills/expo-router/references/tabs.md +5 -5
- package/dist/global-skills/expo-upgrade/SKILL.md +3 -1
- package/dist/global-skills/expo-web-to-native/references/false-friends.md +2 -2
- package/dist/global-skills/expo-web-to-native/references/native-patterns.md +1 -1
- package/dist/global-skills/firebase-ai-logic-basics/SKILL.md +13 -16
- package/dist/global-skills/firebase-ai-logic-basics/references/ios_setup.md +4 -5
- package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_android.md +4 -4
- package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_web.md +3 -3
- package/dist/global-skills/firebase-auth-basics/SKILL.md +11 -6
- package/dist/global-skills/firebase-auth-basics/references/client_sdk_android.md +4 -5
- package/dist/global-skills/firebase-auth-basics/references/client_sdk_web.md +3 -3
- package/dist/global-skills/firebase-auth-basics/references/flutter_setup.md +24 -25
- package/dist/global-skills/firebase-auth-basics/references/security_rules.md +4 -2
- package/dist/global-skills/firebase-crashlytics/references/android_setup.md +7 -4
- package/dist/global-skills/firebase-crashlytics/references/ios_setup.md +2 -3
- package/dist/global-skills/firebase-data-connect/SKILL.md +2 -1
- package/dist/global-skills/firebase-data-connect/examples.md +4 -4
- package/dist/global-skills/firebase-data-connect/reference/config.md +5 -4
- package/dist/global-skills/firebase-data-connect/reference/realtime.md +1 -2
- package/dist/global-skills/firebase-data-connect/reference/sdk_flutter.md +2 -2
- package/dist/global-skills/firebase-data-connect/reference/sdk_ios.md +2 -2
- package/dist/global-skills/firebase-data-connect/reference/sdk_web.md +17 -6
- package/dist/global-skills/firebase-data-connect/reference/security.md +5 -5
- package/dist/global-skills/firebase-data-connect/templates.md +2 -1
- package/dist/global-skills/firebase-firestore/SKILL.md +20 -8
- package/dist/global-skills/firebase-firestore/references/enterprise/android_sdk_usage.md +5 -4
- package/dist/global-skills/firebase-firestore/references/enterprise/data_model.md +12 -3
- package/dist/global-skills/firebase-firestore/references/enterprise/indexes.md +16 -18
- package/dist/global-skills/firebase-firestore/references/enterprise/provisioning.md +1 -1
- package/dist/global-skills/firebase-firestore/references/enterprise/python_sdk_usage.md +5 -1
- package/dist/global-skills/firebase-firestore/references/enterprise/web_sdk_usage.md +7 -7
- package/dist/global-skills/firebase-firestore/references/standard/android_sdk_usage.md +5 -5
- package/dist/global-skills/firebase-firestore/references/standard/flutter_setup.md +4 -4
- package/dist/global-skills/firebase-firestore/references/standard/indexes.md +16 -18
- package/dist/global-skills/firebase-firestore/references/standard/provisioning.md +1 -1
- package/dist/global-skills/firebase-remote-config-basics/SKILL.md +0 -5
- package/dist/global-skills/firebase-remote-config-basics/references/android_setup.md +36 -8
- package/dist/global-skills/firebase-remote-config-basics/references/ios_setup.md +1 -7
- package/dist/global-skills/firebase-security-rules-auditor/SKILL.md +17 -6
- package/dist/global-skills/{firebase-firestore/references/standard/security_rules.md → firestore-rules-creation/SKILL.md} +24 -13
- package/dist/global-skills/grow-my-customers/SKILL.md +23 -0
- package/dist/global-skills/instrument-feature-flags/SKILL.md +25 -25
- package/dist/global-skills/instrument-feature-flags/references/adding-feature-flag-code.md +141 -285
- package/dist/global-skills/instrument-feature-flags/references/android.md +6 -15
- package/dist/global-skills/instrument-feature-flags/references/api.md +4 -11
- package/dist/global-skills/instrument-feature-flags/references/best-practices.md +1 -13
- package/dist/global-skills/instrument-feature-flags/references/django.md +14 -27
- package/dist/global-skills/instrument-feature-flags/references/dotnet.md +20 -79
- package/dist/global-skills/instrument-feature-flags/references/elixir.md +1 -9
- package/dist/global-skills/instrument-feature-flags/references/flask.md +13 -13
- package/dist/global-skills/instrument-feature-flags/references/flutter.md +3 -24
- package/dist/global-skills/instrument-feature-flags/references/go.md +3 -15
- package/dist/global-skills/instrument-feature-flags/references/ios.md +4 -17
- package/dist/global-skills/instrument-feature-flags/references/java.md +5 -13
- package/dist/global-skills/instrument-feature-flags/references/laravel.md +13 -17
- package/dist/global-skills/instrument-feature-flags/references/next-js.md +25 -32
- package/dist/global-skills/instrument-feature-flags/references/nodejs.md +8 -15
- package/dist/global-skills/instrument-feature-flags/references/php.md +1 -15
- package/dist/global-skills/instrument-feature-flags/references/python.md +2 -15
- package/dist/global-skills/instrument-feature-flags/references/react-native.md +13 -15
- package/dist/global-skills/instrument-feature-flags/references/react.md +17 -21
- package/dist/global-skills/instrument-feature-flags/references/ruby-on-rails.md +37 -83
- package/dist/global-skills/instrument-feature-flags/references/ruby.md +2 -15
- package/dist/global-skills/instrument-feature-flags/references/rust.md +13 -25
- package/dist/global-skills/instrument-feature-flags/references/usage.md +14 -63
- package/dist/global-skills/instrument-feature-flags/references/web.md +9 -14
- package/dist/global-skills/instrument-product-analytics/SKILL.md +29 -29
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-hybrid.md +3 -1
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-ssr.md +3 -1
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-static.md +3 -1
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-view-transitions.md +3 -1
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-ruby-on-rails.md +3 -1
- package/dist/global-skills/instrument-product-analytics/references/android.md +72 -107
- package/dist/global-skills/instrument-product-analytics/references/angular.md +26 -28
- package/dist/global-skills/instrument-product-analytics/references/astro.md +13 -24
- package/dist/global-skills/instrument-product-analytics/references/configuration.md +45 -63
- package/dist/global-skills/instrument-product-analytics/references/django.md +14 -27
- package/dist/global-skills/instrument-product-analytics/references/dotnet.md +20 -79
- package/dist/global-skills/instrument-product-analytics/references/elixir.md +47 -49
- package/dist/global-skills/instrument-product-analytics/references/flask.md +13 -13
- package/dist/global-skills/instrument-product-analytics/references/flutter.md +60 -90
- package/dist/global-skills/instrument-product-analytics/references/go.md +17 -56
- package/dist/global-skills/instrument-product-analytics/references/identify-users.md +15 -15
- package/dist/global-skills/instrument-product-analytics/references/ios.md +11 -15
- package/dist/global-skills/instrument-product-analytics/references/laravel.md +13 -17
- package/dist/global-skills/instrument-product-analytics/references/next-js.md +25 -32
- package/dist/global-skills/instrument-product-analytics/references/nuxt-js-3-6.md +13 -27
- package/dist/global-skills/instrument-product-analytics/references/nuxt-js.md +14 -28
- package/dist/global-skills/instrument-product-analytics/references/php.md +33 -84
- package/dist/global-skills/instrument-product-analytics/references/posthog-python.md +229 -9
- package/dist/global-skills/instrument-product-analytics/references/python.md +415 -106
- package/dist/global-skills/instrument-product-analytics/references/react-native.md +161 -155
- package/dist/global-skills/instrument-product-analytics/references/react-router-v6.md +12 -33
- package/dist/global-skills/instrument-product-analytics/references/react-router-v7-data-mode.md +15 -33
- package/dist/global-skills/instrument-product-analytics/references/react-router-v7-declarative-mode.md +12 -33
- package/dist/global-skills/instrument-product-analytics/references/react-router-v7-framework-mode.md +26 -41
- package/dist/global-skills/instrument-product-analytics/references/ruby-on-rails.md +37 -83
- package/dist/global-skills/instrument-product-analytics/references/ruby.md +48 -108
- package/dist/global-skills/instrument-product-analytics/references/svelte.md +18 -24
- package/dist/global-skills/instrument-product-analytics/references/tanstack-start.md +17 -19
- package/dist/global-skills/instrument-product-analytics/references/usage.md +14 -63
- package/dist/global-skills/instrument-product-analytics/references/vue-js.md +29 -28
- package/dist/global-skills/manifest.json +8 -2
- package/dist/global-skills/mongodb-search-and-ai/SKILL.md +28 -37
- package/dist/global-skills/mongodb-search-and-ai/references/automated-embedding.md +438 -0
- package/dist/global-skills/mongodb-search-and-ai/references/hybrid-search.md +60 -4
- package/dist/global-skills/mongodb-search-and-ai/references/vector-search.md +46 -108
- package/dist/global-skills/neon/SKILL.md +207 -213
- package/dist/global-skills/neon/references/auth.md +12 -0
- package/dist/global-skills/neon/references/claimable-neon.md +10 -14
- package/dist/global-skills/neon/references/function-triggers.md +53 -0
- package/dist/global-skills/neon/references/logs-loki.md +61 -0
- package/dist/global-skills/neon/references/parse-env.md +32 -0
- package/dist/global-skills/neon/references/sdk.md +7 -0
- package/dist/global-skills/neon-ai-gateway/SKILL.md +14 -16
- package/dist/global-skills/neon-auth/SKILL.md +155 -0
- package/dist/global-skills/neon-auth/references/managed-auth.md +173 -0
- package/dist/global-skills/neon-auth/references/self-managed.md +25 -0
- package/dist/global-skills/neon-functions/SKILL.md +159 -84
- package/dist/global-skills/neon-functions/references/ai-sdk.md +4 -6
- package/dist/global-skills/neon-functions/references/function-triggers.md +249 -0
- package/dist/global-skills/neon-functions/references/mastra-studio.md +3 -3
- package/dist/global-skills/neon-functions/references/mcp.md +1 -1
- package/dist/global-skills/neon-functions/references/production-hardening.md +340 -0
- package/dist/global-skills/neon-functions/references/sse.md +8 -5
- package/dist/global-skills/neon-object-storage/SKILL.md +10 -11
- package/dist/global-skills/neon-postgres/SKILL.md +120 -17
- package/dist/global-skills/neon-postgres/references/full-text-search.md +99 -0
- package/dist/global-skills/neon-postgres/references/hybrid-search.md +90 -0
- package/dist/global-skills/neon-postgres/references/lakebase-search-drizzle.md +172 -0
- package/dist/global-skills/neon-postgres/references/vector-search.md +137 -0
- package/dist/global-skills/neon-postgres-branches/SKILL.md +3 -3
- package/dist/global-skills/neon-postgres-egress-optimizer/SKILL.md +1 -1
- package/dist/global-skills/onboarding/SKILL.md +8 -6
- package/dist/global-skills/resend/SKILL.md +4 -2
- package/dist/global-skills/resend/references/broadcasts.md +6 -1
- package/dist/global-skills/resend/references/receiving.md +29 -10
- package/dist/global-skills/resend/references/sending/email-management.md +14 -4
- package/dist/global-skills/resend/references/topics.md +9 -6
- package/dist/global-skills/resend/references/usage.md +117 -0
- package/dist/global-skills/resend/references/webhooks.md +59 -2
- package/dist/global-skills/stripe-best-practices/SKILL.md +35 -29
- package/dist/global-skills/stripe-best-practices/references/billing.md +9 -2
- package/dist/global-skills/stripe-best-practices/references/payments.md +4 -2
- package/dist/global-skills/stripe-best-practices/references/security.md +3 -1
- package/dist/global-skills/stripe-best-practices/references/tax.md +39 -20
- package/dist/global-skills/supabase/SKILL.md +6 -0
- package/dist/global-skills/use-railway/SKILL.md +42 -22
- package/dist/global-skills/use-railway/references/analyze-db.md +7 -6
- package/dist/global-skills/use-railway/references/cloud-agents.md +70 -0
- package/dist/global-skills/use-railway/references/configure.md +17 -2
- package/dist/global-skills/use-railway/references/databases.md +107 -0
- package/dist/global-skills/use-railway/references/deploy.md +5 -5
- package/dist/global-skills/use-railway/references/feature-flags.md +25 -13
- package/dist/global-skills/use-railway/references/iac.md +66 -77
- package/dist/global-skills/use-railway/references/operate.md +26 -3
- package/dist/global-skills/use-railway/references/request.md +31 -23
- package/dist/global-skills/use-railway/references/setup.md +16 -5
- package/dist/global-skills/use-railway/references/tracing.md +261 -0
- package/dist/global-skills/use-railway/references/usage.md +52 -0
- package/dist/global-skills/validate-my-idea/SKILL.md +54 -0
- package/dist/global-skills/{feedback → vybekiit-feedback}/SKILL.md +16 -12
- package/dist/global-skills/watch-my-app/SKILL.md +53 -0
- package/dist/global-skills/workers-best-practices/SKILL.md +36 -103
- package/dist/global-skills/workers-best-practices/references/configuration.md +139 -0
- package/dist/global-skills/workers-best-practices/references/platform-apis.md +51 -0
- package/dist/global-skills/workers-best-practices/references/{rules.md → runtime-patterns.md} +13 -137
- package/dist/global-skills/wrangler/SKILL.md +48 -901
- package/dist/global-skills/xcode-project-setup/scripts/xcode_spm_setup/Sources/main.swift +19 -15
- package/package.json +9 -8
- package/dist/global-skills/expo-native-ui/references/animations.md +0 -220
- package/dist/global-skills/firebase-firestore/references/enterprise/security_rules.md +0 -577
- package/dist/global-skills/workers-best-practices/references/review.md +0 -174
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
name: use-railway
|
|
3
3
|
description: >
|
|
4
4
|
Operate Railway infrastructure: sign up for or sign in to a Railway account,
|
|
5
|
-
create projects, provision services and
|
|
6
|
-
|
|
5
|
+
create projects, provision services, databases, and buckets, deploy code,
|
|
6
|
+
configure infrastructure as code, environments and variables, manage domains,
|
|
7
|
+
trace requests with OpenTelemetry,
|
|
7
8
|
troubleshoot failures, check status and metrics, manage feature flags,
|
|
8
|
-
|
|
9
|
+
database recovery and HA, cloud agents, usage limits, and Railway agent tooling.
|
|
10
|
+
Use this skill whenever
|
|
9
11
|
the user mentions Railway, feature flags, flag rollout, targeting rules,
|
|
10
12
|
signing up, creating an account, registering, logging in, deployments,
|
|
11
|
-
services, environments, buckets, object storage,
|
|
13
|
+
services, environments, buckets, object storage, tracing, traces, spans,
|
|
14
|
+
OpenTelemetry, OTLP, build failures, agent setup,
|
|
12
15
|
MCP, or infrastructure operations, even if they don't say "Railway" explicitly.
|
|
13
16
|
Also invoke this skill when the user asks to be signed up, registered, or
|
|
14
17
|
onboarded to Railway: do not refuse — drive them through the unauthed
|
|
@@ -37,14 +40,16 @@ Most CLI commands operate on the linked project/environment/service context. Use
|
|
|
37
40
|
Railway has three agent-facing operation paths. Choose the path that matches the job:
|
|
38
41
|
|
|
39
42
|
- **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.
|
|
40
|
-
- **Remote MCP** (`https://mcp.railway.com`): default plugin MCP path for account/project/service 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.
|
|
41
|
-
- **GraphQL
|
|
43
|
+
- **Remote MCP** (`https://mcp.railway.com`): default plugin MCP path for account/project/service discovery, deployment state, bounded logs, traces, 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.
|
|
44
|
+
- **GraphQL through `railway api`**: operations without a dedicated MCP tool or CLI command. Use schema search and inspection before constructing unfamiliar queries.
|
|
42
45
|
|
|
43
46
|
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.
|
|
44
47
|
|
|
45
|
-
|
|
48
|
+
On a Railway cloud agent VM the `railway` CLI only has credentials inside an SSH terminal session. In a dashboard or mobile chat session (Railway Agent) it is unauthenticated by design: do not run `railway` commands there, not even reads or `railway api`. The `railway` MCP server is authenticated in every session, so use its tools, resolve IDs with `list-services` instead of `railway status --json`, and when no tool covers the job say so and ask the user to make the change in the dashboard.
|
|
46
49
|
|
|
47
|
-
|
|
50
|
+
Optional: an already configured in-process CLI MCP (`railway mcp local`) can supply operations not available through hosted MCP. A bare `railway mcp` now starts the hosted MCP proxy using CLI authentication; it is not the in-process server. Published plugin configs connect directly to hosted MCP with editor OAuth.
|
|
51
|
+
|
|
52
|
+
Prefer `railway api` (CLI 5.28+) for GraphQL execution. The legacy `scripts/railway-api.sh` remains a compatibility fallback for older CLIs; see [request.md](references/request.md).
|
|
48
53
|
|
|
49
54
|
## Parsing Railway URLs
|
|
50
55
|
|
|
@@ -58,13 +63,13 @@ https://railway.com/project/<PROJECT_ID>/service/<SERVICE_ID>
|
|
|
58
63
|
The 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:
|
|
59
64
|
|
|
60
65
|
```bash
|
|
61
|
-
|
|
66
|
+
railway api \
|
|
62
67
|
'query getProject($id: String!) {
|
|
63
68
|
project(id: $id) {
|
|
64
69
|
environments { edges { node { id name } } }
|
|
65
70
|
}
|
|
66
71
|
}' \
|
|
67
|
-
'{"id": "<PROJECT_ID>"}'
|
|
72
|
+
--variables '{"id": "<PROJECT_ID>"}'
|
|
68
73
|
```
|
|
69
74
|
|
|
70
75
|
Match the environment name (case-insensitive) to get the `environmentId`.
|
|
@@ -99,7 +104,7 @@ Before any mutation, verify the tool path and context:
|
|
|
99
104
|
|
|
100
105
|
```bash
|
|
101
106
|
command -v railway # CLI installed
|
|
102
|
-
RAILWAY_CALLER="skill:use-railway@1.
|
|
107
|
+
RAILWAY_CALLER="skill:use-railway@1.5.5" RAILWAY_AGENT_SESSION="railway-skill-$(date +%s)-$$" railway whoami --json
|
|
103
108
|
railway --version # check CLI version
|
|
104
109
|
```
|
|
105
110
|
|
|
@@ -123,7 +128,7 @@ Check once per session and don't re-run it after acting; the restart prompt to t
|
|
|
123
128
|
|
|
124
129
|
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.
|
|
125
130
|
|
|
126
|
-
For Railway CLI calls made while this skill is active, prefix the command with `RAILWAY_CALLER=skill:use-railway@1.
|
|
131
|
+
For Railway CLI calls made while this skill is active, prefix the command with `RAILWAY_CALLER=skill:use-railway@1.5.5` 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.
|
|
127
132
|
|
|
128
133
|
**Context resolution - URL IDs always win:**
|
|
129
134
|
- 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.
|
|
@@ -205,6 +210,8 @@ The browser transport needs none of this — the CLI opens the browser on the us
|
|
|
205
210
|
|
|
206
211
|
When you see `code: NOT_AUTHENTICATED`, authenticate the user with `railway login`, then retry the original command.
|
|
207
212
|
|
|
213
|
+
`OAUTH_INSUFFICIENT_GRANT` is different: the session is valid but lacks access to the resource. Check IDs, workspace membership, and the integration's grant scope instead of looping through login; see [operate.md](references/operate.md).
|
|
214
|
+
|
|
208
215
|
**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.
|
|
209
216
|
|
|
210
217
|
## Agent tooling
|
|
@@ -216,7 +223,7 @@ Set up Railway skills, MCP, and authentication with:
|
|
|
216
223
|
```bash
|
|
217
224
|
railway setup agent
|
|
218
225
|
railway setup agent -y
|
|
219
|
-
railway setup agent --
|
|
226
|
+
railway setup agent --oauth
|
|
220
227
|
```
|
|
221
228
|
|
|
222
229
|
`railway setup agent -y` skips the interactive login flow. If the user isn't authenticated after setup, run `railway login`.
|
|
@@ -224,15 +231,23 @@ railway setup agent --remote
|
|
|
224
231
|
Install or update MCP and skills directly when the user names a target tool:
|
|
225
232
|
|
|
226
233
|
```bash
|
|
227
|
-
railway mcp install
|
|
228
|
-
railway mcp install --agent codex --
|
|
229
|
-
railway mcp install --agent cursor --
|
|
234
|
+
railway mcp install # hosted MCP via CLI login
|
|
235
|
+
railway mcp install --agent codex --oauth # direct HTTP, editor OAuth
|
|
236
|
+
railway mcp install --agent cursor --oauth
|
|
230
237
|
railway skills
|
|
231
238
|
railway skills update --agent codex
|
|
232
239
|
railway skills remove --agent cursor
|
|
233
240
|
```
|
|
234
241
|
|
|
235
|
-
Supported targets include `claude-code`, `cursor`, `codex`, `opencode`, `copilot`, and `factory-droid`.
|
|
242
|
+
Supported targets include `claude-code`, `cursor`, `codex`, `opencode`, `copilot`, and `factory-droid`.
|
|
243
|
+
|
|
244
|
+
| Install mode | Transport and authentication |
|
|
245
|
+
|---|---|
|
|
246
|
+
| Default / `--remote` | `railway mcp` stdio proxy to hosted MCP, authenticated by `railway login` |
|
|
247
|
+
| `--oauth` | Direct HTTP to `https://mcp.railway.com`, authenticated by editor OAuth; matches the published plugins |
|
|
248
|
+
| `--local` | In-process GraphQL-backed stdio server, invoked as `railway mcp local` |
|
|
249
|
+
|
|
250
|
+
These modes apply to both `mcp install` and `setup agent`; interactive setup offers a choice. `railway mcp proxy` remains an alias for the default proxy. The proxy may fill only a linked project ID when the tool accepts it and the call supplies no resource scope. Continue passing explicit project, environment, and service IDs for scoped work.
|
|
236
251
|
|
|
237
252
|
Use Railway Agent chat with:
|
|
238
253
|
|
|
@@ -272,7 +287,7 @@ railway bucket credentials --bucket <name> --json # S3-compatible credent
|
|
|
272
287
|
|
|
273
288
|
## Routing
|
|
274
289
|
|
|
275
|
-
For anything beyond quick operations, load the
|
|
290
|
+
For anything beyond quick operations, load the references needed for the user's intent. Most requests need one or two; compose more when the workflow crosses areas.
|
|
276
291
|
|
|
277
292
|
| Intent | Reference | Use for |
|
|
278
293
|
|---|---|---|
|
|
@@ -280,9 +295,13 @@ For anything beyond quick operations, load the reference that matches the user's
|
|
|
280
295
|
| Create or connect resources | [setup.md](references/setup.md) | Projects, services, databases, buckets, templates, workspaces |
|
|
281
296
|
| Ship code or manage releases | [deploy.md](references/deploy.md) | Deploy, redeploy, restart, build config, monorepo, Dockerfile |
|
|
282
297
|
| Change configuration | [configure.md](references/configure.md) | Environments, variables, config patches, domains, networking |
|
|
283
|
-
| Manage feature flags | [feature-flags.md](references/feature-flags.md) |
|
|
284
|
-
| Define configuration in source control ("IaC", "infrastructure as code", "config as code", `.railway/railway.ts`,
|
|
298
|
+
| Manage feature flags | [feature-flags.md](references/feature-flags.md) | MCP registry operations; CLI targeting rules and rollouts; SDK runtime reads |
|
|
299
|
+
| Define configuration in source control ("IaC", "infrastructure as code", "config as code", `.railway/railway.ts`, `.railway/railway.py`, `.railway/railway.go`, "config migrate/plan/apply/pull") | [iac.md](references/iac.md) | Author/import IaC, migrate legacy JSON/TOML, save and apply reviewed plans, check drift |
|
|
300
|
+
| Manage databases ("PITR", "restore", "backup", "HA", "failover", "switchover", "PgBouncer", "connection pooling") | [databases.md](references/databases.md) | Postgres recovery, HA and pooling; MySQL/Redis HA; use analysis references for performance investigations |
|
|
301
|
+
| Inspect costs or manage spending limits | [usage.md](references/usage.md) | Workspace/project/service usage, billing periods, workspace and Railway Agent limits |
|
|
302
|
+
| Run a coding agent on Railway ("cloud agent", "railway ca", "railway code", "desktop SSH") | [cloud-agents.md](references/cloud-agents.md) | Provision, connect, wake, sleep, delete, or configure desktop access to cloud agent VMs |
|
|
285
303
|
| Check health or debug failures | [operate.md](references/operate.md) | Status, logs, metrics, build/runtime triage, recovery |
|
|
304
|
+
| Trace requests across services ("tracing", "traces", "trace ID", "spans", "OpenTelemetry", "OTel", "OTLP", "instrument my app", "instrument my function", "Bun function", "auto-instrumentation") | [tracing.md](references/tracing.md) | Enable tracing per project or service with the `get-tracing` / `set-service-tracing` / `set-project-tracing` MCP tools or `railway trace enable`, SDK instrumentation (preferred) vs automatic (eBPF), what to instrument, instrumenting a Function (Bun), the provided `OTEL_*` variables, sampling, reading traces with the `list-traces` / `get-trace` MCP tools or `railway trace list` / `get`, the Traces tab |
|
|
286
305
|
| Use a sandbox or build remotely ("sandbox", "scratch environment", "ephemeral box", "build remotely", "remote build", "run this remotely", "checkpoint", "snapshot/save/restore sandbox state") | [sandbox.md](references/sandbox.md) | Create/fork sandboxes, run commands remotely, remote template builds, checkpoints (save/restore sandbox state), port forwarding, teardown. Requires Sandboxes enabled in Priority Boarding — if unavailable, prompt the user to enable it. |
|
|
287
306
|
| Request from API, docs, or community | [request.md](references/request.md) | Railway GraphQL API queries/mutations, metrics queries, Central Station, official docs |
|
|
288
307
|
|
|
@@ -293,12 +312,12 @@ If the request spans two areas (for example, "deploy and then check if it's heal
|
|
|
293
312
|
1. Use Railway CLI for workflows that need the current repo, local shell, SSH, database scripts, local Railway context, or exact command output.
|
|
294
313
|
2. Use Remote MCP for OAuth-scoped platform operations that match an available MCP tool and do not need local files or CLI state.
|
|
295
314
|
3. 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.
|
|
296
|
-
4.
|
|
315
|
+
4. Use `railway api` for operations without a dedicated MCP tool or CLI command; retain the legacy helper only for CLI compatibility.
|
|
297
316
|
5. Use `--json` output where available for reliable parsing.
|
|
298
317
|
6. Resolve context before mutation. Know which project, environment, and service you're acting on.
|
|
299
318
|
7. For destructive actions (delete service, remove deployment, drop database), confirm intent and state impact before executing.
|
|
300
319
|
8. After mutations, verify the result with a read-back command or MCP read.
|
|
301
|
-
9. **Never report a deploy as successful without observing
|
|
320
|
+
9. **Never report a deploy as successful without observing SUCCESS for that deployment.** `up --detach`, a non-TTY `up` without CI mode, or a timed-out stream may return after upload. Follow the deployment ID from the upload in `railway deployment list --json` with the same project/environment/service scope; do not substitute a concurrent newer deployment. If status is `FAILED` or `CRASHED`, triage per [operate.md](references/operate.md). If status is `NEEDS_APPROVAL`, `SLEEPING`, `SKIPPED`, `REMOVED`, `REMOVING`, or unknown, report that state and the next action. Exit 0 alone is insufficient; see [deploy.md](references/deploy.md) for CI streaming and polling.
|
|
302
321
|
|
|
303
322
|
## User-only commands (NEVER execute directly)
|
|
304
323
|
|
|
@@ -327,6 +346,7 @@ Multi-step workflows follow natural chains:
|
|
|
327
346
|
- **First deploy**: setup (create project + service), configure (set variables and source), deploy, operate (verify healthy)
|
|
328
347
|
- **Fix a failure**: operate (triage logs), configure (fix config/variables), deploy (redeploy), operate (verify recovery)
|
|
329
348
|
- **Add a domain**: configure (add domain + set port), operate (verify DNS and service health)
|
|
349
|
+
- **Add tracing**: tracing (enable for the project or service with `set-project-tracing` / `set-service-tracing` or `railway trace enable`, prefer SDK instrumentation over automatic, add spans around inbound work, I/O and logical units; for a Function, edit its file with `get-function-source-code` / `update-function-source-code`), configure (set `OTEL_METRICS_EXPORTER`/`OTEL_LOGS_EXPORTER`, start command), deploy (redeploy so the `OTEL_*` variables land), tracing (verify with `x-railway-trace-id` and `get-trace` or `railway trace get`)
|
|
330
350
|
- **Docs to action**: request (fetch docs answer), route to the relevant operational reference
|
|
331
351
|
|
|
332
352
|
When composing, return one unified response covering all steps. Don't ask the user to invoke each step separately.
|
|
@@ -31,14 +31,14 @@ https://railway.com/project/<PROJECT_ID>/service/<SERVICE_ID>/database?environme
|
|
|
31
31
|
Then query the API for the service name and database type in a **single call**:
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
|
|
34
|
+
railway api \
|
|
35
35
|
'query getServiceAndConfig($serviceId: String!, $environmentId: String!) {
|
|
36
36
|
service(id: $serviceId) { name }
|
|
37
37
|
environment(id: $environmentId) {
|
|
38
38
|
config(decryptVariables: false)
|
|
39
39
|
}
|
|
40
40
|
}' \
|
|
41
|
-
'{"serviceId": "<SERVICE_ID>", "environmentId": "<ENV_ID>"}'
|
|
41
|
+
--variables '{"serviceId": "<SERVICE_ID>", "environmentId": "<ENV_ID>"}'
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
From the response, get:
|
|
@@ -57,9 +57,9 @@ Then match the image to the database type:
|
|
|
57
57
|
**If `environmentId` is empty in the URL** (e.g., `?environmentId=` or no query param at all), skip the `environment.config` query — it requires a valid ID. Instead, list the project's environments:
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
|
|
60
|
+
railway api \
|
|
61
61
|
'query getEnvs($id: String!) { project(id: $id) { environments { edges { node { id name } } } } }' \
|
|
62
|
-
'{"id": "<PROJECT_ID>"}'
|
|
62
|
+
--variables '{"id": "<PROJECT_ID>"}'
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
Use the `production` environment by default. If multiple non-PR environments exist and the user hasn't specified one, ask which environment to analyze.
|
|
@@ -257,13 +257,13 @@ All three IDs come from the URL (see "Context: URL First" above). The service na
|
|
|
257
257
|
If the URL has no `environmentId` and the user specifies an environment by name (e.g., "production"), resolve it:
|
|
258
258
|
|
|
259
259
|
```bash
|
|
260
|
-
|
|
260
|
+
railway api \
|
|
261
261
|
'query getProject($id: String!) {
|
|
262
262
|
project(id: $id) {
|
|
263
263
|
environments { edges { node { id name } } }
|
|
264
264
|
}
|
|
265
265
|
}' \
|
|
266
|
-
'{"id": "<PROJECT_ID>"}'
|
|
266
|
+
--variables '{"id": "<PROJECT_ID>"}'
|
|
267
267
|
```
|
|
268
268
|
|
|
269
269
|
Match the environment name (case-insensitive) to get the `environmentId`.
|
|
@@ -342,3 +342,4 @@ Railway services auto-scale CPU, RAM, and disk based on actual usage. Users do N
|
|
|
342
342
|
|
|
343
343
|
- Docs: [ssh.md](https://docs.railway.com/cli/ssh), [logs.md](https://docs.railway.com/cli/logs), [metrics.md](https://docs.railway.com/cli/metrics), [api docs](https://docs.railway.com/api/llms-docs.md)
|
|
344
344
|
- Local scripts: [analyze-postgres.py](../scripts/analyze-postgres.py), [analyze-mysql.py](../scripts/analyze-mysql.py), [analyze-redis.py](../scripts/analyze-redis.py), [analyze-mongo.py](../scripts/analyze-mongo.py), [dal.py](../scripts/dal.py)
|
|
345
|
+
- API command: [api.rs (v5.49.1)](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/api.rs)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Cloud agents
|
|
2
|
+
|
|
3
|
+
Use `railway ca` / `railway code` to run coding harnesses on persistent Railway cloud agent VMs. Use `railway agent` for Railway Agent chat/investigations, and [sandbox.md](sandbox.md) for sandbox execution, builds, and checkpoints.
|
|
4
|
+
|
|
5
|
+
## Availability and target
|
|
6
|
+
|
|
7
|
+
Cloud agents arrived in CLI 5.32; flat lifecycle commands in 5.35 and desktop setup in 5.38. They are experimental and require **Cloud Agents** enabled in [Priority Boarding](https://railway.com/account/feature-flags). A feature-availability error calls for enabling that feature, not repeatedly provisioning VMs or changing project feature flags.
|
|
8
|
+
|
|
9
|
+
Use explicit project and environment for creation. A directory's `railway link` context takes precedence over the saved default project; a stale link can fall back to the saved default. Verify the target rather than assuming the saved preference wins. Interactive `ca` can run login and continue; noninteractive unauthenticated calls fail instead of waiting on an unattended device code.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
railway ca setup --show
|
|
13
|
+
railway ca list --json
|
|
14
|
+
railway ca list --project <project-id> --environment <env> --json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Bare `list` finds the user's agents across projects. `--all` includes other members' agents and requires an explicit environment. Address an existing agent by name or ID; an omitted identifier uses the directory's agent or the sole candidate, otherwise the CLI reports candidates.
|
|
18
|
+
|
|
19
|
+
## Create, launch, and connect
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
railway ca create my-agent --project <project-id> --environment <env> --json
|
|
23
|
+
railway ca create my-agent --project <project-id> --environment <env> --env-file .env.agent --json
|
|
24
|
+
railway ca ssh my-agent
|
|
25
|
+
railway ca ssh my-agent -- bash
|
|
26
|
+
railway ca start --codex --project <project-id> --environment <env>
|
|
27
|
+
railway ca start --railway --project <project-id> --environment <env>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Choose one creation command with the needed options. `create` provisions a VM without attaching; `ssh` connects to an existing VM and does not create one for a mistyped name. `start` can create and launch a harness, skipping the TUI. Harness flags are `--codex`, `--claude`, `--grok`, and `--railway`; the first three carry or mint a local sign-in, while `--railway` launches Railway's own agent with credentials already on the VM and needs no local sign-in, which suits unattended workflows. `--no-wait` on create/wake means requested, not ready: reread `ca list --json` before reporting readiness. Environment files and `--variable` inputs configure the agent VM; pass only values needed for the remote task.
|
|
31
|
+
|
|
32
|
+
For a human terminal, bare `railway ca` opens the management TUI and `railway code` opens a session-focused view. Automated workflows should use explicit lifecycle commands rather than attempting to control that TUI. `ca setup` configures the default harness and skills; `ca setup --show` inspects preferences and `ca setup --reset` removes them when requested. Launching can carry harness authentication and skills from the local machine, so choose the harness and remote target deliberately.
|
|
33
|
+
|
|
34
|
+
## Credentials inside the VM
|
|
35
|
+
|
|
36
|
+
The VM ships the `railway` CLI, the `gh` CLI and the `railway` MCP server. The MCP server is authenticated in every session. The `railway` CLI is authenticated only inside an SSH terminal session (`railway ca ssh`, `railway code`, desktop SSH), which injects the user's token; a chat session started from the Railway dashboard or mobile app carries no CLI credential, by design. An agent working in such a session must not run `railway` commands, `railway api` included, and should use the MCP tools instead. `railway login` and `railway link` never help on the VM and fail in its non-interactive shell.
|
|
37
|
+
|
|
38
|
+
## Sleep, wake, and delete
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
railway ca wake my-agent
|
|
42
|
+
railway ca sleep my-agent
|
|
43
|
+
railway ca delete my-agent
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Sleep stops compute while retaining the disk; deletion removes the agent and its disk. Use sleep when the user wants to pause work and keep files. `sleep --all` acts across the user's running agents unless narrowed by environment; use it only when that broader scope was requested. Check `list --json` after lifecycle mutations. Do not mistake a disconnected harness session for a deleted VM.
|
|
47
|
+
|
|
48
|
+
## Desktop SSH setup
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
railway ca desktop --codex --agent my-agent --dry-run
|
|
52
|
+
railway ca desktop --codex --agent my-agent
|
|
53
|
+
railway ca desktop --claude --agent my-agent
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Choose the requested app; both flags can configure both on the same VM. The dry-run previews configuration. Actual setup prepares the remote harness and writes an OpenSSH entry; Claude setup also writes its desktop settings. Omitting `--agent` can create an agent when none exists. `--dir /app/api` selects the remote working directory. Restart the desktop app after setup.
|
|
57
|
+
|
|
58
|
+
A desktop app cannot wake a sleeping agent through the relay: run `railway ca wake <name>` before connecting. To undo the local integration, use `railway ca desktop --codex --agent my-agent --remove` (or `--claude`); removing desktop configuration is distinct from deleting the VM.
|
|
59
|
+
|
|
60
|
+
## Troubleshoot
|
|
61
|
+
|
|
62
|
+
- **Wrong project**: inspect the directory link and `ca setup --show`, then use explicit scope.
|
|
63
|
+
- **Access blocked**: check Cloud Agents in Priority Boarding; project feature flags do not enable it.
|
|
64
|
+
- **Desktop cannot connect**: confirm the agent is awake, inspect the generated SSH host, and check CLI SSH access before rerunning setup.
|
|
65
|
+
- **Session ended unexpectedly**: inspect `ca list` and reconnect to the existing agent before creating another VM.
|
|
66
|
+
|
|
67
|
+
## Validated against
|
|
68
|
+
|
|
69
|
+
- Docs: [Cloud agent CLI](https://docs.railway.com/cli/ca), [Code CLI](https://docs.railway.com/cli/code)
|
|
70
|
+
- CLI source (v5.49.1): [cloud_agent/mod.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/cloud_agent/mod.rs), [lifecycle.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/cloud_agent/lifecycle.rs), [desktop.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/cloud_agent/desktop.rs), [setup.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/cloud_agent/setup.rs), [access.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/cloud_agent/access.rs)
|
|
@@ -34,6 +34,21 @@ railway variable delete KEY --service <service> --environment <env>
|
|
|
34
34
|
|
|
35
35
|
Variable changes trigger a redeployment by default. This is usually the desired behavior, since the service picks up the values on restart. Use `--skip-deploys` only when you plan to redeploy or restart separately.
|
|
36
36
|
|
|
37
|
+
CLI 5.34.2+ accepts an empty assignment such as `railway variable set OPTIONAL_VALUE= --service <service>`. Empty is a value, not a deletion. Before an idempotent delete, list keys and delete only if present.
|
|
38
|
+
|
|
39
|
+
### Bulk edit with a reviewed diff
|
|
40
|
+
|
|
41
|
+
CLI 5.48+ opens an editor and presents the changes before applying:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
railway variable edit --project <project-id> --environment <env> --service <service>
|
|
45
|
+
railway variable edit --demo # offline fixture; no Railway mutation
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
This workflow requires a TTY or an explicitly configured `$EDITOR`/`$VISUAL`. Prefer `set`/`delete` for deterministic agent edits when no editor workflow was requested. Saving the editor is not approval: the CLI shows a redacted diff and asks before applying. Noninteractive apply requires `--yes`; deletions in agent or noninteractive sessions also require `--confirm-destructive`, within the user's approved scope.
|
|
49
|
+
|
|
50
|
+
Removing a line deletes that variable. Keep `<sealed>` placeholders unchanged to preserve sealed values. Railway-provided variables are comments and cannot be edited. `--reveal` exposes plaintext in the diff; use only when intended. `--skip-deploys` commits changes without triggering deploys.
|
|
51
|
+
|
|
37
52
|
### Set sensitive values
|
|
38
53
|
|
|
39
54
|
Use stdin for secrets or values that shouldn't appear in shell history:
|
|
@@ -128,7 +143,7 @@ These are set automatically at runtime. Availability depends on resource configu
|
|
|
128
143
|
| `RAILWAY_VOLUME_MOUNT_PATH` | Filesystem path where the volume is mounted |
|
|
129
144
|
| `RAILWAY_VOLUME_NAME` | Name of the attached volume |
|
|
130
145
|
|
|
131
|
-
Sealed variables are write-only.
|
|
146
|
+
Sealed variables are write-only. CLI 5.47.2+ lists their names with `null` in JSON, `<sealed>` in the table, or a comment in KV output. **A null value means the sealed key already exists; do not recreate or clear it as though it were missing.** Ordinary variable output can contain plaintext secrets.
|
|
132
147
|
|
|
133
148
|
## Service config
|
|
134
149
|
|
|
@@ -356,4 +371,4 @@ While active, browser visitors must pass a check. Non-browser API clients and we
|
|
|
356
371
|
## Validated against
|
|
357
372
|
|
|
358
373
|
- Docs: [environment.md](https://docs.railway.com/cli/environment), [variable.md](https://docs.railway.com/cli/variable), [domain.md](https://docs.railway.com/cli/domain), [tcp-proxy.md](https://docs.railway.com/cli/tcp-proxy), [private-network.md](https://docs.railway.com/cli/private-network), [outbound-network.md](https://docs.railway.com/cli/outbound-network), [cdn.md](https://docs.railway.com/cli/cdn), [waf.md](https://docs.railway.com/cli/waf)
|
|
359
|
-
- CLI source: [environment/mod.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/environment/mod.rs), [environment/edit.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/environment/edit.rs), [variable.rs](https://github.com/railwayapp/cli/blob/v5.
|
|
374
|
+
- CLI source: [environment/mod.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/environment/mod.rs), [environment/edit.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/environment/edit.rs), [variable.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/variable.rs), [domain.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/domain.rs), [tcp_proxy.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/tcp_proxy.rs), [private_network.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/private_network.rs), [outbound_networking.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/outbound_networking.rs), [cdn.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/cdn.rs), [waf.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/waf.rs)
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Database operations
|
|
2
|
+
|
|
3
|
+
Use native CLI commands for database recovery, high availability, and connection pooling. Use [analyze-db.md](analyze-db.md) for performance analysis and [setup.md](setup.md) to create a database or connect a local client.
|
|
4
|
+
|
|
5
|
+
## Choose the engine and scope
|
|
6
|
+
|
|
7
|
+
| Engine | Commands |
|
|
8
|
+
|---|---|
|
|
9
|
+
| Postgres | `railway postgres pitr`, `ha`, `pgbouncer`, `history` |
|
|
10
|
+
| MySQL | `railway mysql ha`, `history` |
|
|
11
|
+
| Redis | `railway redis ha`, `history` |
|
|
12
|
+
|
|
13
|
+
Postgres operations arrived in CLI 5.33; MySQL/Redis HA in 5.46. Use **5.47.1 or newer for HA mutations**: that release added the revert and scaling fixes (staged member changes, never deleting the acting primary) and `--remove-orphans`. MySQL/Redis do not expose PITR or PgBouncer commands. Availability and image eligibility also depend on Railway's engine templates; a command existing does not make every custom database image eligible.
|
|
14
|
+
|
|
15
|
+
All these command trees accept `--project`, `--environment`, `--service`, and `--json`. Resolve the database service and environment first, especially when the supplied URL points at a replica or proxy. Use explicit IDs for cross-project work:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
railway postgres pitr status --project <project-id> --environment <env> --service <service> --json
|
|
19
|
+
railway postgres ha status --project <project-id> --environment <env> --service <service> --json
|
|
20
|
+
railway postgres pgbouncer status --project <project-id> --environment <env> --service <service> --json
|
|
21
|
+
railway mysql ha status --project <project-id> --environment <env> --service <service> --json
|
|
22
|
+
railway redis ha status --project <project-id> --environment <env> --service <service> --json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The following examples abbreviate scope to `--service`; retain the resolved project and environment in actual calls. Config-changing actions deploy by default. Where supported, `--no-deploy` commits config but defers its runtime effect until the affected services deploy; it is not a dry-run. Use it only when deployment is deliberately deferred. Add `--yes` only for a mutation whose scope and impact the user authorized, and only where the command supports it.
|
|
26
|
+
|
|
27
|
+
## Postgres point-in-time recovery
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
railway postgres pitr status --service <postgres> --json
|
|
31
|
+
railway postgres pitr enable --service <postgres>
|
|
32
|
+
railway postgres pitr disable --service <postgres>
|
|
33
|
+
railway postgres pitr progress --service <postgres> --json
|
|
34
|
+
railway postgres pitr progress --service <postgres> --watch
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`enable`/`disable` recognize a standalone database or an HA cluster root. Standalone operations support `--no-deploy`; HA enable/disable runs a live rolling workflow. `progress`, `cancel`, and `clear` apply only to that HA workflow. Inspect progress before canceling a stuck workflow; clear a completed snapshot only when intended. Bound a watch process and report its last observed phase if it times out.
|
|
38
|
+
|
|
39
|
+
Status includes a best-effort SSH probe of archive coverage and archiver health. `unavailable` or unknown probe results do not mean backups are disabled or healthy. Resolve SSH reachability or report the missing evidence.
|
|
40
|
+
|
|
41
|
+
To restore to a separate service:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
railway postgres pitr restore --service <postgres> --at 2026-09-04T10:00:00Z --new-service-name postgres-restored
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Use an explicit UTC timestamp to avoid local-time ambiguity. Relative offsets such as `30m` are also accepted. Check available coverage first, then verify the restored service's deployment and data before changing application connection variables. `--source-repo-path` selects an archive history when needed. Creating a restored service does not itself switch application traffic.
|
|
48
|
+
|
|
49
|
+
### Backups and schedules
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
railway postgres pitr backup list --service <postgres> --json
|
|
53
|
+
railway postgres pitr backup create --service <postgres> --name pre-migration
|
|
54
|
+
railway postgres pitr backup lock <backup-id> --service <postgres>
|
|
55
|
+
railway postgres pitr schedule list --service <postgres> --json
|
|
56
|
+
railway postgres pitr schedule set --daily --weekly --service <postgres>
|
|
57
|
+
railway postgres pitr backup restore <backup-id> --service <postgres>
|
|
58
|
+
railway postgres pitr backup delete <backup-id> --service <postgres>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
`backup restore` overwrites the current data; it is different from `pitr restore`, which creates a new service. In-place backup restore on an HA cluster is rejected because replicas would diverge; use the dashboard workflow that reseeds replicas. Do not bypass the guard by restoring the root volume manually. `backup lock` keeps a backup indefinitely. `schedule set --none` removes automatic schedules while keeping existing backups. Verify the backup ID, target, and destructive impact before restore/delete.
|
|
62
|
+
|
|
63
|
+
## High availability
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
railway postgres ha convert --service <postgres> --replicas 2 --coordinators 3 --edge 1
|
|
67
|
+
railway postgres ha scale --service <postgres> --replicas 3
|
|
68
|
+
railway postgres ha switchover --service <postgres> --to <replica-name-or-id>
|
|
69
|
+
railway postgres ha revert --service <postgres>
|
|
70
|
+
railway mysql ha convert --service <mysql> --replicas 2
|
|
71
|
+
railway mysql ha scale --service <mysql> --replicas 4
|
|
72
|
+
railway redis ha convert --service <redis> --replicas 2
|
|
73
|
+
railway redis ha switchover --service <redis> --to <replica-name-or-id>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`--replicas` counts replicas **excluding the primary**. Omitted conversion counts preserve the template defaults. MySQL and Redis carry consensus on their data nodes: total data nodes must be odd and at least three, so pass an even replica count such as 2 or 4. These conversions require a source image tagged with an exact major.minor version. Separate `--coordinators` applies only to templates with that tier; its count must be odd. Follow the template's reported constraints rather than copying a Postgres topology to another engine.
|
|
77
|
+
|
|
78
|
+
Before scaling or switching, inspect live member roles and probe errors. Switchover requires a reachable eligible target and may briefly interrupt connections. After conversion/scale/switchover, reread HA status and verify primary role, replica health, and application connectivity; a committed config alone is not evidence that replication is healthy.
|
|
79
|
+
|
|
80
|
+
Revert returns the database to standalone and removes cluster members. Current CLI fixes protect the acting primary and retain the independent PgBouncer pooler. `--remove-orphans` is a separate cleanup opt-in: orphaned members may no longer identify which same-engine cluster owned them. Do not add it merely to make a retry succeed. If an operation fails midway, inspect current config, live roles, and history before retrying or cleaning up.
|
|
81
|
+
|
|
82
|
+
## Postgres connection pooling
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
railway postgres pgbouncer status --service <postgres> --json
|
|
86
|
+
railway postgres pgbouncer add --service <postgres> --pool-mode transaction
|
|
87
|
+
railway postgres pgbouncer configure --service <postgres> --max-client-conn 200
|
|
88
|
+
railway postgres pgbouncer scale --service <postgres> --replicas 2
|
|
89
|
+
railway postgres pgbouncer remove --service <postgres>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Pooling works with standalone Postgres and HA roots. Modes are `transaction`, `session`, and `statement`; choose based on the application's session/transaction requirements. Check utilization and existing limits before changing connection counts. Verify the pooler's deployment and connection endpoint before wiring the app to it; removing the pooler requires restoring a suitable application connection path.
|
|
93
|
+
|
|
94
|
+
## Verify and investigate
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
railway postgres history --service <postgres> --limit 10 --json
|
|
98
|
+
railway mysql history --service <mysql> --limit 10 --json
|
|
99
|
+
railway redis history --service <redis> --limit 10 --json
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
History is a **local** operation trail, not a complete account audit log. Pair it with fresh native status, scoped deployment status, and logs. Do not infer that no changes happened just because this machine has no history. Follow [operate.md](operate.md) for deployment/log triage and [analyze-db.md](analyze-db.md) for deeper queries.
|
|
103
|
+
|
|
104
|
+
## Validated against
|
|
105
|
+
|
|
106
|
+
- Docs: [Postgres CLI](https://docs.railway.com/cli/postgres)
|
|
107
|
+
- CLI source (v5.49.1): [postgres.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/postgres.rs), [mysql.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/mysql.rs), [redis.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/redis.rs), [pitr.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/database/pitr.rs), [ha.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/database/ha.rs), [pool.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/database/pool.rs), [ops_log.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/database/ops_log.rs)
|
|
@@ -10,11 +10,11 @@ Ship code, manage releases, and configure builds.
|
|
|
10
10
|
railway up --detach -m "<release summary>"
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
`--detach` (alias `--no-wait`) returns
|
|
13
|
+
`--detach` (alias `--no-wait`) returns after upload without waiting for the deployment. An existing-project `up` also returns after upload when stdout is not a TTY and neither `--ci`, `--json`, nor CI environment mode is active. Do not assume omitting `--detach` makes an agent invocation wait. Include `-m` with a release summary for auditability.
|
|
14
14
|
|
|
15
15
|
### Verify before reporting — `--detach` only means QUEUED
|
|
16
16
|
|
|
17
|
-
A detached `up`
|
|
17
|
+
A detached `up` confirms upload, not a successful deployment. Capture the deployment ID from the upload (`--detach --json` includes `deploymentId` for an authenticated deployment). Poll for that deployment's terminal state; do not mistake a concurrent newer deployment for the one just submitted:
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
20
|
railway deployment list --service <service> --environment <environment> --json # newest first; check .status
|
|
@@ -29,7 +29,7 @@ Poll with the same project, environment, and service scope used for `railway up`
|
|
|
29
29
|
- `FAILED` / `CRASHED` → do not report success. Pull scoped logs (`railway logs --service <service> --json --lines 100`) and triage per [operate.md](operate.md).
|
|
30
30
|
- `SLEEPING` / `SKIPPED` / `REMOVED` / `REMOVING` / unknown → do not report success. Report the exact state and inspect status/logs to decide the next action.
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Observe `SUCCESS` for the submitted deployment before claiming success. Exit 0 can mean upload returned early or watch patterns skipped the build. A timeout, ended stream, or transport error without a deployment verdict leaves the outcome unknown; poll the existing deployment before deciding whether a retry is necessary.
|
|
33
33
|
|
|
34
34
|
### Watch the build
|
|
35
35
|
|
|
@@ -37,7 +37,7 @@ A non-detached `railway up` streams to completion and its exit code is authorita
|
|
|
37
37
|
railway up --ci -m "<release summary>"
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
`--ci` streams build logs and
|
|
40
|
+
`--ci` streams build logs and waits for the deployment verdict; `--json` also enables CI behavior for authenticated deployments. On CLI 5.41+, failed build-log/status WebSocket connections fall back to HTTP status polling in CI mode. A log transport warning alone does not mean the deployment failed; let the verdict arrive or query its ID. Use a bounded process timeout because polling may outlive missing deployments or nonterminal states. `--ci` can exit 0 when no changed files match watch patterns, so report a skipped deployment accurately.
|
|
41
41
|
|
|
42
42
|
### Targeted deploy
|
|
43
43
|
|
|
@@ -222,4 +222,4 @@ railway environment edit --service-config <service> build.watchPatterns '["packa
|
|
|
222
222
|
## Validated against
|
|
223
223
|
|
|
224
224
|
- Docs: [up.md](https://docs.railway.com/cli/up), [deploying.md](https://docs.railway.com/cli/deploying), [deployment.md](https://docs.railway.com/cli/deployment), [redeploy.md](https://docs.railway.com/cli/redeploy), [service.md](https://docs.railway.com/cli/service), [down.md](https://docs.railway.com/cli/down), [railpack.md](https://docs.railway.com/builds/railpack), [monorepo.md](https://docs.railway.com/deployments/monorepo)
|
|
225
|
-
- CLI source: [up.rs](https://github.com/railwayapp/cli/blob/v5.
|
|
225
|
+
- CLI source: [up.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/up.rs), [deployment.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/deployment.rs), [down.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/down.rs), [redeploy.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/redeploy.rs), [restart.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/restart.rs), [service.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/service.rs)
|
|
@@ -35,30 +35,37 @@ List feature flags for project 6adb5ae3-0e3a-4ead-b42c-1fd36f217ffb
|
|
|
35
35
|
Set feature flag checkout-v2 on project 6adb5ae3-0e3a-4ead-b42c-1fd36f217ffb to true (bool)
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
For targeting rules and rollouts, use the dashboard
|
|
38
|
+
For targeting rules and rollouts, use the CLI commands below when MCP has no matching rule tool. The dashboard or GraphQL (`signalRuleSet`) remains a fallback.
|
|
39
39
|
|
|
40
|
-
## CLI
|
|
40
|
+
## CLI defaults, rules, and rollouts
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
CLI 5.24+ exposes `railway flag` (alias `railway flags`). Use `--scope project:<id>` for explicit targeting; `--project` is not a flag option. On 5.26.2+, omitted scope can come from the project token or linked project.
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
railway
|
|
46
|
-
railway flag list --
|
|
47
|
-
railway flag checkout-v2 true --
|
|
45
|
+
railway flag list --scope project:<project-id> --json
|
|
46
|
+
railway flag list --scope project:<project-id> --full
|
|
47
|
+
railway flag set checkout-v2 true --scope project:<project-id>
|
|
48
|
+
railway flag set theme blue --type string --scope project:<project-id>
|
|
49
|
+
railway flag set checkout-v2 true --scope project:<project-id> --when 'plan == "enterprise"' --rule-id enterprise
|
|
50
|
+
railway flag set checkout-v2 true --scope project:<project-id> --when 'bucket(key) < 0.25' --rule-id rollout-25
|
|
51
|
+
railway flag unset checkout-v2 --scope project:<project-id> --rule-id enterprise
|
|
52
|
+
railway flag delete checkout-v2 --scope project:<project-id>
|
|
48
53
|
```
|
|
49
54
|
|
|
50
|
-
|
|
55
|
+
`set` changes the default unless `--when` is supplied. Rules accept a CEL expression subset or raw JSON; `bucket(key)` gives deterministic percentage targeting using the evaluation context's key. Use a stable `--rule-id` when updating a rule, and list/read back the rules afterward. `unset` removes one rule; `delete` removes the entire flag. CLI mutations target project flags; do not assume workspace mutation support.
|
|
56
|
+
|
|
57
|
+
Types are inferred unless `--type bool|string|number|json` is given. `--force` permits replacing a flag's type and **clears its rules**; use it only when that replacement is intended.
|
|
51
58
|
|
|
52
59
|
## GraphQL fallback
|
|
53
60
|
|
|
54
|
-
|
|
61
|
+
For API operations beyond these commands, inspect the public GraphQL API (`signals`, `signalCreate`, `signalDefaultSet`, `signalRuleSet`, `signalDelete`) using [request.md](request.md). Owners use `project:<projectId>` or `workspace:<workspaceId>`; access remains subject to the API's scope and permission checks.
|
|
55
62
|
|
|
56
63
|
```bash
|
|
57
|
-
|
|
58
|
-
query projectSignals($owner: String!) {
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
64
|
+
railway api \
|
|
65
|
+
'query projectSignals($owner: String!) {
|
|
66
|
+
signals(owner: $owner) { name type default rules version }
|
|
67
|
+
}' \
|
|
68
|
+
--variables '{"owner":"project:<projectId>"}'
|
|
62
69
|
```
|
|
63
70
|
|
|
64
71
|
## Runtime SDK
|
|
@@ -87,3 +94,8 @@ Poll interval defaults are suitable for most apps; flags refresh when registry v
|
|
|
87
94
|
## Dashboard
|
|
88
95
|
|
|
89
96
|
Human-friendly CRUD: open the project → **Settings → Feature Flags**. Workspace-scoped flags appear in a read-only section when they exist.
|
|
97
|
+
|
|
98
|
+
## Validated against
|
|
99
|
+
|
|
100
|
+
- Docs: [Feature flags](https://docs.railway.com/feature-flags), [CLI flags](https://docs.railway.com/cli/flag)
|
|
101
|
+
- CLI source (v5.49.1): [flag.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/flag.rs), [signals.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/controllers/signals.rs)
|