vybekiit 0.7.25 → 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.
Files changed (247) hide show
  1. package/dist/bin.js +3891 -1301
  2. package/dist/global-skills/aws-cdk/SKILL.md +19 -5
  3. package/dist/global-skills/aws-cdk/references/fast-deployments.md +191 -0
  4. package/dist/global-skills/aws-cdk/references/troubleshooting-deployment.md +16 -0
  5. package/dist/global-skills/aws-cloudformation/SKILL.md +16 -26
  6. package/dist/global-skills/aws-cloudformation/references/check-cloudformation-template-compliance.script.md +7 -3
  7. package/dist/global-skills/aws-cloudformation/references/cloudformation-language-server.md +177 -0
  8. package/dist/global-skills/aws-cloudformation/references/cloudformation-pre-deploy-validation.script.md +8 -2
  9. package/dist/global-skills/aws-cloudformation/references/persist-template-context.script.md +5 -8
  10. package/dist/global-skills/aws-cloudformation/references/retrieve-template-context.script.md +1 -1
  11. package/dist/global-skills/aws-cloudformation/references/security-considerations.md +51 -0
  12. package/dist/global-skills/aws-cloudformation/references/troubleshoot-failed-stack.script.md +138 -0
  13. package/dist/global-skills/aws-cloudformation/references/{validate-cloudformation-template.script.md → validate-with-cfn-lint.script.md} +15 -27
  14. package/dist/global-skills/aws-cloudformation/references/validate-with-cloudformation-validate.script.md +181 -0
  15. package/dist/global-skills/aws-cloudformation/references/validation-tool-selection.md +44 -0
  16. package/dist/global-skills/aws-serverless/SKILL.md +9 -1
  17. package/dist/global-skills/aws-serverless/references/architecture.md +3 -1
  18. package/dist/global-skills/aws-serverless/references/lambda.md +3 -1
  19. package/dist/global-skills/aws-serverless/references/orchestration.md +1 -0
  20. package/dist/global-skills/better-auth-best-practices/SKILL.md +18 -8
  21. package/dist/global-skills/eas-app-stores/SKILL.md +31 -15
  22. package/dist/global-skills/eas-app-stores/agents/openai.yaml +2 -2
  23. package/dist/global-skills/eas-app-stores/references/ios-app-store.md +37 -32
  24. package/dist/global-skills/eas-app-stores/references/native-ios.md +167 -0
  25. package/dist/global-skills/eas-app-stores/references/play-store.md +3 -7
  26. package/dist/global-skills/eas-app-stores/references/testflight.md +39 -35
  27. package/dist/global-skills/eas-simulator/SKILL.md +48 -26
  28. package/dist/global-skills/eas-simulator/references/controllers.md +32 -3
  29. package/dist/global-skills/eas-simulator/references/run-your-app.md +34 -4
  30. package/dist/global-skills/eas-simulator/references/troubleshooting.md +8 -4
  31. package/dist/global-skills/eas-update/SKILL.md +146 -0
  32. package/dist/global-skills/eas-update/agents/openai.yaml +4 -0
  33. package/dist/global-skills/expo-animation/RECIPES.md +2 -2
  34. package/dist/global-skills/expo-animation/SKILL.md +9 -2
  35. package/dist/global-skills/expo-brownfield/SKILL.md +18 -11
  36. package/dist/global-skills/expo-brownfield/agents/openai.yaml +2 -2
  37. package/dist/global-skills/expo-brownfield/references/brownfield-integrated.md +94 -69
  38. package/dist/global-skills/expo-brownfield/references/brownfield-isolated.md +40 -42
  39. package/dist/global-skills/expo-brownfield/references/comparison.md +5 -5
  40. package/dist/global-skills/expo-brownfield/references/feature-integration.md +163 -0
  41. package/dist/global-skills/expo-brownfield/references/troubleshooting.md +17 -17
  42. package/dist/global-skills/expo-brownfield/references/version-compatibility.md +40 -0
  43. package/dist/global-skills/expo-data-fetching/SKILL.md +27 -6
  44. package/dist/global-skills/expo-design-system/SKILL.md +27 -7
  45. package/dist/global-skills/expo-design-system/references/audit.md +7 -2
  46. package/dist/global-skills/expo-design-system/references/native-slop.md +74 -0
  47. package/dist/global-skills/expo-examples/SKILL.md +0 -1
  48. package/dist/global-skills/expo-examples/references/catalog.md +1 -1
  49. package/dist/global-skills/expo-migrate-module/SKILL.md +21 -10
  50. package/dist/global-skills/expo-migrate-module/references/compatibility.md +80 -23
  51. package/dist/global-skills/expo-migrate-module/references/migration-map.md +162 -11
  52. package/dist/global-skills/expo-native-ui/SKILL.md +25 -16
  53. package/dist/global-skills/expo-native-ui/agents/openai.yaml +2 -2
  54. package/dist/global-skills/expo-native-ui/references/controls.md +5 -46
  55. package/dist/global-skills/expo-native-ui/references/icons.md +21 -2
  56. package/dist/global-skills/expo-native-ui/references/media.md +15 -20
  57. package/dist/global-skills/expo-native-ui/references/visual-effects.md +12 -11
  58. package/dist/global-skills/expo-overview/SKILL.md +17 -12
  59. package/dist/global-skills/expo-router/SKILL.md +5 -3
  60. package/dist/global-skills/expo-router/references/tabs.md +5 -5
  61. package/dist/global-skills/expo-skill-eval/scripts/check-static.sh +0 -0
  62. package/dist/global-skills/expo-skill-eval/scripts/clean-fixture.sh +0 -0
  63. package/dist/global-skills/expo-skill-eval/scripts/latest-sdk.sh +0 -0
  64. package/dist/global-skills/expo-skill-eval/scripts/make-fixture.sh +0 -0
  65. package/dist/global-skills/expo-skill-eval/scripts/make-workspace.sh +0 -0
  66. package/dist/global-skills/expo-skill-eval/scripts/snapshot-android.sh +0 -0
  67. package/dist/global-skills/expo-skill-eval/scripts/snapshot-ios.sh +0 -0
  68. package/dist/global-skills/expo-skill-eval/scripts/snapshot-web.sh +0 -0
  69. package/dist/global-skills/expo-upgrade/SKILL.md +3 -1
  70. package/dist/global-skills/expo-web-to-native/references/false-friends.md +2 -2
  71. package/dist/global-skills/expo-web-to-native/references/native-patterns.md +1 -1
  72. package/dist/global-skills/firebase-ai-logic-basics/SKILL.md +13 -16
  73. package/dist/global-skills/firebase-ai-logic-basics/references/ios_setup.md +4 -5
  74. package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_android.md +4 -4
  75. package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_web.md +3 -3
  76. package/dist/global-skills/firebase-auth-basics/SKILL.md +11 -6
  77. package/dist/global-skills/firebase-auth-basics/references/client_sdk_android.md +4 -5
  78. package/dist/global-skills/firebase-auth-basics/references/client_sdk_web.md +3 -3
  79. package/dist/global-skills/firebase-auth-basics/references/flutter_setup.md +24 -25
  80. package/dist/global-skills/firebase-auth-basics/references/security_rules.md +4 -2
  81. package/dist/global-skills/firebase-crashlytics/references/android_setup.md +7 -4
  82. package/dist/global-skills/firebase-crashlytics/references/ios_setup.md +2 -3
  83. package/dist/global-skills/firebase-data-connect/SKILL.md +2 -1
  84. package/dist/global-skills/firebase-data-connect/examples.md +4 -4
  85. package/dist/global-skills/firebase-data-connect/reference/config.md +5 -4
  86. package/dist/global-skills/firebase-data-connect/reference/realtime.md +1 -2
  87. package/dist/global-skills/firebase-data-connect/reference/sdk_flutter.md +2 -2
  88. package/dist/global-skills/firebase-data-connect/reference/sdk_ios.md +2 -2
  89. package/dist/global-skills/firebase-data-connect/reference/sdk_web.md +17 -6
  90. package/dist/global-skills/firebase-data-connect/reference/security.md +5 -5
  91. package/dist/global-skills/firebase-data-connect/templates.md +2 -1
  92. package/dist/global-skills/firebase-firestore/SKILL.md +20 -8
  93. package/dist/global-skills/firebase-firestore/references/enterprise/android_sdk_usage.md +5 -4
  94. package/dist/global-skills/firebase-firestore/references/enterprise/data_model.md +12 -3
  95. package/dist/global-skills/firebase-firestore/references/enterprise/indexes.md +16 -18
  96. package/dist/global-skills/firebase-firestore/references/enterprise/provisioning.md +1 -1
  97. package/dist/global-skills/firebase-firestore/references/enterprise/python_sdk_usage.md +5 -1
  98. package/dist/global-skills/firebase-firestore/references/enterprise/web_sdk_usage.md +7 -7
  99. package/dist/global-skills/firebase-firestore/references/standard/android_sdk_usage.md +5 -5
  100. package/dist/global-skills/firebase-firestore/references/standard/flutter_setup.md +4 -4
  101. package/dist/global-skills/firebase-firestore/references/standard/indexes.md +16 -18
  102. package/dist/global-skills/firebase-firestore/references/standard/provisioning.md +1 -1
  103. package/dist/global-skills/firebase-remote-config-basics/SKILL.md +0 -5
  104. package/dist/global-skills/firebase-remote-config-basics/references/android_setup.md +36 -8
  105. package/dist/global-skills/firebase-remote-config-basics/references/ios_setup.md +1 -7
  106. package/dist/global-skills/firebase-security-rules-auditor/SKILL.md +17 -6
  107. package/dist/global-skills/{firebase-firestore/references/standard/security_rules.md → firestore-rules-creation/SKILL.md} +24 -13
  108. package/dist/global-skills/grow-my-customers/SKILL.md +23 -0
  109. package/dist/global-skills/instrument-feature-flags/SKILL.md +25 -25
  110. package/dist/global-skills/instrument-feature-flags/references/adding-feature-flag-code.md +141 -285
  111. package/dist/global-skills/instrument-feature-flags/references/android.md +6 -15
  112. package/dist/global-skills/instrument-feature-flags/references/api.md +4 -11
  113. package/dist/global-skills/instrument-feature-flags/references/best-practices.md +1 -13
  114. package/dist/global-skills/instrument-feature-flags/references/django.md +14 -27
  115. package/dist/global-skills/instrument-feature-flags/references/dotnet.md +20 -79
  116. package/dist/global-skills/instrument-feature-flags/references/elixir.md +1 -9
  117. package/dist/global-skills/instrument-feature-flags/references/flask.md +13 -13
  118. package/dist/global-skills/instrument-feature-flags/references/flutter.md +3 -24
  119. package/dist/global-skills/instrument-feature-flags/references/go.md +3 -15
  120. package/dist/global-skills/instrument-feature-flags/references/ios.md +4 -17
  121. package/dist/global-skills/instrument-feature-flags/references/java.md +5 -13
  122. package/dist/global-skills/instrument-feature-flags/references/laravel.md +13 -17
  123. package/dist/global-skills/instrument-feature-flags/references/next-js.md +25 -32
  124. package/dist/global-skills/instrument-feature-flags/references/nodejs.md +8 -15
  125. package/dist/global-skills/instrument-feature-flags/references/php.md +1 -15
  126. package/dist/global-skills/instrument-feature-flags/references/python.md +2 -15
  127. package/dist/global-skills/instrument-feature-flags/references/react-native.md +13 -15
  128. package/dist/global-skills/instrument-feature-flags/references/react.md +17 -21
  129. package/dist/global-skills/instrument-feature-flags/references/ruby-on-rails.md +37 -83
  130. package/dist/global-skills/instrument-feature-flags/references/ruby.md +2 -15
  131. package/dist/global-skills/instrument-feature-flags/references/rust.md +13 -25
  132. package/dist/global-skills/instrument-feature-flags/references/usage.md +14 -63
  133. package/dist/global-skills/instrument-feature-flags/references/web.md +9 -14
  134. package/dist/global-skills/instrument-product-analytics/SKILL.md +29 -29
  135. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-hybrid.md +3 -1
  136. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-ssr.md +3 -1
  137. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-static.md +3 -1
  138. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-view-transitions.md +3 -1
  139. package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-ruby-on-rails.md +3 -1
  140. package/dist/global-skills/instrument-product-analytics/references/android.md +72 -107
  141. package/dist/global-skills/instrument-product-analytics/references/angular.md +26 -28
  142. package/dist/global-skills/instrument-product-analytics/references/astro.md +13 -24
  143. package/dist/global-skills/instrument-product-analytics/references/configuration.md +45 -63
  144. package/dist/global-skills/instrument-product-analytics/references/django.md +14 -27
  145. package/dist/global-skills/instrument-product-analytics/references/dotnet.md +20 -79
  146. package/dist/global-skills/instrument-product-analytics/references/elixir.md +47 -49
  147. package/dist/global-skills/instrument-product-analytics/references/flask.md +13 -13
  148. package/dist/global-skills/instrument-product-analytics/references/flutter.md +60 -90
  149. package/dist/global-skills/instrument-product-analytics/references/go.md +17 -56
  150. package/dist/global-skills/instrument-product-analytics/references/identify-users.md +15 -15
  151. package/dist/global-skills/instrument-product-analytics/references/ios.md +11 -15
  152. package/dist/global-skills/instrument-product-analytics/references/laravel.md +13 -17
  153. package/dist/global-skills/instrument-product-analytics/references/next-js.md +25 -32
  154. package/dist/global-skills/instrument-product-analytics/references/nuxt-js-3-6.md +13 -27
  155. package/dist/global-skills/instrument-product-analytics/references/nuxt-js.md +14 -28
  156. package/dist/global-skills/instrument-product-analytics/references/php.md +33 -84
  157. package/dist/global-skills/instrument-product-analytics/references/posthog-python.md +229 -9
  158. package/dist/global-skills/instrument-product-analytics/references/python.md +415 -106
  159. package/dist/global-skills/instrument-product-analytics/references/react-native.md +161 -155
  160. package/dist/global-skills/instrument-product-analytics/references/react-router-v6.md +12 -33
  161. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-data-mode.md +15 -33
  162. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-declarative-mode.md +12 -33
  163. package/dist/global-skills/instrument-product-analytics/references/react-router-v7-framework-mode.md +26 -41
  164. package/dist/global-skills/instrument-product-analytics/references/ruby-on-rails.md +37 -83
  165. package/dist/global-skills/instrument-product-analytics/references/ruby.md +48 -108
  166. package/dist/global-skills/instrument-product-analytics/references/svelte.md +18 -24
  167. package/dist/global-skills/instrument-product-analytics/references/tanstack-start.md +17 -19
  168. package/dist/global-skills/instrument-product-analytics/references/usage.md +14 -63
  169. package/dist/global-skills/instrument-product-analytics/references/vue-js.md +29 -28
  170. package/dist/global-skills/manifest.json +8 -2
  171. package/dist/global-skills/mongodb-search-and-ai/SKILL.md +28 -37
  172. package/dist/global-skills/mongodb-search-and-ai/references/automated-embedding.md +438 -0
  173. package/dist/global-skills/mongodb-search-and-ai/references/hybrid-search.md +60 -4
  174. package/dist/global-skills/mongodb-search-and-ai/references/vector-search.md +46 -108
  175. package/dist/global-skills/neon/SKILL.md +207 -213
  176. package/dist/global-skills/neon/references/auth.md +12 -0
  177. package/dist/global-skills/neon/references/claimable-neon.md +10 -14
  178. package/dist/global-skills/neon/references/function-triggers.md +53 -0
  179. package/dist/global-skills/neon/references/logs-loki.md +61 -0
  180. package/dist/global-skills/neon/references/parse-env.md +32 -0
  181. package/dist/global-skills/neon/references/sdk.md +7 -0
  182. package/dist/global-skills/neon-ai-gateway/SKILL.md +14 -16
  183. package/dist/global-skills/neon-auth/SKILL.md +155 -0
  184. package/dist/global-skills/neon-auth/references/managed-auth.md +173 -0
  185. package/dist/global-skills/neon-auth/references/self-managed.md +25 -0
  186. package/dist/global-skills/neon-functions/SKILL.md +159 -84
  187. package/dist/global-skills/neon-functions/references/ai-sdk.md +4 -6
  188. package/dist/global-skills/neon-functions/references/function-triggers.md +249 -0
  189. package/dist/global-skills/neon-functions/references/mastra-studio.md +3 -3
  190. package/dist/global-skills/neon-functions/references/mcp.md +1 -1
  191. package/dist/global-skills/neon-functions/references/production-hardening.md +340 -0
  192. package/dist/global-skills/neon-functions/references/sse.md +8 -5
  193. package/dist/global-skills/neon-object-storage/SKILL.md +10 -11
  194. package/dist/global-skills/neon-postgres/SKILL.md +120 -17
  195. package/dist/global-skills/neon-postgres/references/full-text-search.md +99 -0
  196. package/dist/global-skills/neon-postgres/references/hybrid-search.md +90 -0
  197. package/dist/global-skills/neon-postgres/references/lakebase-search-drizzle.md +172 -0
  198. package/dist/global-skills/neon-postgres/references/vector-search.md +137 -0
  199. package/dist/global-skills/neon-postgres-branches/SKILL.md +3 -3
  200. package/dist/global-skills/neon-postgres-egress-optimizer/SKILL.md +1 -1
  201. package/dist/global-skills/onboarding/SKILL.md +8 -6
  202. package/dist/global-skills/resend/SKILL.md +4 -2
  203. package/dist/global-skills/resend/references/broadcasts.md +6 -1
  204. package/dist/global-skills/resend/references/receiving.md +29 -10
  205. package/dist/global-skills/resend/references/sending/email-management.md +14 -4
  206. package/dist/global-skills/resend/references/topics.md +9 -6
  207. package/dist/global-skills/resend/references/usage.md +117 -0
  208. package/dist/global-skills/resend/references/webhooks.md +59 -2
  209. package/dist/global-skills/stripe-best-practices/SKILL.md +35 -29
  210. package/dist/global-skills/stripe-best-practices/references/billing.md +9 -2
  211. package/dist/global-skills/stripe-best-practices/references/payments.md +4 -2
  212. package/dist/global-skills/stripe-best-practices/references/security.md +3 -1
  213. package/dist/global-skills/stripe-best-practices/references/tax.md +39 -20
  214. package/dist/global-skills/supabase/SKILL.md +6 -0
  215. package/dist/global-skills/use-railway/SKILL.md +42 -22
  216. package/dist/global-skills/use-railway/references/analyze-db.md +7 -6
  217. package/dist/global-skills/use-railway/references/cloud-agents.md +70 -0
  218. package/dist/global-skills/use-railway/references/configure.md +17 -2
  219. package/dist/global-skills/use-railway/references/databases.md +107 -0
  220. package/dist/global-skills/use-railway/references/deploy.md +5 -5
  221. package/dist/global-skills/use-railway/references/feature-flags.md +25 -13
  222. package/dist/global-skills/use-railway/references/iac.md +66 -77
  223. package/dist/global-skills/use-railway/references/operate.md +26 -3
  224. package/dist/global-skills/use-railway/references/request.md +31 -23
  225. package/dist/global-skills/use-railway/references/setup.md +16 -5
  226. package/dist/global-skills/use-railway/references/tracing.md +261 -0
  227. package/dist/global-skills/use-railway/references/usage.md +52 -0
  228. package/dist/global-skills/use-railway/scripts/analyze-mongo.py +0 -0
  229. package/dist/global-skills/use-railway/scripts/analyze-mysql.py +0 -0
  230. package/dist/global-skills/use-railway/scripts/analyze-postgres.py +0 -0
  231. package/dist/global-skills/use-railway/scripts/analyze-redis.py +0 -0
  232. package/dist/global-skills/use-railway/scripts/enable-pg-stats.py +0 -0
  233. package/dist/global-skills/use-railway/scripts/pg-extensions.py +0 -0
  234. package/dist/global-skills/use-railway/scripts/railway-api.sh +0 -0
  235. package/dist/global-skills/validate-my-idea/SKILL.md +54 -0
  236. package/dist/global-skills/{feedback → vybekiit-feedback}/SKILL.md +16 -12
  237. package/dist/global-skills/watch-my-app/SKILL.md +53 -0
  238. package/dist/global-skills/workers-best-practices/SKILL.md +36 -103
  239. package/dist/global-skills/workers-best-practices/references/configuration.md +139 -0
  240. package/dist/global-skills/workers-best-practices/references/platform-apis.md +51 -0
  241. package/dist/global-skills/workers-best-practices/references/{rules.md → runtime-patterns.md} +13 -137
  242. package/dist/global-skills/wrangler/SKILL.md +48 -901
  243. package/dist/global-skills/xcode-project-setup/scripts/xcode_spm_setup/Sources/main.swift +19 -15
  244. package/package.json +22 -22
  245. package/dist/global-skills/expo-native-ui/references/animations.md +0 -220
  246. package/dist/global-skills/firebase-firestore/references/enterprise/security_rules.md +0 -577
  247. package/dist/global-skills/workers-best-practices/references/review.md +0 -174
