vybekiit 0.7.26 → 0.7.28
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 +3910 -1300
- package/dist/global-guidance/language.md +443 -0
- package/dist/global-skills/add-ai/SKILL.md +1 -1
- package/dist/global-skills/add-analytics/SKILL.md +1 -1
- package/dist/global-skills/add-blog/SKILL.md +1 -1
- package/dist/global-skills/add-crud/SKILL.md +1 -1
- package/dist/global-skills/add-files/SKILL.md +1 -1
- package/dist/global-skills/add-images/SKILL.md +1 -1
- package/dist/global-skills/add-language/SKILL.md +1 -1
- package/dist/global-skills/add-notifications/SKILL.md +1 -1
- package/dist/global-skills/add-realtime/SKILL.md +1 -1
- package/dist/global-skills/add-route/SKILL.md +1 -1
- package/dist/global-skills/add-search/SKILL.md +1 -1
- package/dist/global-skills/add-signin/SKILL.md +1 -1
- package/dist/global-skills/add-teams/SKILL.md +1 -1
- package/dist/global-skills/add-upload/SKILL.md +1 -1
- 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/back-up-my-code/SKILL.md +1 -1
- package/dist/global-skills/better-auth-best-practices/SKILL.md +18 -8
- package/dist/global-skills/buy-domain/SKILL.md +1 -1
- package/dist/global-skills/check-safety/SKILL.md +1 -1
- package/dist/global-skills/configure-capabilities/SKILL.md +1 -1
- package/dist/global-skills/connect-account/SKILL.md +1 -1
- package/dist/global-skills/connect-account-backend/SKILL.md +1 -1
- package/dist/global-skills/design-my-data/SKILL.md +1 -1
- package/dist/global-skills/doctor/SKILL.md +1 -1
- 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/go-live/SKILL.md +1 -1
- package/dist/global-skills/grow-my-customers/SKILL.md +23 -0
- package/dist/global-skills/harden/SKILL.md +1 -1
- 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 +16 -14
- package/dist/global-skills/plan-my-idea/SKILL.md +1 -1
- package/dist/global-skills/publish-app/SKILL.md +1 -1
- package/dist/global-skills/publish-extension/SKILL.md +1 -1
- 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/reset-password/SKILL.md +1 -1
- package/dist/global-skills/save-data/SKILL.md +1 -1
- package/dist/global-skills/setup-email/SKILL.md +1 -1
- package/dist/global-skills/setup-payments/SKILL.md +1 -1
- package/dist/global-skills/setup-sms/SKILL.md +1 -1
- package/dist/global-skills/sign-in-with-email-link/SKILL.md +1 -1
- package/dist/global-skills/sign-in-with-google/SKILL.md +1 -1
- package/dist/global-skills/sign-in-with-phone/SKILL.md +1 -1
- 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/track-errors/SKILL.md +1 -1
- package/dist/global-skills/update-kit/SKILL.md +1 -1
- 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 +17 -13
- package/dist/global-skills/watch-my-app/SKILL.md +53 -0
- package/dist/global-skills/wire-auth/SKILL.md +1 -1
- package/dist/global-skills/wire-database/SKILL.md +1 -1
- package/dist/global-skills/wire-email/SKILL.md +1 -1
- package/dist/global-skills/wire-payments/SKILL.md +1 -1
- 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
|
@@ -1,61 +1,93 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neon
|
|
3
3
|
description: >-
|
|
4
|
-
Overview of Neon, a complete set of cloud backend primitives
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
or "Lakebase Postgres" is mentioned
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Claimable Postgres, neon.new, claimable.neon.tech, instant Postgres, a no-signup
|
|
16
|
-
database, temporary postgres, quick postgres, a no credit card database, or
|
|
17
|
-
npx neon-new.
|
|
4
|
+
Overview of Neon, a complete set of cloud backend primitives around Lakebase
|
|
5
|
+
Postgres: Auth, Object Storage, Functions, and the AI Gateway. Start here to
|
|
6
|
+
choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or
|
|
7
|
+
MCP server, and follow the branch-first workflow. Use when building an app or
|
|
8
|
+
backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child
|
|
9
|
+
skill neon-postgres wins for an existing DATABASE_URL, SQL, schema, inspect,
|
|
10
|
+
or search. Child skill neon-auth wins for login, users, sessions, identity
|
|
11
|
+
routing, and Managed Better Auth setup. Also use for object storage, S3, buckets, serverless functions,
|
|
12
|
+
function triggers, cron, AI gateway, LLM calls, logs, Loki, Grafana,
|
|
13
|
+
observability, postgres, database, backend, Claimable Neon, neon.new, or a
|
|
14
|
+
no-signup database.
|
|
18
15
|
metadata:
|
|
19
16
|
source: https://github.com/neondatabase/agent-skills/tree/main/skills/neon
|
|
20
17
|
---
|
|
21
18
|
|
|
22
19
|
# Neon
|
|
23
20
|
|
|
24
|
-
|
|
21
|
+
Neon is a complete set of cloud backend primitives around Lakebase Postgres, from Databricks — Lakebase Postgres, Auth (managed Better Auth), long-running Functions, Object Storage, and an AI Gateway, all instant, branchable, and serverless.
|
|
25
22
|
|
|
26
23
|
**Lakebase Postgres** is the database itself. It is one product, reached two ways: through Neon, with a free plan and the full set of backend primitives above, or through Databricks, alongside the rest of the Databricks suite. Same infrastructure, same features, same engineering team. Call the database Lakebase Postgres, and use "Neon" for the brand and for this access path — not as a name for the database.
|
|
27
24
|
|
|
28
25
|
A Neon branch is an isolated, copy-on-write clone of your data, taken from its current state or from a past state within your project's retained history window. You can freely modify or delete it. It shares data with its parent until writes cause it to diverge, and those writes are stored independently as deltas.
|
|
29
26
|
|
|
27
|
+
Agents pick Neon for instant Postgres provision, copy-on-write branches and snapshots, compute that scales to zero (storage is still billed), and ordinary Postgres that works with any driver or ORM.
|
|
28
|
+
|
|
30
29
|
## Backend Primitives
|
|
31
30
|
|
|
32
31
|
Neon bundles several backend primitives for building apps and agents that all branch together:
|
|
33
32
|
|
|
34
|
-
- **Lakebase Postgres** — Postgres that scales and branches with your app, built on the lakebase architecture: OLTP directly on cloud object storage, with storage decoupled from compute.
|
|
35
|
-
- **Auth** — Managed Better Auth with users and sessions stored in Postgres.
|
|
36
|
-
- **Object Storage** — S3-compatible object storage that branches with your projects.
|
|
37
|
-
- **Functions** — Neon's compute offering: long-running serverless functions that run close to your database, for WebSocket servers, long agent HTTP streams, APIs, and server-sent event servers.
|
|
38
|
-
- **AI Gateway** — One API for frontier and open-source models, supporting the chat completions API and the responses API, powered by Databricks Unity AI Gateway.
|
|
39
|
-
|
|
40
|
-
### Public Beta Service Availability
|
|
33
|
+
- **Lakebase Postgres** — Postgres that scales and branches with your app, built on the lakebase architecture: OLTP directly on cloud object storage, with storage decoupled from compute.
|
|
34
|
+
- **Auth** — Managed Better Auth with users and sessions stored in Postgres.
|
|
35
|
+
- **Object Storage** — S3-compatible object storage that branches with your projects.
|
|
36
|
+
- **Functions** — Neon's compute offering: long-running serverless functions that run close to your database, for WebSocket servers, long agent HTTP streams, APIs, and server-sent event servers. A Function Trigger POSTs to a function on a cron.
|
|
37
|
+
- **AI Gateway** — One API for frontier and open-source models, supporting the chat completions API and the responses API, powered by Databricks Unity AI Gateway.
|
|
38
|
+
- **Data API** — Optional PostgREST-compatible HTTP interface. Use it only when the app already uses PostgREST or a Supabase database client, or is migrating that client. New apps query Postgres from Functions or existing handlers. There is no `neon-data-api` skill; configuration is `dataApi` in `neon.ts` (see [Type-safe config](#type-safe-config-invalid-setups-dont-compile) when you have chosen it).
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
### Region availability
|
|
43
41
|
|
|
44
|
-
|
|
42
|
+
Object Storage, Functions, and AI Gateway are currently available on projects in `aws-us-east-2`, `aws-us-east-1`, `aws-eu-central-1`, and `aws-ap-southeast-1`. Before guiding a user through any of these services, confirm they are working in one of these regions. If not, they will need to create a new project in a supported region.
|
|
45
43
|
|
|
46
44
|
## Architecture: How to Use Neon
|
|
47
45
|
|
|
48
|
-
Neon
|
|
46
|
+
**Recommended: full-stack app with Neon as the backend.** Default to Next.js on Vercel (or Netlify, Cloudflare, or other app platforms). Prefer Next.js + Vercel first; TanStack Start, Nuxt, and SvelteKit are full-stack alternatives. The app owns its UI and server. Query Lakebase Postgres from route handlers, server functions, or Neon Functions.
|
|
47
|
+
|
|
48
|
+
Add [Neon Functions](https://neon.com/docs/compute/functions/overview.md) as a backend layer between the web app and Lakebase Postgres, Object Storage, Auth, and AI Gateway. A Hono API on Functions can expose endpoints with an OpenAPI specification for the web app and other clients (mobile, desktop). You can also add a Function for one job next to the data: Object Storage uploads, AI agents, Discord bots, WebSocket or SSE servers.
|
|
49
|
+
|
|
50
|
+
Functions support long-running requests that complement the web app. A Function must start returning a response within 15 minutes. WebSocket connections and HTTP streams stay open while data flows; send at least one byte every 15 minutes to keep a quiet stream alive. See [runtime limits](https://neon.com/docs/compute/functions/reference/runtime-limits.md).
|
|
51
|
+
|
|
52
|
+
For long agent or image streams, mint a JWT on the app server and have the client call the Function directly. See the `neon-functions` skill for authentication and runtime limits.
|
|
53
|
+
|
|
54
|
+
**Second best: client-only app with a Functions backend.** Host the SPA on Vercel (or Netlify, Cloudflare, or other app platforms) and call Functions from the browser. For an app using PostgREST or a `supabase-js` database client, prefer migrating database calls to REST endpoints in a Hono Function that queries Lakebase Postgres. Enforce authorization in the Function instead of relying on browser-facing RLS.
|
|
55
|
+
|
|
56
|
+
Neon provides backend primitives that compose with the app host. Neon does not host the frontend.
|
|
49
57
|
|
|
50
|
-
|
|
58
|
+
Offer the Data API only as a Supabase / PostgREST migration path when an existing PostgREST or `supabase-js` database client must keep working. Putting PostgREST in the browser and relying on RLS is easy to get wrong: misconfigured policies expose the database to the client. Do not recommend this for new apps. An installed Supabase package used only for Auth or Storage does not establish a database-client dependency. Route generic REST endpoint requests to a Function or existing app handler.
|
|
51
59
|
|
|
52
|
-
|
|
60
|
+
Functions have public HTTPS URLs. Verify a JWT or API key at the top of the handler and enforce authorization before accessing data. See the `neon-functions` skill.
|
|
53
61
|
|
|
54
|
-
|
|
62
|
+
## Convert an app onto Neon
|
|
55
63
|
|
|
56
|
-
|
|
64
|
+
Inspect the repo before provisioning.
|
|
57
65
|
|
|
58
|
-
|
|
66
|
+
1. Map requested capabilities: login, files, HTTP APIs, LLM calls, SQL.
|
|
67
|
+
2. Reuse what is already there: a supplied `DATABASE_URL`, an existing ORM or driver, Better Auth, Clerk or another auth provider, S3 or another object store, an existing `.neon` / `neon.ts`, an existing Data API or PostgREST client.
|
|
68
|
+
3. Select Neon primitives for capabilities that are still undecided.
|
|
69
|
+
4. Provision only when infrastructure is missing: `neon init` / `neon link` / Claimable, then `neon.ts`, then `neon deploy`.
|
|
70
|
+
5. Verify the app flow (sign-in, upload, API call), not only that env vars landed.
|
|
71
|
+
|
|
72
|
+
Do not replace working Better Auth, Clerk, Supabase Auth, S3, or a supplied `DATABASE_URL` with a Neon primitive unless the user asks. Do not rewrite an existing `neon.ts`. If Neon credentials fail for an existing account, stop and ask the user to sign in; do not create a Claimable project as a substitute.
|
|
73
|
+
|
|
74
|
+
A supplied `DATABASE_URL` with no Neon credentials is schema work: complete it without provisioning. Managed Better Auth cannot be enabled on a project that uses IP Allow or Private Networking. Leave those protections in place.
|
|
75
|
+
|
|
76
|
+
New projects are created in AWS regions. Prefer pooled `DATABASE_URL` for application traffic.
|
|
77
|
+
|
|
78
|
+
| Need | Use |
|
|
79
|
+
| --- | --- |
|
|
80
|
+
| Login, users, sessions (no existing provider) | `neon-auth` — Managed Better Auth (`auth: true`) |
|
|
81
|
+
| Existing Better Auth, Clerk, Supabase Auth, or another working IdP | Keep it. `neon-auth` only if they ask to migrate |
|
|
82
|
+
| User asked to migrate from Supabase Auth | `neon-auth` (Managed Better Auth; keep `SupabaseAuthAdapter()` call shapes) |
|
|
83
|
+
| Files, uploads, blobs (no existing object store) | Object Storage |
|
|
84
|
+
| HTTP APIs, cron, WebSocket, SSE, long-running agents | Functions querying Postgres |
|
|
85
|
+
| LLM calls | AI Gateway |
|
|
86
|
+
| SQL, schema, inspect, search | `neon-postgres` |
|
|
87
|
+
| Existing PostgREST / Supabase database client | Data API (`dataApi` in `neon.ts`) |
|
|
88
|
+
| Generic REST endpoints | Function or existing handler, not Data API |
|
|
89
|
+
|
|
90
|
+
Use `neon-auth` to choose identity and to implement Managed Better Auth; the [Auth guide](references/auth.md) points there. Keep existing Better Auth, Clerk, and Supabase Auth unless the user asked to migrate login. Auth cannot be enabled on a project with IP Allow or Private Networking.
|
|
59
91
|
|
|
60
92
|
## Neon Documentation
|
|
61
93
|
|
|
@@ -86,108 +118,170 @@ The skills below live in the [`neondatabase/agent-skills`](https://github.com/ne
|
|
|
86
118
|
|
|
87
119
|
| Skill | Use it for |
|
|
88
120
|
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
89
|
-
| `neon-postgres` | Working with databases, including connections, schemas, queries, and autoscaling: SQL development, schema design, performance optimization, and scaling decisions.
|
|
121
|
+
| `neon-postgres` | Working with databases, including connections, schemas, queries, search, and autoscaling: SQL development, schema design, performance optimization, and scaling decisions. |
|
|
122
|
+
| `neon-auth` | Identity routing and Managed Better Auth setup (login, users, sessions, trusted domains). Fetch: https://neon.com/docs/ai/skills/neon-auth/SKILL.md |
|
|
90
123
|
| `neon-postgres-branches` | Choosing or creating the right branch type for dev, preview, test, or CI workflows. Use this skill as a slash command. |
|
|
91
124
|
| `neon-object-storage` | Storing and serving files (uploads, images, blobs), including branching them with the database. |
|
|
92
|
-
| `neon-functions` | Deploying long-running or streaming serverless functions — APIs, agents, SSE/WebSocket servers.
|
|
125
|
+
| `neon-functions` | Deploying long-running or streaming serverless functions — APIs, agents, SSE/WebSocket servers, and Function Triggers (cron and object-storage). |
|
|
93
126
|
| `neon-ai-gateway` | Calling an LLM or routing across model providers with one credential, including discovering the branch's servable models at runtime via the OpenAI-compatible `/v1/models` endpoint. |
|
|
94
127
|
| `neon-postgres-egress-optimizer` | Diagnosing or fixing excessive Postgres egress (network data-transfer) costs in a codebase. |
|
|
95
128
|
|
|
129
|
+
There is no `neon-data-api` skill. Configure `dataApi` in `neon.ts` only for PostgREST / Supabase database-client compatibility or a migration that already depends on it.
|
|
130
|
+
|
|
96
131
|
For guidance on agent platforms that provision and operate Lakebase Postgres on Neon at scale, use `neon-postgres-agent-platforms`, which lives in a separate repo: [`neondatabase/neon-for-agent-platforms`](https://github.com/neondatabase/neon-for-agent-platforms).
|
|
97
132
|
|
|
98
133
|
### Installing the Right Skill
|
|
99
134
|
|
|
100
|
-
First check whether the target skill is already installed and accessible (for example, it appears in the available skills list or its `SKILL.md` is present). If it is, use it directly. If it is not installed, install it
|
|
135
|
+
First check whether the target skill is already installed and accessible (for example, it appears in the available skills list or its `SKILL.md` is present). If it is, use it directly. If it is not installed, install it with `neon skills`:
|
|
101
136
|
|
|
102
137
|
```bash
|
|
103
|
-
|
|
138
|
+
neon skills -s <skill-name>
|
|
104
139
|
```
|
|
105
140
|
|
|
106
141
|
Replace `<skill-name>` with the skill you need (for example, `neon-object-storage`, `neon-functions`, or `neon-ai-gateway`). Useful flags:
|
|
107
142
|
|
|
108
|
-
-
|
|
143
|
+
- `--global` — install globally instead of into the current project.
|
|
109
144
|
- `-y` — non-interactive mode (skip prompts).
|
|
110
|
-
-
|
|
145
|
+
- `--agent <agent-name>` — pick the target agent(s) for non-interactive mode.
|
|
111
146
|
|
|
112
147
|
For example, to install the object storage skill globally for a specific agent without prompts:
|
|
113
148
|
|
|
114
149
|
```bash
|
|
115
|
-
|
|
150
|
+
neon skills -s neon-object-storage --global -y --agent <agent-name>
|
|
116
151
|
```
|
|
117
152
|
|
|
118
|
-
|
|
153
|
+
`neon-auth` is not in the CLI skill catalog of current releases. Unknown names fail, so do not run `neon skills -s neon-auth`. Fetch it:
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
https://neon.com/docs/ai/skills/neon-auth/SKILL.md
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
References: https://neon.com/docs/ai/skills/neon-auth/references/managed-auth.md and https://neon.com/docs/ai/skills/neon-auth/references/self-managed.md. If those URLs are unpublished, fetch the same files from https://github.com/neondatabase/agent-skills/blob/main/skills/neon-auth/SKILL.md
|
|
160
|
+
|
|
161
|
+
If the Neon CLI is not available, you can visit https://neon.com/.well-known/agent-skills for a registry of all available Neon skills and fetch them manually.
|
|
119
162
|
|
|
120
163
|
### Updating Skills
|
|
121
164
|
|
|
122
165
|
Keep the skills up to date: for every new session, update them so you are working with the latest best practices.
|
|
123
166
|
|
|
124
|
-
|
|
167
|
+
Run `neon skills update` to update all installed Neon skills, or `neon skills update -y` to skip prompts. If the skills were installed via a plugin, they are updated automatically.
|
|
125
168
|
|
|
126
169
|
## Getting Started with Neon
|
|
127
170
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
- `NEON_API_KEY` is set
|
|
131
|
-
- `npx neon@latest profile list -o json` lists a profile whose `account` is not `-`
|
|
171
|
+
**Prefer the CLI over the MCP server** unless the user instructs otherwise, the CLI is unavailable or blocked in your environment, or it is not authenticated, since it provides more capabilities, including deploying Neon Functions.
|
|
132
172
|
|
|
133
|
-
|
|
173
|
+
### Check the CLI, then credentials
|
|
134
174
|
|
|
135
|
-
|
|
175
|
+
```bash
|
|
176
|
+
neon --version
|
|
177
|
+
```
|
|
136
178
|
|
|
137
|
-
|
|
179
|
+
If that fails, install first:
|
|
138
180
|
|
|
139
181
|
```bash
|
|
140
|
-
|
|
182
|
+
npm i -g neon # npm
|
|
183
|
+
bun add -g neon # bun
|
|
184
|
+
pnpm add -g neon # pnpm
|
|
141
185
|
```
|
|
142
186
|
|
|
143
|
-
|
|
187
|
+
For full CLI installation options, see https://neon.com/docs/cli/install.md
|
|
144
188
|
|
|
145
|
-
|
|
189
|
+
Then inspect credentials without printing secrets. `NEON_API_KEY` or a `neon profile list -o json` row whose `account` is not `-` is an account. A `DEFAULT` row with `account: "-"` and `file: "missing"` is not.
|
|
146
190
|
|
|
147
|
-
-
|
|
148
|
-
-
|
|
149
|
-
-
|
|
191
|
+
- Credentials already available: reuse them. Do not launch a browser.
|
|
192
|
+
- A human needs to sign in: they run `neon login` (`neon auth` is an alias). An unattended agent must not launch browser authentication.
|
|
193
|
+
- No account yet: follow [Starting without a Neon account](#starting-without-a-neon-account) for the Claimable Neon path.
|
|
150
194
|
|
|
151
|
-
|
|
195
|
+
### Combined setup: `neon init`
|
|
152
196
|
|
|
153
|
-
|
|
197
|
+
When both agent tooling and project setup are needed, use authenticated `neon init`. `--agent` takes the coding-agent name. `-y` skips prompts but does not supply project selection or credentials. `--skip-template` skips scaffolding a starter app.
|
|
154
198
|
|
|
155
|
-
|
|
199
|
+
Link an existing project:
|
|
156
200
|
|
|
157
|
-
|
|
201
|
+
```bash
|
|
202
|
+
neon init --skip-template --agent cursor \
|
|
203
|
+
--org-id <org-id> --project-id <project-id> -y
|
|
204
|
+
```
|
|
158
205
|
|
|
159
|
-
|
|
206
|
+
Create and link a project:
|
|
160
207
|
|
|
161
|
-
|
|
208
|
+
```bash
|
|
209
|
+
neon init --skip-template --agent cursor \
|
|
210
|
+
--org-id <org-id> --project-name my-app \
|
|
211
|
+
--region-id aws-us-east-2 -y
|
|
212
|
+
```
|
|
162
213
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
4. `neon env pull` — Fetches the current branch's Neon environment variables (`DATABASE_URL`, …) into your existing `.env`, or `.env.local` if you don't have one (override the target with `--file`). No branch ID needed; it reads `.neon`. **`link` and `checkout` run this for you by default**, so you rarely call it directly.
|
|
214
|
+
`--services` may declare `auth`, `data-api`, `functions`, `object-storage`, and `ai-gateway` (repeat the flag or comma-separate). Pass `none` for the bare starter policy. It writes `neon.ts`; it does not deploy or wire the app. Selecting `data-api` also declares Auth (the default Data API provider requires it). Use `data-api` only for PostgREST / Supabase database-client compatibility.
|
|
215
|
+
|
|
216
|
+
If `init` already installed the Neon plugin, do not also run `neon mcp` and `neon skills` for the same agent.
|
|
167
217
|
|
|
168
|
-
|
|
218
|
+
When tooling already exists, only one component is missing, or env writes need `--no-env-pull`, use the manual steps below. `init` has no `--no-env-pull`. Before a command that pulls env, inspect existing configuration. If a supplied `DATABASE_URL` or `AWS_*` value must stay, pass `--no-env-pull` on `link` / `checkout` and write env to a separate `--file`.
|
|
169
219
|
|
|
170
|
-
###
|
|
220
|
+
### 1. Install the Neon CLI
|
|
171
221
|
|
|
172
|
-
|
|
222
|
+
Use the install check above. Do not run `neon login` unattended. MCP remains the fallback when the CLI is unavailable, blocked, unauthenticated, or the user prefers it.
|
|
173
223
|
|
|
174
|
-
|
|
224
|
+
### 2. Install the Neon MCP Server
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
neon mcp --oauth --project --agent cursor -y
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
`--oauth` writes the server URL and leaves sign-in to the MCP client. That is not an authenticated MCP session. `--project` means project-level agent config, not a Neon project ID; the agent must support project-level installs (`cursor` does). Bare `neon mcp -y` installs globally and can reuse or mint an account-wide API key — do not treat it as the unattended default.
|
|
231
|
+
|
|
232
|
+
For all available plugins and IDE integrations, see: https://neon.com/docs/ai/ai-agents-tools.md
|
|
175
233
|
|
|
176
234
|
For full MCP server installation options, see https://neon.com/docs/ai/connect-mcp-clients-to-neon.md
|
|
177
235
|
|
|
178
|
-
|
|
236
|
+
### 3. Install Neon Agent Skills
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
neon skills -s neon --agent cursor -y
|
|
240
|
+
```
|
|
179
241
|
|
|
180
|
-
|
|
181
|
-
- `create_project` — Creates a new Neon project in your Neon account. A project acts as a container for branches, databases, roles, and computes.
|
|
182
|
-
- `get_connection_string` — Returns your database connection string.
|
|
242
|
+
To install a specific skill only (not `neon-auth` until the CLI catalog includes it; fetch it as in [Installing the Right Skill](#installing-the-right-skill)):
|
|
183
243
|
|
|
184
|
-
|
|
244
|
+
```bash
|
|
245
|
+
neon skills -s <skill-name> --agent cursor -y
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Useful flags: `--global`, `-y`, `--agent <agent-name>`. Interactive `neon skills` with no flags prompts.
|
|
249
|
+
|
|
250
|
+
### 4. Link Your Project and Get Started
|
|
251
|
+
|
|
252
|
+
With setup complete, connect the workspace to a Neon org, project, and branch. Then consult the skill for each Neon feature your app requires. See [Choosing the Right Skill](#choosing-the-right-skill) above.
|
|
253
|
+
|
|
254
|
+
Non-interactive link:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
neon link --project-id <project-id> -y
|
|
258
|
+
neon link --org-id <org-id> --project-name my-app --region-id aws-us-east-2
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
`-y` skips the already-linked confirmation and pins the default branch when the project has more than one. Pass `--branch <name>` when branch selection matters.
|
|
262
|
+
|
|
263
|
+
#### Useful CLI Commands
|
|
264
|
+
|
|
265
|
+
1. `neon link` — Writes org, project, and branch IDs to a git-ignored `.neon` file. Run once per project. Once linked, project- and branch-scoped commands no longer need `--project-id` or `--branch` (for example, `neon branch list`). Non-interactive: `--org-id` / `--project-id` / `--project-name` plus `--region-id`, and `-y` when appropriate. There is no `neon link --agent`.
|
|
266
|
+
2. `neon checkout <branch-name>` — Pins a branch in `.neon` and pulls that branch's env. An existing branch is enough. A missing **name** needs `--create` for unattended use (`neon checkout dev --create`). A missing branch **id** cannot be created. Interactive checkout with no name may offer to create; do not rely on that unattended. Drives the [Branch-First Dev Flow](#branch-first-dev-flow) below.
|
|
267
|
+
3. `neon config init` — Initializes a `neon.ts` file, which declares how you provision and manage Neon services, in the root of the project.
|
|
268
|
+
4. `neon env pull` — Fetches the current branch's Neon environment variables (`DATABASE_URL`, …) into your existing `.env`, or `.env.local` if you don't have one (override the target with `--file`). No branch ID needed; it reads `.neon`. **`link` and `checkout` run this for you by default**, so you rarely call it directly.
|
|
269
|
+
|
|
270
|
+
Without `neon.ts`, a **bare** `neon env pull` includes the default Gateway credential on claimed projects. Implicit pulls bundled into `link` / `checkout` / `apply` do **not** pull an undeclared Gateway token. Declaring `aiGateway` in `neon.ts` requests those variables. With `neon.ts`, pull includes only the services declared there and errors if the branch is missing one.
|
|
271
|
+
|
|
272
|
+
### Bootstrap a New Project
|
|
273
|
+
|
|
274
|
+
`neon bootstrap` scaffolds from a Neon project template.
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
neon bootstrap
|
|
278
|
+
```
|
|
185
279
|
|
|
186
|
-
|
|
280
|
+
## Starting without a Neon account
|
|
187
281
|
|
|
188
|
-
If
|
|
282
|
+
If the Getting Started account check found credentials, use them. If a command waits on a browser (`Awaiting authentication in web browser`) or authentication fails, stop and ask the user to sign in (`neon auth`) or mint an API key. Do not create a Claimable project as a substitute for a failed existing account.
|
|
189
283
|
|
|
190
|
-
If there is no Neon account yet, follow [references/claimable-neon.md](https://neon.com/docs/ai/skills/neon/references/claimable-neon.md). Do not run `neon init --agent` or `neon auth` on this path; those need a human Neon account. If `neon claim` is missing, the reference has the REST fallback. Unclaimed projects expire at `project_expires_at` (72 hours today). Claim codes expire in `expires_in` (15 minutes today).
|
|
284
|
+
If there is no Neon account yet, follow [references/claimable-neon.md](https://neon.com/docs/ai/skills/neon/references/claimable-neon.md). Do not run `neon init --agent` or `neon auth` on this path; those need a human Neon account. If `neon claim` is missing, the reference has the REST fallback. Unclaimed projects expire at `project_expires_at` (72 hours today). Claim codes expire in `expires_in` (15 minutes today). Functions, Object Storage, and AI Gateway report `requires_claim` before a human claims the project; report that and keep the denied capabilities. Add Auth with `neon.ts` and `neon deploy` when login is requested and no existing provider should be preserved. Add the Data API only for PostgREST / Supabase database-client compatibility or a migration that already depends on it.
|
|
191
285
|
|
|
192
286
|
Requests for neon.new, Claimable Postgres, claimable.neon.tech, instant Postgres, or a no-signup database are the same path.
|
|
193
287
|
|
|
@@ -204,18 +298,16 @@ npm i @neon/config
|
|
|
204
298
|
import { defineConfig } from "@neon/config/v1";
|
|
205
299
|
|
|
206
300
|
export default defineConfig({
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
access: "private",
|
|
212
|
-
},
|
|
301
|
+
aiGateway: true,
|
|
302
|
+
buckets: {
|
|
303
|
+
images: {
|
|
304
|
+
access: "private",
|
|
213
305
|
},
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
306
|
+
},
|
|
307
|
+
functions: {
|
|
308
|
+
imagegen: {
|
|
309
|
+
name: "AI SDK image agent",
|
|
310
|
+
source: "src/index.ts",
|
|
219
311
|
},
|
|
220
312
|
},
|
|
221
313
|
});
|
|
@@ -223,63 +315,47 @@ export default defineConfig({
|
|
|
223
315
|
|
|
224
316
|
### Provision services with neon config
|
|
225
317
|
|
|
226
|
-
Every project ships with Lakebase Postgres; `neon.ts`
|
|
318
|
+
Every project ships with Lakebase Postgres; `neon.ts` also declares Auth, Functions, buckets, and the AI Gateway. Data API is a compatibility toggle, not part of a default backend:
|
|
227
319
|
|
|
228
320
|
```typescript
|
|
229
321
|
// neon.ts
|
|
230
322
|
export default defineConfig({
|
|
231
323
|
auth: true,
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
buckets: {},
|
|
236
|
-
aiGateway: true, // see the neon-ai-gateway skill
|
|
237
|
-
},
|
|
324
|
+
functions: {},
|
|
325
|
+
buckets: {},
|
|
326
|
+
aiGateway: true, // see the neon-ai-gateway skill
|
|
238
327
|
});
|
|
239
328
|
```
|
|
240
329
|
|
|
330
|
+
Empty `functions` / `buckets` maps are configuration slots, not a deployed API. Do not replace an existing `neon.ts` wholesale with this example.
|
|
331
|
+
|
|
241
332
|
Reconcile the declaration from the CLI — the Neon equivalent of `terraform status` / `plan` / `apply`:
|
|
242
333
|
|
|
243
334
|
```bash
|
|
244
335
|
neon status # print the branch's live config (read-only). Alias for `neon config status`.
|
|
245
336
|
neon config plan # dry-run diff of what apply would change (read-only)
|
|
246
|
-
neon deploy
|
|
337
|
+
neon deploy --env <file> # apply neon.ts. Pass --env when Function env reads process.env. Alias for `neon config apply`
|
|
247
338
|
```
|
|
248
339
|
|
|
249
340
|
`apply` / `deploy` provision the declared services **and then pull the branch's env into your local `.env.local`** (e.g. `Pulled 5 Neon variables into .env.local: DATABASE_URL, …`), so your local env always matches what's deployed.
|
|
250
341
|
|
|
251
|
-
###
|
|
342
|
+
### Function env and `neon deploy`
|
|
252
343
|
|
|
253
|
-
|
|
344
|
+
`neon deploy` is the preferred full deployment: it applies `neon.ts` (services and functions) to the linked branch. `neon deploy --env <file>` loads that file into `process.env` before evaluating `neon.ts`, then uploads those values as Function env. Use it every time Function env reads `process.env`.
|
|
254
345
|
|
|
255
|
-
|
|
256
|
-
npm i @neon/env
|
|
257
|
-
```
|
|
346
|
+
`<file>` is the gitignored file `neon env pull` already writes (`.env` if that file exists, otherwise `.env.local`). Env pull writes Neon-managed vars only (`DATABASE_URL`, `NEON_AI_GATEWAY_*`, …). Add every key under `functions.*.env` to that file yourself, then pass the same path to `--env`.
|
|
258
347
|
|
|
259
|
-
|
|
260
|
-
import { parseEnv } from "@neon/env";
|
|
261
|
-
import config from "./neon";
|
|
348
|
+
Every declared Function env key must be a defined string. `undefined` (an unset `process.env.X`) means you listed a key you want written but the value is missing: `defineConfig` throws. Omit the key from `neon.ts` if you do not want to write it. Never coerce a missing `process.env` value to an empty string: that uploads `""` and deletes the live key. An empty assignment in the file (`KEY=`) is also `""`. If TypeScript needs a type assertion, use `process.env.X!` and make sure the file actually has the value.
|
|
262
349
|
|
|
263
|
-
|
|
350
|
+
Use `neon functions deploy` when you are not applying `neon.ts`: a single function by slug, or a targeted `--env KEY=VALUE` update (that flag is not a file path).
|
|
264
351
|
|
|
265
|
-
|
|
266
|
-
console.log(env.auth.baseUrl);
|
|
267
|
-
```
|
|
352
|
+
### Function Triggers
|
|
268
353
|
|
|
269
|
-
|
|
354
|
+
A Function Trigger POSTs to a Neon Function on a cron (`type: "schedule"`) or when an object is created in a bucket (`type: "storage_object_created"`). Same regions as Functions. Prefer a `triggers` map in `neon.ts` (the record key is the trigger name) and `neon deploy`. CLI, MCP, REST, inherited-trigger behavior, and parsers: [references/function-triggers.md](https://neon.com/docs/ai/skills/neon/references/function-triggers.md). Handler payload and Hono example: the `neon-functions` skill, `references/function-triggers.md`.
|
|
270
355
|
|
|
271
|
-
|
|
272
|
-
import { parseEnv } from "@neon/env";
|
|
273
|
-
import config from "./neon";
|
|
274
|
-
|
|
275
|
-
// Only DATABASE_URL is required and returned; DATABASE_URL_UNPOOLED is not enforced.
|
|
276
|
-
const { postgres } = parseEnv(config, ["DATABASE_URL"]);
|
|
277
|
-
console.log(postgres.databaseUrl);
|
|
356
|
+
### Type-safe env vars with parseEnv
|
|
278
357
|
|
|
279
|
-
|
|
280
|
-
const env = parseEnv(config, ["DATABASE_URL", "NEON_AUTH_BASE_URL"]);
|
|
281
|
-
console.log(env.postgres.databaseUrl, env.auth.baseUrl);
|
|
282
|
-
```
|
|
358
|
+
`@neon/env`'s `parseEnv` returns a typed env object from your `neon.ts` config. Require a subset of keys when an app does not need every implied variable: [references/parse-env.md](https://neon.com/docs/ai/skills/neon/references/parse-env.md).
|
|
283
359
|
|
|
284
360
|
### Branch configuration
|
|
285
361
|
|
|
@@ -291,7 +367,6 @@ import { defineConfig } from "@neon/config/v1";
|
|
|
291
367
|
|
|
292
368
|
export default defineConfig({
|
|
293
369
|
auth: true,
|
|
294
|
-
dataApi: true,
|
|
295
370
|
branch: (branch) => {
|
|
296
371
|
if (branch.exists) {
|
|
297
372
|
// leave existing branches untouched
|
|
@@ -318,7 +393,7 @@ The `branch` function receives the target branch (its `name`, whether it `exists
|
|
|
318
393
|
|
|
319
394
|
### Type-safe config: invalid setups don't compile
|
|
320
395
|
|
|
321
|
-
Because `neon.ts` is TypeScript, the compiler catches invalid infrastructure before you ever deploy — and Neon encodes the actual rules (and their fixes) into the types, so the error tells you what to do rather than failing with a useless `Type 'true' is not assignable to type 'never'`. The canonical case
|
|
396
|
+
Because `neon.ts` is TypeScript, the compiler catches invalid infrastructure before you ever deploy — and Neon encodes the actual rules (and their fixes) into the types, so the error tells you what to do rather than failing with a useless `Type 'true' is not assignable to type 'never'`. The canonical case, **when the app has chosen Data API for PostgREST/Supabase compatibility**: the Data API verifies requests with Neon Auth by default, so enabling it on its own is a type error _on_ `dataApi`. Do not enable Auth merely to satisfy this error in an app that never needed Data API.
|
|
322
397
|
|
|
323
398
|
```typescript
|
|
324
399
|
export default defineConfig({
|
|
@@ -351,130 +426,49 @@ Neon branches enable a branch-first development flow, which we recommend when us
|
|
|
351
426
|
|
|
352
427
|
Create a Neon branch any time you would create a git branch. Use the following commands if you have CLI access:
|
|
353
428
|
|
|
354
|
-
- `neon checkout <branch-name>` —
|
|
355
|
-
- `neon env pull` — Fetches the current branch's Neon environment variables into your `.env
|
|
429
|
+
- `neon checkout <branch-name>` — Pins an existing branch by updating only the branch pointer in `.neon`. Pass `--create` to create a missing **name** (`neon checkout dev --create`). Run without a name for an interactive picker. It does not touch code or local Postgres.
|
|
430
|
+
- `neon env pull` — Fetches the current branch's Neon environment variables into your `.env`. **`link` and `checkout` run this for you by default**, so you rarely call it directly.
|
|
356
431
|
- `neon diff` — Shows the schema diff between the child branch and its parent. Run this to see what changes have been made to the schema since the last branch was created and before you commit your changes.
|
|
357
432
|
|
|
358
433
|
```bash
|
|
359
434
|
neon link # once; also pulls the linked branch's env
|
|
360
|
-
neon checkout dev-add-search # per feature; also pulls the branch's env
|
|
435
|
+
neon checkout dev-add-search --create # per feature; also pulls the branch's env
|
|
361
436
|
```
|
|
362
437
|
|
|
363
438
|
Because `link` and `checkout` pull env by default, the branch's `DATABASE_URL` lands in your local `.env` automatically — build against it, then `checkout` the next branch and repeat. As the agent, drive this loop yourself: run `checkout` between tasks.
|
|
364
439
|
|
|
365
440
|
### How checkout composes with neon.ts
|
|
366
441
|
|
|
367
|
-
When a `neon.ts` is present, `neon checkout` applies your policy as it **creates** a branch, so a fresh branch comes up with its declared settings and services already in place. Checking out an _existing_ branch never reconciles it — apply config changes to it explicitly with `neon
|
|
442
|
+
When a `neon.ts` is present, `neon checkout <name> --create` applies your policy as it **creates** a branch, so a fresh branch comes up with its declared settings and services already in place. Pass `--env <file>` on that create so Function env that reads `process.env` resolves (`neon checkout feat --create --env .env.local`). Existing process env wins over the file. Checking out an _existing_ branch never reconciles it — apply config changes to it explicitly with `neon deploy --env <file>` (alias for `neon config apply`). `--update-existing` auto-confirms overriding remote settings; add it only after reviewing those changes. The bundled `env pull` also checks `neon.ts` against the linked branch and fails fast if the branch is missing a declared service, pointing you at `neon deploy --env <file>` to provision it, so your local env and the remote branch never drift apart silently.
|
|
368
443
|
|
|
369
444
|
### Opting out of local env vars
|
|
370
445
|
|
|
371
446
|
If env vars are injected at runtime instead of written to disk — or you simply don't want secrets in the working tree — pass `--no-env-pull` to `link` / `checkout` and supply the env another way:
|
|
372
447
|
|
|
373
|
-
- `neon-env run -- <your dev command>` (from `@neon/env`)
|
|
374
|
-
- `neon-env export`
|
|
375
|
-
- `fetchEnv` from `@neon/env` is the programmatic version
|
|
376
|
-
- `neon dev` injects the same vars into
|
|
448
|
+
- `neon-env run -- <your dev command>` (from `@neon/env`) injects the branch's vars at runtime.
|
|
449
|
+
- `neon-env export` prints dotenv or `--format json`.
|
|
450
|
+
- `fetchEnv` from `@neon/env` is the programmatic version.
|
|
451
|
+
- `neon dev` injects the same vars into the local Functions dev server.
|
|
377
452
|
|
|
378
453
|
When an agent should not write a local `.env`, instruct it (for example in your `AGENTS.md`) to run `neon checkout <branch> --no-env-pull` and rely on runtime injection.
|
|
379
454
|
|
|
380
|
-
For reading env you _already_ have on disk (typed and validated against your `neon.ts`), use `parseEnv` — see [Type-safe env vars with parseEnv](
|
|
455
|
+
For reading env you _already_ have on disk (typed and validated against your `neon.ts`), use `parseEnv` — see [Type-safe env vars with parseEnv](https://neon.com/docs/ai/skills/neon/references/parse-env.md).
|
|
381
456
|
|
|
382
457
|
## Observability
|
|
383
458
|
|
|
384
|
-
Neon exposes branch-scoped logs
|
|
385
|
-
|
|
386
|
-
Use Neon CLI 3.1 or newer first. **Decide which branch you are querying.** Without `--branch`, the CLI uses the branch pinned in `.neon`, or the project's default branch when the workspace isn't linked. A deployed function or bucket usually lives on a different branch than the one checked out for development, so an empty result is more often the wrong branch than a missing log.
|
|
459
|
+
Neon exposes branch-scoped logs for Functions and Object Storage today (`aws-us-east-2`, `aws-us-east-1`, `aws-eu-central-1`, and `aws-ap-southeast-1`). Query the branch that hosts the deployed function or bucket, not the checkout used for development.
|
|
387
460
|
|
|
388
461
|
```bash
|
|
389
462
|
neon logs query --since 1h
|
|
390
463
|
neon logs query --branch production --source function --minimum-severity error --since 6h
|
|
391
|
-
neon logs query --source storage --since 1h --output json
|
|
392
|
-
neon logs fields
|
|
393
|
-
neon logs field-values service_name --since 1h
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
`--source` accepts `function`, `storage`, and `pg_endpoint`, but only `function` and `storage` return records today — `pg_endpoint` is accepted and comes back empty until Postgres logs ship. The window defaults to 1h on `query` and 6h on `field-values`, and cannot exceed 7d on either. If Neon reports `--minimum-severity` as unsupported on a branch, use `--severity-text` instead (an exact, case-sensitive match, e.g. `ERROR`); severities vary by source, so confirm what a branch carries with `neon logs field-values severity_text`. Run `neon logs --help` for the full filter and pagination interface.
|
|
397
|
-
|
|
398
|
-
`--logql` replaces the structured filters with a raw stream selector or line filter. Its stream label is `entity_type`, not `source`:
|
|
399
|
-
|
|
400
|
-
```bash
|
|
401
|
-
neon logs query --since 1h --logql '{entity_type="function"} |= "timeout"'
|
|
402
464
|
```
|
|
403
465
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
In TypeScript applications, use `@neon/sdk`. Project and branch are positional, and `query` returns a lazy paginated iterable rather than a promise:
|
|
407
|
-
|
|
408
|
-
```typescript
|
|
409
|
-
for await (const record of neon.logs.query(projectId, branchId, {
|
|
410
|
-
since: "1h",
|
|
411
|
-
source: "function",
|
|
412
|
-
})) {
|
|
413
|
-
console.log(record.timestamp, record.severity_text, record.message);
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
const { data: fields } = await neon.logs.fields(projectId, branchId);
|
|
417
|
-
const { data: serviceNames } = await neon.logs.fieldValues(
|
|
418
|
-
projectId,
|
|
419
|
-
branchId,
|
|
420
|
-
"service_name",
|
|
421
|
-
);
|
|
422
|
-
```
|
|
423
|
-
|
|
424
|
-
`query`'s iterator always throws on error, but `fields` and `fieldValues` follow the client's `throwOnError`, which defaults to `false` and hands back `{ data, error }`. `fieldValues` resolves to the whole response, not a bare array: read `serviceNames.values`, and treat them as an arbitrary subset whenever `serviceNames.is_truncated` is true.
|
|
425
|
-
|
|
426
|
-
### Loki-compatible read API
|
|
427
|
-
|
|
428
|
-
For direct HTTP reads, authenticate with `Authorization: Bearer <NEON_API_KEY>` and use this branch-scoped base URL:
|
|
429
|
-
|
|
430
|
-
```text
|
|
431
|
-
https://console.neon.tech/telemetry/v1/projects/{projectId}/branches/{branchId}/loki
|
|
432
|
-
```
|
|
433
|
-
|
|
434
|
-
The available endpoints are:
|
|
435
|
-
|
|
436
|
-
- `GET /api/v1/query_range`
|
|
437
|
-
- `GET /api/v1/labels`
|
|
438
|
-
- `GET /api/v1/label/{name}/values`
|
|
439
|
-
|
|
440
|
-
This is a read-only Loki-compatible subset, not a push endpoint or complete Loki deployment. `query_range` supports LogQL stream selectors and line filters, plus `since` or `start`/`end`, `limit`, and `direction`; it does not support aggregations, parsers, or formatting stages.
|
|
441
|
-
|
|
442
|
-
The paths above are the ones to call directly. A Loki client that builds its own paths — a Grafana data source appends `/loki/api/v1` to whatever URL it is given — may need a different root, so confirm the data-source URL against the Neon docs rather than pasting this base.
|
|
466
|
+
CLI flags, LogQL, MCP fallback, Loki HTTP, Grafana URLs, and `@neon/sdk` pagination: [references/logs-loki.md](https://neon.com/docs/ai/skills/neon/references/logs-loki.md).
|
|
443
467
|
|
|
444
468
|
## Manage Neon Resources
|
|
445
469
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
`@neon/sdk` is the official TypeScript client for the [Neon API](https://neon.com/docs/reference/api-reference.md): **Fetch-based, zero-dependency, ESM-only**, generated from Neon's [OpenAPI spec](https://neon.com/api_spec/release/v2.json) with an ergonomic layer on top. It is the successor to [`@neondatabase/api-client`](https://www.npmjs.com/package/@neondatabase/api-client) (axios-based, generated-only). The old client is **not deprecated** and is safe to keep using, but new code should prefer `@neon/sdk`.
|
|
470
|
+
Use [`@neon/sdk`](https://neon.com/docs/ai/skills/neon/references/sdk.md) to manage projects, branches, and snapshots from TypeScript. New code should prefer it over `@neondatabase/api-client`.
|
|
449
471
|
|
|
450
472
|
### Neon for (Agentic) Platforms
|
|
451
473
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
Neon features for agents:
|
|
455
|
-
|
|
456
|
-
- Instant Provisioning: your users never wait for infrastructure.
|
|
457
|
-
- Snapshots: let users toggle between checkpoints of code and state together.
|
|
458
|
-
- Low cost-per-Database: automatic scale to zero and 350ms cold starts.
|
|
459
|
-
- Full-Stack, Batteries-Included: Neon Auth, Data API included at no added charge.
|
|
460
|
-
- Granular API Controls: Track and control usage for flexible limits and invoicing.
|
|
461
|
-
|
|
462
|
-
All details here: https://neon.com/programs/agents.md
|
|
463
|
-
|
|
464
|
-
Apply for the Neon Agent Program for special program pricing here: https://neon.com/programs/agents
|
|
465
|
-
|
|
466
|
-
## Gotchas
|
|
467
|
-
|
|
468
|
-
### Neon Auth: "invalid domain"
|
|
469
|
-
|
|
470
|
-
Neon Auth only redirects back to domains on its trusted-domains list. Anytime the domain your app runs on changes — a new production custom domain, a new deploy/preview URL, moving from `localhost` to a hosted environment, and so on — you must register the new domain with Neon Auth. Otherwise sign-in and OAuth callbacks fail with an **`invalid domain`** error because the redirect target isn't trusted.
|
|
471
|
-
|
|
472
|
-
The easiest way to fix this is the CLI. With the workspace linked to the project (see the branch-first flow above), add the new domain to the trusted list:
|
|
473
|
-
|
|
474
|
-
```bash
|
|
475
|
-
neon neon-auth domain add <domain> # e.g. neon neon-auth domain add https://app.example.com
|
|
476
|
-
neon neon-auth domain list # verify what's currently trusted
|
|
477
|
-
neon neon-auth domain delete <domain> # remove one you no longer use
|
|
478
|
-
```
|
|
479
|
-
|
|
480
|
-
If the workspace isn't linked, pass `--project-id <id>` (and `--branch <id|name>`) explicitly. For local development, `neon neon-auth domain allow-localhost` manages whether `localhost` is permitted. Register the domain before pointing users at the new URL, so they never hit the `invalid domain` error.
|
|
474
|
+
Enroll in the [Neon Agent Program](https://neon.com/programs/agents.md) only when the work is a fleet of user databases (app-generating agents and platforms). A single-app backend skips this. Instant provision, snapshots, scale-to-zero compute (storage still billed), Auth, and Data API compatibility details: that page.
|