@@ -1,65 +1,62 @@
1
1
  # Configuration in source control
2
2
 
3
- Choose one configuration model before editing files. Never manage the same service with both models.
3
+ Use Infrastructure as Code for project configuration. Keep one authoring file and never manage a service with both IaC and legacy Config as Code.
4
4
 
5
5
  ## Choose the model
6
6
 
7
- Prefer TypeScript Infrastructure as Code when the repository has TypeScript set up. Use `railway.json` only as the fallback for repositories without TypeScript.
7
+ TypeScript IaC is generally available. Python and Go authoring are in beta. Preserve an existing `.railway/railway.ts`, `.railway/railway.py`, or `.railway/railway.go`; do not switch languages based on the app's `package.json`, `go.mod`, or framework. With no existing authoring file, `config init` and `config pull` default to TypeScript even for non-TypeScript apps. `config init` and `config pull` have no language flag: the CLI picks the language only from an existing authoring file. To honor an explicit Python/Go preference on a fresh project, create an empty `.railway/railway.py` or `.railway/railway.go` first, then run `config pull` so the import is emitted in that language. `config migrate --lang py|go` emits Python/Go only when translating legacy `railway.json`/`railway.toml`.
8
8
 
9
- Use TypeScript IaC when any of these signals exist in the current project or workspace:
10
-
11
- - `.railway/railway.ts` already exists.
12
- - A `tsconfig.json` or another `tsconfig*.json` exists.
13
- - `package.json` declares `typescript`, or the project contains `.ts` or `.tsx` source files.
14
-
15
- If none of those signals exist, create or edit `railway.json`. Do not choose `railway.toml` for new agent-authored configuration.
16
-
17
- If a TypeScript repository already has `railway.json`, migrate the intended settings to `.railway/railway.ts` and remove the old file before planning. If the user explicitly asks to preserve the existing model rather than migrate, edit the existing file and explain that it remains service-level Config as Code.
18
-
19
- The models have different scopes:
9
+ `railway.json` and `railway.toml` are deprecated. New services cannot opt into Config as Code; existing files stop being read on **2026-12-01**. Do not create them as a fallback. For an existing legacy service, use the migration workflow below; if the user requests a temporary legacy edit, explain the cutoff and keep its current format.
20
10
 
21
11
  | Model | Scope | Applies when |
22
12
  |---|---|---|
23
- | `.railway/railway.ts` | Whole Railway project: services, databases, buckets, volumes, variables, replicas, domains, and canvas groups | `railway config apply` applies the reviewed project plan |
24
- | `railway.json` | One service's build and deploy settings | The next deployment reads the file; it does not update dashboard settings |
13
+ | `.railway/railway.ts`, `.py`, or `.go` | Project/environment: services, databases, buckets, volumes, variables, replicas, domains, and canvas groups | `railway config apply` applies the project plan |
14
+ | Existing `railway.json` / `railway.toml` | One legacy service's build and deploy settings | Read during deployments until the cutoff; overrides dashboard values for that deployment |
25
15
 
26
- ## TypeScript Infrastructure as Code
16
+ ## Infrastructure as Code
27
17
 
28
- The desired Railway project state lives in:
18
+ Keep exactly one of these files:
29
19
 
30
20
  ```text
31
21
  .railway/railway.ts
22
+ .railway/railway.py
23
+ .railway/railway.go
32
24
  ```
33
25
 
34
26
  `railway config init` and `railway config pull` also create `.railway/README.md`. Railway agent setup installs the shared `use-railway` skill; config commands do not need or create a project-local skill.
35
27
 
28
+ Install the matching authoring package in the config's package environment: `npm install railway`, `pip install railway-sdk`, or `go get github.com/railwayapp/railway-go-sdk`. Python/Go imports can generate `.railway/requirements.txt` or `.railway/go.mod`; use those when present. CLI 5.42+ evaluates the graph natively, but still needs the language runtime and SDK to evaluate authoring code. `--runner` is an optional legacy TypeScript runner override, not a prerequisite.
29
+
36
30
  ### Core rules
37
31
 
38
32
  1. Express Railway product intent, not internal API details.
39
- 2. Do not write Railway UUIDs into `.railway/railway.ts`.
33
+ 2. Do not write Railway UUIDs into the authoring file.
40
34
  3. Do not write `EnvironmentConfigPatch`, `ServiceInstance`, Backboard internals, or generated Railway domains into source.
41
35
  4. Prefer helpers such as `service()`, `postgres()`, `redis()`, `mysql()`, `mongo()`, `bucket()`, `volume()`, `group()`, `github()`, and `image()`.
42
36
  5. Use `service.env.VARIABLE` and `database.env.VARIABLE` for references.
43
- 6. Keep secrets out of source. Imported unknown secret values should use `preserve()` or be omitted when the user wants a smaller import.
37
+ 6. Keep secrets out of source. Imports use `preserve()` by default for existing variables; omit them only when a smaller import is intended.
44
38
  7. Prefer product DSL names such as `domains`, `replicas`, and `group`; avoid internal names such as `customDomains` and `multiRegionConfig`.
45
39
  8. Do not add platform defaults unless the user explicitly wants them.
46
- 9. After editing `.railway/railway.ts`, run `railway config plan`.
40
+ 9. After editing the authoring file, run `railway config plan`.
47
41
  10. Do not run `railway config apply` unless the user explicitly asks.
48
42
  11. Never use `railway config apply --yes` or `--confirm-destructive` from an agent session without explicit user approval for the exact plan.
49
43
 
50
44
  ### Initialize or import
51
45
 
52
46
  ```bash
53
- railway config init # create .railway/railway.ts
47
+ railway config init # TypeScript by default; preserve existing language
54
48
  railway config init --force # overwrite existing generated files
55
49
  railway config pull # import the linked project
56
- railway config pull --force # overwrite existing .railway/railway.ts
50
+ railway config pull --force # overwrite the existing authoring file
57
51
  railway config pull --omit-preserved-variables # omit unknown variable values
58
52
  railway config pull --json # print current graph instead of writing files
59
53
  railway config pull --agent # ask an agent to clean the import afterward
54
+ railway config pull --include-variables # decrypt and inline non-sealed values
60
55
  ```
61
56
 
62
- If the directory is not linked, the CLI prompts for project and environment in an interactive terminal. In agent workflows, link first or pass explicit project and environment context when supported.
57
+ Use `--include-variables` only when writing those values to source is intended: it includes non-sealed secrets too. Sealed values remain `preserve()`. A normal import should produce a no-change plan; inspect any diff before applying.
58
+
59
+ Plan/apply discover the nearest `.railway/railway.{ts,py,go}` by walking up from the current directory. `--file <path>` overrides that selection. Run init/pull/migrate from the intended project root. Config commands do not expose `--project`/`--environment` selectors: verify the link or use `railway link --project <id> --environment <env>` before noninteractive work. Interactive commands can prompt for missing context.
63
60
 
64
61
  ### Authoring
65
62
 
@@ -91,6 +88,7 @@ const db = postgres("postgres");
91
88
  const api = service("api", {
92
89
  source: github("owner/repo", { branch: "main" }),
93
90
  build: "pnpm build",
91
+ preDeploy: "pnpm db:migrate",
94
92
  start: "pnpm start",
95
93
  env: {
96
94
  DATABASE_URL: db.env.DATABASE_URL,
@@ -170,7 +168,20 @@ railway config apply --yes --confirm-destructive
170
168
  railway config apply --json --yes --confirm-destructive
171
169
  ```
172
170
 
173
- `apply` runs a fresh plan. If remote state changed, Railway rejects the stale apply and requires another plan. In non-interactive or agent sessions, destructive changes require `--confirm-destructive` in addition to `--yes` or `--json`; add it only after the user explicitly approves the exact destructive impact.
171
+ Ordinary `apply` evaluates a fresh plan. Changes to the environment between planning inside that invocation and applying are rejected. In non-interactive or agent sessions, destructive changes require `--confirm-destructive` in addition to `--yes` or `--json`; add it only after the user explicitly approves the exact destructive impact.
172
+
173
+ ### Apply the reviewed plan in CI
174
+
175
+ CLI 5.45.1+ can save the evaluated change set and apply that exact artifact:
176
+
177
+ ```bash
178
+ railway config plan --out railway-plan.json
179
+ railway config apply --plan railway-plan.json --yes
180
+ ```
181
+
182
+ Review the first command's diff before authorizing the apply. Store the artifact outside `.railway/` because that directory's source tree is pinned. The artifact contains the change set, environment ID and config etag, and source tree identity. `apply --plan` does not reevaluate the authoring code; it rejects changed source or remote state rather than quietly generating another plan. Keep the same CLI version and source checkout between jobs. Use `--source-tree` on `plan` only when CI deliberately supplies the source identity. Treat plan artifacts as potentially secret-bearing even when terminal diffs are redacted.
183
+
184
+ When a saved plan is stale, create and review a replacement. Destructive saved plans still require `--confirm-destructive`. For maintained CI integration, use [railwayapp/config](https://github.com/railwayapp/config).
174
185
 
175
186
  ### Review checklist
176
187
 
@@ -184,74 +195,52 @@ Before applying, confirm:
184
195
  - Scaling uses `replicas`, not `multiRegionConfig`.
185
196
  - No generated Railway service domains or Railway UUIDs are committed.
186
197
 
187
- ### Troubleshoot TypeScript IaC
198
+ ### Troubleshoot IaC
188
199
 
189
- - **Service is already managed by `railway.json`**: migrate its intended settings and remove the old file before planning; Railway blocks dual ownership.
200
+ - **Service is already managed by Config as Code**: use migration below; deleting the file alone does not clear its Railway Config File setting.
190
201
  - **Plan shows secrets as hidden**: expected. Use `--show-values` only with user approval.
191
202
  - **Apply says the plan is stale**: run a new plan, inspect it, then apply again only if requested.
192
203
  - **Destructive apply is blocked**: get explicit approval for the exact plan before adding `--confirm-destructive`.
193
- - **Imported variables use `preserve()`**: Railway could not safely print encrypted values; `preserve()` retains the remote value.
194
- - **Generated code is too literal**: simplify `.railway/railway.ts`, then run another plan.
204
+ - **Imported variables use `preserve()`**: this is the default, including readable values; it retains the remote value without putting it into source.
205
+ - **Missing Railway package**: install the SDK for the existing authoring language in its runtime environment; do not replace the config language to work around the error.
206
+ - **Generated code is too literal**: simplify the authoring file, then run another plan.
195
207
 
196
- ## `railway.json` fallback
208
+ ## Migrate legacy Config as Code
197
209
 
198
- Use this path only when the repository has no TypeScript setup. `railway.json` controls one service's build and deploy settings, not project resources such as databases, buckets, variables, or canvas groups.
210
+ Use CLI **5.49.1 or newer**: its TypeScript migration and all-language pull fixes preserve `preDeployCommand` as the first-class `preDeploy` field. Earlier TypeScript migration output could silently omit a database migration command.
199
211
 
200
- Start with the schema so editors validate fields:
212
+ Start with a dry-run from the repository root:
201
213
 
202
- ```json
203
- {
204
- "$schema": "https://railway.com/railway.schema.json",
205
- "build": {
206
- "builder": "RAILPACK",
207
- "buildCommand": "npm run build"
208
- },
209
- "deploy": {
210
- "preDeployCommand": ["npm run db:migrate"],
211
- "startCommand": "npm start",
212
- "healthcheckPath": "/health",
213
- "healthcheckTimeout": 300,
214
- "restartPolicyType": "ON_FAILURE",
215
- "restartPolicyMaxRetries": 5
216
- }
217
- }
214
+ ```bash
215
+ railway config migrate
216
+ railway config migrate --service api
217
+ railway config migrate --lang py
218
+ railway config migrate --lang go
218
219
  ```
219
220
 
220
- Rules for this fallback:
221
+ The default emits proposed TypeScript without writing files or clearing remote settings. `--service` selects a service when multiple configs are found; with one file it can name the emitted service. Inspect the discovered paths and service mapping in a monorepo. Single-service migration may emit a named partial rather than claim the whole project; retain that ownership boundary when merging it into existing IaC.
221
222
 
222
- 1. Include only settings the user intends to override. File values override dashboard values for that deployment.
223
- 2. Use the canonical schema field names; do not copy internal environment patch names blindly.
224
- 3. Keep service variables and secrets out of `railway.json`; manage them with Railway variables.
225
- 4. Use `environments.<name>` for environment-specific overrides and `environments.pr` for PR environments.
226
- 5. In a monorepo, place the file at the service root or set the service's custom Railway config file path to its absolute repository path.
227
- 6. Validate the JSON after editing. A deployment is required for the config to take effect; editing the file does not mutate dashboard settings.
223
+ In v5.49.1, Python/Go **migration** emits only build/start commands and the healthcheck path. Manually carry over other intended settings, including pre-deploy commands, replicas, and healthcheck timeouts, before applying the resulting IaC. A successful migration command is not proof of a lossless translation in any language; compare the original files and plan.
228
224
 
229
- Example environment override:
225
+ For an authorized migration, write the result and clear the discovered services' Railway Config File settings:
230
226
 
231
- ```json
232
- {
233
- "$schema": "https://railway.com/railway.schema.json",
234
- "deploy": {
235
- "startCommand": "npm start"
236
- },
237
- "environments": {
238
- "staging": {
239
- "deploy": {
240
- "startCommand": "npm run staging"
241
- }
242
- },
243
- "pr": {
244
- "deploy": {
245
- "startCommand": "npm run preview"
246
- }
247
- }
248
- }
249
- }
227
+ ```bash
228
+ railway config migrate --apply
229
+ railway config migrate --apply --delete-files
250
230
  ```
251
231
 
252
- For the complete field list, use the live JSON schema or Railway's Config as Code reference rather than guessing unsupported keys.
232
+ `--apply` here writes source and changes remote config-file settings; it does **not** apply the resulting IaC project plan. `--delete-files` additionally removes discovered legacy files and requires `--apply`. If an authoring file already exists, merge the dry-run output into it instead of using `--force` to overwrite unrelated resources. Preserve the language with `--lang` when needed; migration defaults to `ts`.
233
+
234
+ Before completing the migration:
235
+
236
+ - Compare build/start/pre-deploy commands, health checks, regions/replicas, and environment overrides with the original files. Do not assume every legacy field was translated.
237
+ - Preserve secrets and review the service identities and ownership scope.
238
+ - Run `railway config plan`; inspect unexpected removals or changes, then apply only within the user's authorized scope.
239
+ - Check for remaining legacy files and custom Railway Config File paths so deployments do not retain dual ownership.
240
+
241
+ For a requested temporary edit to an existing legacy service, retain its format, validate against the [Config as Code reference](https://docs.railway.com/config-as-code/reference), and explain the 2026-12-01 cutoff. Config as Code has deployment-time precedence over dashboard settings; a deployment is needed for edits to take effect. Keep variables and secrets in Railway variables.
253
242
 
254
243
  ## Validated against
255
244
 
256
- - Docs: [Infrastructure as Code](https://docs.railway.com/infrastructure-as-code), [IaC reference](https://docs.railway.com/infrastructure-as-code/reference), [Config as Code](https://docs.railway.com/guides/config-as-code), [Config as Code reference](https://docs.railway.com/reference/config-as-code)
257
- - CLI source: [config/mod.rs](https://github.com/railwayapp/cli/blob/v5.27.1/src/commands/config/mod.rs), [config/runner.rs](https://github.com/railwayapp/cli/blob/v5.27.1/src/commands/config/runner.rs)
245
+ - Docs: [Infrastructure as Code](https://docs.railway.com/infrastructure-as-code), [IaC reference](https://docs.railway.com/infrastructure-as-code/reference), [Config as Code](https://docs.railway.com/config-as-code)
246
+ - CLI source (v5.49.1): [config/mod.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/config/mod.rs), [config/migrate.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/config/migrate.rs), [authoring.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/config/authoring.rs), [eval.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/iac/eval.rs), [saved_plan.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/iac/saved_plan.rs)
@@ -79,7 +79,7 @@ HTTP filter fields include `@method`, `@path`, `@host`, `@requestId`, `@srcIp`,
79
79
 
80
80
  ### Network flow logs
81
81
 
82
- Use network flow logs for private networking, TCP proxy, outbound allowlist, DNS, or dropped-packet investigations:
82
+ Use network flow logs for private networking, TCP proxy, outbound allowlist, or dropped-packet investigations. Use DNS query logs below for resolution results:
83
83
 
84
84
  ```bash
85
85
  railway logs --service <service> --network --lines 100 --json
@@ -104,6 +104,20 @@ Useful filters:
104
104
  | `--src`, `--dst`, `--host` | IP filters |
105
105
  | `--drop-cause <cause>` | Drop reason |
106
106
 
107
+ ### DNS query logs
108
+
109
+ CLI 5.29+ exposes DNS resolution results directly:
110
+
111
+ ```bash
112
+ railway logs --service <service> --environment <env> --dns --lines 100 --json
113
+ railway logs --service <service> --dns --status failed --since 1h --lines 100 --json
114
+ railway logs --service <service> --dns --rcode NXDOMAIN --lines 100 --json
115
+ railway logs --service <service> --dns --qname backend.railway.internal --zone internal --lines 50 --json
116
+ railway logs --service <service> --dns --domain example.com --qtype AAAA --lines 100 --json
117
+ ```
118
+
119
+ Use `--qname` for the full query name, `--domain` for domain filtering, `--qtype` for record type, `--rcode` for DNS response code, and `--zone internal|external` for lookup scope. `--status failed` finds failed resolutions. DNS logs are service-level and mutually exclusive with build, deployment, HTTP, and network modes; do not pass a deployment ID or `--latest`. Correlate failed lookups with runtime errors and network flows instead of treating a DNS failure as an application crash.
120
+
107
121
  ## Metrics
108
122
 
109
123
  Use `railway metrics` for resource and HTTP metrics. It summarizes CPU, memory, network, volume, and HTTP data for the linked service by default.
@@ -125,6 +139,8 @@ Metric flags can be combined: `--cpu`, `--memory`, `--network`, `--volume`, and
125
139
 
126
140
  For custom grouping or measurements the CLI doesn't expose, use the GraphQL fallback in [request.md](request.md).
127
141
 
142
+ For latency or errors that span several services, or a request a user reported with an `x-railway-trace-id` header, use tracing instead of correlating logs by hand: see [tracing.md](tracing.md).
143
+
128
144
  ## SSH
129
145
 
130
146
  Use SSH when logs and metrics don't expose enough state and the user needs shell-level inspection inside a running service.
@@ -156,6 +172,8 @@ For database-level metrics and introspection, use the analysis scripts. `railway
156
172
  - Redis, MySQL, and MongoDB introspection
157
173
  - Combined analysis via `scripts/analyze-<type>.py` (postgres, mysql, redis, mongo)
158
174
 
175
+ For native PITR/HA/PgBouncer status and operations, use [databases.md](databases.md). For billed usage and spending limits, use [usage.md](usage.md); infrastructure metrics are not a billing statement.
176
+
159
177
  ## Failure triage
160
178
 
161
179
  When something is broken, classify the failure first. The fix depends on the class.
@@ -259,6 +277,10 @@ Always verify after fixing. Don't assume the redeploy succeeded.
259
277
 
260
278
  ## Troubleshoot common blockers
261
279
 
280
+ - **`OAUTH_INSUFFICIENT_GRANT` / resource access denied**: CLI 5.37.4+ distinguishes a live OAuth session without access from an expired login. Check the resource IDs, workspace membership, and integration grant scope; repeating the same login may retain the same insufficient grant. Reauthorize with the necessary access only when the user intends that scope.
281
+ - **Expired or invalid credentials**: follow the CLI's login/token-specific error. Transient refresh failures are not proof that access was revoked. Newer CLI versions refresh long-lived clients too; upgrade an old CLI before repeatedly reinstalling MCP to address stale authentication.
282
+ - **CI log stream failed**: on CLI 5.41+, the command falls back to status polling. Inspect the submitted deployment before retrying; a logging error alone is not a deployment failure.
283
+
262
284
  - **Unlinked context**: `railway link --project <id-or-name>`
263
285
  - **Missing service scope for logs**: pass `--service` and `--environment` explicitly
264
286
  - **Wrong project in status or deploy polling**: pass `--project`, `--environment`, and `--service`; URL IDs beat local linked context
@@ -269,5 +291,6 @@ Always verify after fixing. Don't assume the redeploy succeeded.
269
291
 
270
292
  ## Validated against
271
293
 
272
- - Docs: [status.md](https://docs.railway.com/cli/status), [service.md](https://docs.railway.com/cli/service), [logs.md](https://docs.railway.com/cli/logs), [metrics.md](https://docs.railway.com/cli/metrics), [ssh.md](https://docs.railway.com/cli/ssh), [cdn.md](https://docs.railway.com/cli/cdn), [waf.md](https://docs.railway.com/cli/waf), [observability/logs.md](https://docs.railway.com/observability/logs), [observability/metrics.md](https://docs.railway.com/observability/metrics)
273
- - CLI source: [status.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/status.rs), [service.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/service.rs), [logs.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/logs.rs), [metrics.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/metrics.rs), [ssh/mod.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/ssh/mod.rs), [deployment.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/deployment.rs), [redeploy.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/redeploy.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)
294
+ - Docs: [status.md](https://docs.railway.com/cli/status), [service.md](https://docs.railway.com/cli/service), [logs.md](https://docs.railway.com/cli/logs), [metrics.md](https://docs.railway.com/cli/metrics), [ssh.md](https://docs.railway.com/cli/ssh), [cdn.md](https://docs.railway.com/cli/cdn), [waf.md](https://docs.railway.com/cli/waf), [observability/logs.md](https://docs.railway.com/observability/logs), [observability/metrics.md](https://docs.railway.com/observability/metrics), [observability/tracing.md](https://docs.railway.com/observability/tracing)
295
+ - CLI source: [status.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/status.rs), [service.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/service.rs), [logs.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/logs.rs), [metrics.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/metrics.rs), [ssh/mod.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/ssh/mod.rs), [deployment.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/deployment.rs), [redeploy.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/redeploy.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)
296
+ - Authentication and CI recovery (v5.49.1): [client.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/client.rs), [up.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/up.rs)
@@ -1,6 +1,6 @@
1
1
  # Request
2
2
 
3
- Official documentation and community endpoints. GraphQL operations for things the CLI doesn't expose.
3
+ Official documentation and community endpoints. GraphQL operations without a dedicated CLI command or MCP tool.
4
4
 
5
5
  ## Official documentation
6
6
 
@@ -83,28 +83,36 @@ Thread URLs follow the format: `https://station.railway.com/{topic_slug}/{thread
83
83
  Community threads are anecdotal. Always pair with official docs when the answer informs an operational decision.
84
84
 
85
85
 
86
- ## GraphQL helper
86
+ ## GraphQL with the CLI
87
87
 
88
- All GraphQL operations use the API helper script, which handles authentication automatically:
88
+ Use `railway api` (CLI 5.28+) for API operations that dedicated commands and MCP tools cannot express. It uses the CLI's configured authentication and supports normal token refresh. Inspect the live schema before guessing fields or input shapes:
89
89
 
90
90
  ```bash
91
- scripts/railway-api.sh '<query>' '<variables-json>'
91
+ railway api search projectUpdate --kind mutation
92
+ railway api describe ProjectUpdateInput
93
+ railway api describe Mutation.projectUpdate
94
+ railway api schema --compact
95
+ railway api '<query>' --variables '{"id":"<resource-id>"}'
96
+ railway api --file query.graphql --variables @variables.json
97
+ railway api --file query.graphql --raw-var id=<resource-id> --var enabled=true
92
98
  ```
93
99
 
94
- The script reads the API token from `~/.railway/config.json` and sends requests to `https://backboard.railway.com/graphql/v2`.
100
+ `--var` parses JSON values when possible; `--raw-var` keeps strings. Queries can also come from stdin, with variables provided separately. Use `--operation-name` for documents containing multiple operations. Output is JSON by default; `--compact` changes formatting and there is no `--json` flag. HTTP errors and GraphQL `errors` fail the command; do not add `--allow-errors` when deciding whether a mutation succeeded. Query resource state before retrying an uncertain mutation.
101
+
102
+ For an older CLI that cannot be upgraded, the bundled `scripts/railway-api.sh '<query>' '<variables-json>'` remains a compatibility fallback. The database analysis scripts (`dal.py`, `analyze-postgres.py`) still call this helper directly, so it must stay in the plugin even when agents use `railway api`. It reads `user.token` from `~/.railway/config.json`; it does not implement the CLI's environment-token selection or OAuth refresh. It expects query first and variables second, not a query on stdin, and callers must inspect its response for GraphQL errors. Keep the skill telemetry prefix on `railway api` calls just like other CLI calls.
95
103
 
96
104
  For the full API schema, see: https://docs.railway.com/api/llms-docs.md
97
105
 
98
106
  ## Project mutations
99
107
 
100
- The CLI doesn't expose project setting updates (rename, PR deploys, visibility). Use GraphQL:
108
+ There is no dedicated project command for these setting updates (rename, PR deploys, visibility). Use GraphQL:
101
109
 
102
110
  ```bash
103
- scripts/railway-api.sh \
111
+ railway api \
104
112
  'mutation updateProject($id: String!, $input: ProjectUpdateInput!) {
105
113
  projectUpdate(id: $id, input: $input) { id name isPublic prDeploys botPrEnvironments }
106
114
  }' \
107
- '{"id":"<project-id>","input":{"name":"new-name","prDeploys":true}}'
115
+ --variables '{"id":"<project-id>","input":{"name":"new-name","prDeploys":true}}'
108
116
  ```
109
117
 
110
118
  Common `ProjectUpdateInput` fields: `name`, `isPublic`, `prDeploys`, `botPrEnvironments`.
@@ -112,14 +120,14 @@ Common `ProjectUpdateInput` fields: `name`, `isPublic`, `prDeploys`, `botPrEnvir
112
120
 
113
121
  ## Service mutations
114
122
 
115
- The CLI can create services (`railway add`) but cannot rename them or change icons. Use GraphQL:
123
+ Use `railway add` to create services and GraphQL to rename them or change icons:
116
124
 
117
125
  ```bash
118
- scripts/railway-api.sh \
126
+ railway api \
119
127
  'mutation updateService($id: String!, $input: ServiceUpdateInput!) {
120
128
  serviceUpdate(id: $id, input: $input) { id name icon }
121
129
  }' \
122
- '{"id":"<service-id>","input":{"name":"new-name"}}'
130
+ --variables '{"id":"<service-id>","input":{"name":"new-name"}}'
123
131
  ```
124
132
 
125
133
  `ServiceUpdateInput` fields: `name`, `icon` (image URL, animated GIF, or devicons URL like `https://devicons.railway.app/postgres`).
@@ -132,11 +140,11 @@ Get the service ID from `railway service list --json`.
132
140
  Prefer `railway add` for most cases. Use GraphQL for programmatic or advanced use:
133
141
 
134
142
  ```bash
135
- scripts/railway-api.sh \
143
+ railway api \
136
144
  'mutation createService($input: ServiceCreateInput!) {
137
145
  serviceCreate(input: $input) { id name }
138
146
  }' \
139
- '{"input":{"projectId":"<project-id>","name":"my-service","source":{"image":"nginx:latest"}}}'
147
+ --variables '{"input":{"projectId":"<project-id>","name":"my-service","source":{"image":"nginx:latest"}}}'
140
148
  ```
141
149
 
142
150
  `ServiceCreateInput` fields:
@@ -158,13 +166,13 @@ After creating a service via GraphQL, configure it with a JSON config patch incl
158
166
  Use `railway metrics` for routine metric checks. Use GraphQL only when you need custom measurements, grouping, sample rates, or averaging windows that the CLI doesn't expose.
159
167
 
160
168
  ```bash
161
- scripts/railway-api.sh \
169
+ railway api \
162
170
  'query metrics($environmentId: String!, $serviceId: String, $startDate: DateTime!, $endDate: DateTime, $sampleRateSeconds: Int, $averagingWindowSeconds: Int, $groupBy: [MetricTag!], $measurements: [MetricMeasurement!]!) {
163
171
  metrics(environmentId: $environmentId, serviceId: $serviceId, startDate: $startDate, endDate: $endDate, sampleRateSeconds: $sampleRateSeconds, averagingWindowSeconds: $averagingWindowSeconds, groupBy: $groupBy, measurements: $measurements) {
164
172
  measurement tags { serviceId deploymentId region } values { ts value }
165
173
  }
166
174
  }' \
167
- '{"environmentId":"<env-id>","serviceId":"<service-id>","startDate":"2026-02-19T00:00:00Z","measurements":["CPU_USAGE","MEMORY_USAGE_GB"]}'
175
+ --variables '{"environmentId":"<env-id>","serviceId":"<service-id>","startDate":"2026-02-19T00:00:00Z","measurements":["CPU_USAGE","MEMORY_USAGE_GB"]}'
168
176
  ```
169
177
 
170
178
  Available `MetricMeasurement` values: `CPU_USAGE`, `CPU_LIMIT`, `MEMORY_USAGE_GB`, `MEMORY_LIMIT_GB`, `NETWORK_RX_GB`, `NETWORK_TX_GB`, `DISK_USAGE_GB`, `EPHEMERAL_DISK_USAGE_GB`, `BACKUP_USAGE_GB`.
@@ -190,13 +198,13 @@ The CLI search command doesn't require authentication and supports pagination wi
190
198
  Use GraphQL only when the CLI output isn't enough for the workflow:
191
199
 
192
200
  ```bash
193
- scripts/railway-api.sh \
201
+ railway api \
194
202
  'query templates($query: String!, $verified: Boolean, $recommended: Boolean) {
195
203
  templates(query: $query, verified: $verified, recommended: $recommended) {
196
204
  edges { node { code name description category } }
197
205
  }
198
206
  }' \
199
- '{"query":"redis","verified":true}'
207
+ --variables '{"query":"redis","verified":true}'
200
208
  ```
201
209
 
202
210
  | Parameter | Type | Description |
@@ -230,21 +238,21 @@ For deploying into a specific environment or tracking the workflow, use the two-
230
238
  **Step 1**: Fetch the template config:
231
239
 
232
240
  ```bash
233
- scripts/railway-api.sh \
241
+ railway api \
234
242
  'query template($code: String!) {
235
243
  template(code: $code) { id serializedConfig }
236
244
  }' \
237
- '{"code":"postgres"}'
245
+ --variables '{"code":"postgres"}'
238
246
  ```
239
247
 
240
248
  **Step 2**: Deploy with `templateDeployV2`:
241
249
 
242
250
  ```bash
243
- scripts/railway-api.sh \
251
+ railway api \
244
252
  'mutation deploy($input: TemplateDeployV2Input!) {
245
253
  templateDeployV2(input: $input) { projectId workflowId }
246
254
  }' \
247
- '{"input":{
255
+ --variables '{"input":{
248
256
  "templateId":"<id-from-step-1>",
249
257
  "serializedConfig":<config-object-from-step-1>,
250
258
  "projectId":"<project-id>",
@@ -253,10 +261,10 @@ scripts/railway-api.sh \
253
261
  }}'
254
262
  ```
255
263
 
256
- `serializedConfig` is the raw JSON object from the template query, not a string. Get `workspaceId` via `scripts/railway-api.sh 'query { project(id: "<project-id>") { workspaceId } }' '{}'`.
264
+ `serializedConfig` is the raw JSON object from the template query, not a string. Get `workspaceId` via `railway api 'query { project(id: "<project-id>") { workspaceId } }'`.
257
265
 
258
266
 
259
267
  ## Validated against
260
268
 
261
269
  - Docs: [api docs](https://docs.railway.com/api/llms-docs.md), [agents.md](https://docs.railway.com/agents), [community.md](https://docs.railway.com/community), [cli/docs.md](https://docs.railway.com/cli/docs), [templates.md](https://docs.railway.com/cli/templates), [metrics.md](https://docs.railway.com/cli/metrics)
262
- - CLI source: [docs.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/docs.rs), [templates.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/templates.rs), [metrics.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/metrics.rs)
270
+ - CLI source: [api.rs (v5.49.1)](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/api.rs), [client.rs (v5.49.1)](https://github.com/railwayapp/cli/blob/v5.49.1/src/client.rs), [docs.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/docs.rs), [templates.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/templates.rs), [metrics.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/metrics.rs)
@@ -59,14 +59,14 @@ railway init --name <project-name> --workspace <workspace-id-or-name>
59
59
 
60
60
  ### Update project settings
61
61
 
62
- Settings like project name, PR deploys, and visibility aren't exposed through the CLI. Use the GraphQL API helper (see [request.md](request.md)):
62
+ Settings like project name, PR deploys, and visibility have no dedicated CLI command. Use `railway api` (see [request.md](request.md)):
63
63
 
64
64
  ```bash
65
- scripts/railway-api.sh \
65
+ railway api \
66
66
  'mutation updateProject($id: String!, $input: ProjectUpdateInput!) {
67
67
  projectUpdate(id: $id, input: $input) { id name isPublic prDeploys }
68
68
  }' \
69
- '{"id":"<project-id>","input":{"name":"new-name","prDeploys":true}}'
69
+ --variables '{"id":"<project-id>","input":{"name":"new-name","prDeploys":true}}'
70
70
  ```
71
71
 
72
72
  ## Services
@@ -140,7 +140,17 @@ railway connect <database-service> --ssh
140
140
  railway connect <database-service> --no-ssh
141
141
  ```
142
142
 
143
- The local database client must be installed. By default, `connect` uses a public TCP proxy when one exists and falls back to an SSH tunnel when no public proxy URL is available. Use `--ssh` to force the tunnel path, or `--no-ssh` to require a public TCP proxy.
143
+ The local database client must be installed for a shell. By default, `connect` uses a public TCP proxy when one exists and falls back to an SSH tunnel when no public proxy URL is available. Use `--ssh` to force the tunnel path, or `--no-ssh` to require a public TCP proxy.
144
+
145
+ For TablePlus, DBeaver, pgAdmin, or another GUI, CLI 5.27+ can hold a private tunnel open without starting or requiring a local database CLI:
146
+
147
+ ```bash
148
+ railway connect <database-service> --tunnel-only --port 15432 --project <project-id> --environment production
149
+ ```
150
+
151
+ `--tunnel-only` implies SSH and conflicts with `--no-ssh`. Omit `--port` to choose an available ephemeral port. Use the printed local connection details in the GUI; they include credentials, so do not echo them into a report. Keep the process running while the GUI is connected and stop it when finished. With `--project`, always supply `--environment`.
152
+
153
+ For backups, PITR, HA conversion/scaling, or connection pooling, load [databases.md](databases.md).
144
154
 
145
155
  ### Delete a service
146
156
 
@@ -361,4 +371,5 @@ When creating projects, Railway uses the default workspace unless `--workspace`
361
371
  ## Validated against
362
372
 
363
373
  - Docs: [cli.md](https://docs.railway.com/cli), [init.md](https://docs.railway.com/cli/init), [add.md](https://docs.railway.com/cli/add), [link.md](https://docs.railway.com/cli/link), [project.md](https://docs.railway.com/cli/project), [service.md](https://docs.railway.com/cli/service), [connect.md](https://docs.railway.com/cli/connect), [templates.md](https://docs.railway.com/cli/templates), [list.md](https://docs.railway.com/cli/list), [whoami.md](https://docs.railway.com/cli/whoami)
364
- - CLI source: [init.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/init.rs), [add.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/add.rs), [project.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/project.rs), [service.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/service.rs), [connect.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/connect.rs), [templates.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/templates.rs), [list.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/list.rs), [bucket.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/bucket.rs)
374
+ - CLI source: [init.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/init.rs), [add.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/add.rs), [project.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/project.rs), [service.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/service.rs), [connect.rs](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/connect.rs), [templates.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/templates.rs), [list.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/list.rs), [bucket.rs](https://github.com/railwayapp/cli/blob/v5.23.3/src/commands/bucket.rs)
375
+ - API command: [api.rs (v5.49.1)](https://github.com/railwayapp/cli/blob/v5.49.1/src/commands/api.rs)