vybekiit 0.7.26 → 0.7.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +3891 -1301
- package/dist/global-skills/aws-cdk/SKILL.md +19 -5
- package/dist/global-skills/aws-cdk/references/fast-deployments.md +191 -0
- package/dist/global-skills/aws-cdk/references/troubleshooting-deployment.md +16 -0
- package/dist/global-skills/aws-cloudformation/SKILL.md +16 -26
- package/dist/global-skills/aws-cloudformation/references/check-cloudformation-template-compliance.script.md +7 -3
- package/dist/global-skills/aws-cloudformation/references/cloudformation-language-server.md +177 -0
- package/dist/global-skills/aws-cloudformation/references/cloudformation-pre-deploy-validation.script.md +8 -2
- package/dist/global-skills/aws-cloudformation/references/persist-template-context.script.md +5 -8
- package/dist/global-skills/aws-cloudformation/references/retrieve-template-context.script.md +1 -1
- package/dist/global-skills/aws-cloudformation/references/security-considerations.md +51 -0
- package/dist/global-skills/aws-cloudformation/references/troubleshoot-failed-stack.script.md +138 -0
- package/dist/global-skills/aws-cloudformation/references/{validate-cloudformation-template.script.md → validate-with-cfn-lint.script.md} +15 -27
- package/dist/global-skills/aws-cloudformation/references/validate-with-cloudformation-validate.script.md +181 -0
- package/dist/global-skills/aws-cloudformation/references/validation-tool-selection.md +44 -0
- package/dist/global-skills/aws-serverless/SKILL.md +9 -1
- package/dist/global-skills/aws-serverless/references/architecture.md +3 -1
- package/dist/global-skills/aws-serverless/references/lambda.md +3 -1
- package/dist/global-skills/aws-serverless/references/orchestration.md +1 -0
- package/dist/global-skills/better-auth-best-practices/SKILL.md +18 -8
- package/dist/global-skills/eas-app-stores/SKILL.md +31 -15
- package/dist/global-skills/eas-app-stores/agents/openai.yaml +2 -2
- package/dist/global-skills/eas-app-stores/references/ios-app-store.md +37 -32
- package/dist/global-skills/eas-app-stores/references/native-ios.md +167 -0
- package/dist/global-skills/eas-app-stores/references/play-store.md +3 -7
- package/dist/global-skills/eas-app-stores/references/testflight.md +39 -35
- package/dist/global-skills/eas-simulator/SKILL.md +48 -26
- package/dist/global-skills/eas-simulator/references/controllers.md +32 -3
- package/dist/global-skills/eas-simulator/references/run-your-app.md +34 -4
- package/dist/global-skills/eas-simulator/references/troubleshooting.md +8 -4
- package/dist/global-skills/eas-update/SKILL.md +146 -0
- package/dist/global-skills/eas-update/agents/openai.yaml +4 -0
- package/dist/global-skills/expo-animation/RECIPES.md +2 -2
- package/dist/global-skills/expo-animation/SKILL.md +9 -2
- package/dist/global-skills/expo-brownfield/SKILL.md +18 -11
- package/dist/global-skills/expo-brownfield/agents/openai.yaml +2 -2
- package/dist/global-skills/expo-brownfield/references/brownfield-integrated.md +94 -69
- package/dist/global-skills/expo-brownfield/references/brownfield-isolated.md +40 -42
- package/dist/global-skills/expo-brownfield/references/comparison.md +5 -5
- package/dist/global-skills/expo-brownfield/references/feature-integration.md +163 -0
- package/dist/global-skills/expo-brownfield/references/troubleshooting.md +17 -17
- package/dist/global-skills/expo-brownfield/references/version-compatibility.md +40 -0
- package/dist/global-skills/expo-data-fetching/SKILL.md +27 -6
- package/dist/global-skills/expo-design-system/SKILL.md +27 -7
- package/dist/global-skills/expo-design-system/references/audit.md +7 -2
- package/dist/global-skills/expo-design-system/references/native-slop.md +74 -0
- package/dist/global-skills/expo-examples/SKILL.md +0 -1
- package/dist/global-skills/expo-examples/references/catalog.md +1 -1
- package/dist/global-skills/expo-migrate-module/SKILL.md +21 -10
- package/dist/global-skills/expo-migrate-module/references/compatibility.md +80 -23
- package/dist/global-skills/expo-migrate-module/references/migration-map.md +162 -11
- package/dist/global-skills/expo-native-ui/SKILL.md +25 -16
- package/dist/global-skills/expo-native-ui/agents/openai.yaml +2 -2
- package/dist/global-skills/expo-native-ui/references/controls.md +5 -46
- package/dist/global-skills/expo-native-ui/references/icons.md +21 -2
- package/dist/global-skills/expo-native-ui/references/media.md +15 -20
- package/dist/global-skills/expo-native-ui/references/visual-effects.md +12 -11
- package/dist/global-skills/expo-overview/SKILL.md +17 -12
- package/dist/global-skills/expo-router/SKILL.md +5 -3
- package/dist/global-skills/expo-router/references/tabs.md +5 -5
- package/dist/global-skills/expo-upgrade/SKILL.md +3 -1
- package/dist/global-skills/expo-web-to-native/references/false-friends.md +2 -2
- package/dist/global-skills/expo-web-to-native/references/native-patterns.md +1 -1
- package/dist/global-skills/firebase-ai-logic-basics/SKILL.md +13 -16
- package/dist/global-skills/firebase-ai-logic-basics/references/ios_setup.md +4 -5
- package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_android.md +4 -4
- package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_web.md +3 -3
- package/dist/global-skills/firebase-auth-basics/SKILL.md +11 -6
- package/dist/global-skills/firebase-auth-basics/references/client_sdk_android.md +4 -5
- package/dist/global-skills/firebase-auth-basics/references/client_sdk_web.md +3 -3
- package/dist/global-skills/firebase-auth-basics/references/flutter_setup.md +24 -25
- package/dist/global-skills/firebase-auth-basics/references/security_rules.md +4 -2
- package/dist/global-skills/firebase-crashlytics/references/android_setup.md +7 -4
- package/dist/global-skills/firebase-crashlytics/references/ios_setup.md +2 -3
- package/dist/global-skills/firebase-data-connect/SKILL.md +2 -1
- package/dist/global-skills/firebase-data-connect/examples.md +4 -4
- package/dist/global-skills/firebase-data-connect/reference/config.md +5 -4
- package/dist/global-skills/firebase-data-connect/reference/realtime.md +1 -2
- package/dist/global-skills/firebase-data-connect/reference/sdk_flutter.md +2 -2
- package/dist/global-skills/firebase-data-connect/reference/sdk_ios.md +2 -2
- package/dist/global-skills/firebase-data-connect/reference/sdk_web.md +17 -6
- package/dist/global-skills/firebase-data-connect/reference/security.md +5 -5
- package/dist/global-skills/firebase-data-connect/templates.md +2 -1
- package/dist/global-skills/firebase-firestore/SKILL.md +20 -8
- package/dist/global-skills/firebase-firestore/references/enterprise/android_sdk_usage.md +5 -4
- package/dist/global-skills/firebase-firestore/references/enterprise/data_model.md +12 -3
- package/dist/global-skills/firebase-firestore/references/enterprise/indexes.md +16 -18
- package/dist/global-skills/firebase-firestore/references/enterprise/provisioning.md +1 -1
- package/dist/global-skills/firebase-firestore/references/enterprise/python_sdk_usage.md +5 -1
- package/dist/global-skills/firebase-firestore/references/enterprise/web_sdk_usage.md +7 -7
- package/dist/global-skills/firebase-firestore/references/standard/android_sdk_usage.md +5 -5
- package/dist/global-skills/firebase-firestore/references/standard/flutter_setup.md +4 -4
- package/dist/global-skills/firebase-firestore/references/standard/indexes.md +16 -18
- package/dist/global-skills/firebase-firestore/references/standard/provisioning.md +1 -1
- package/dist/global-skills/firebase-remote-config-basics/SKILL.md +0 -5
- package/dist/global-skills/firebase-remote-config-basics/references/android_setup.md +36 -8
- package/dist/global-skills/firebase-remote-config-basics/references/ios_setup.md +1 -7
- package/dist/global-skills/firebase-security-rules-auditor/SKILL.md +17 -6
- package/dist/global-skills/{firebase-firestore/references/standard/security_rules.md → firestore-rules-creation/SKILL.md} +24 -13
- package/dist/global-skills/grow-my-customers/SKILL.md +23 -0
- package/dist/global-skills/instrument-feature-flags/SKILL.md +25 -25
- package/dist/global-skills/instrument-feature-flags/references/adding-feature-flag-code.md +141 -285
- package/dist/global-skills/instrument-feature-flags/references/android.md +6 -15
- package/dist/global-skills/instrument-feature-flags/references/api.md +4 -11
- package/dist/global-skills/instrument-feature-flags/references/best-practices.md +1 -13
- package/dist/global-skills/instrument-feature-flags/references/django.md +14 -27
- package/dist/global-skills/instrument-feature-flags/references/dotnet.md +20 -79
- package/dist/global-skills/instrument-feature-flags/references/elixir.md +1 -9
- package/dist/global-skills/instrument-feature-flags/references/flask.md +13 -13
- package/dist/global-skills/instrument-feature-flags/references/flutter.md +3 -24
- package/dist/global-skills/instrument-feature-flags/references/go.md +3 -15
- package/dist/global-skills/instrument-feature-flags/references/ios.md +4 -17
- package/dist/global-skills/instrument-feature-flags/references/java.md +5 -13
- package/dist/global-skills/instrument-feature-flags/references/laravel.md +13 -17
- package/dist/global-skills/instrument-feature-flags/references/next-js.md +25 -32
- package/dist/global-skills/instrument-feature-flags/references/nodejs.md +8 -15
- package/dist/global-skills/instrument-feature-flags/references/php.md +1 -15
- package/dist/global-skills/instrument-feature-flags/references/python.md +2 -15
- package/dist/global-skills/instrument-feature-flags/references/react-native.md +13 -15
- package/dist/global-skills/instrument-feature-flags/references/react.md +17 -21
- package/dist/global-skills/instrument-feature-flags/references/ruby-on-rails.md +37 -83
- package/dist/global-skills/instrument-feature-flags/references/ruby.md +2 -15
- package/dist/global-skills/instrument-feature-flags/references/rust.md +13 -25
- package/dist/global-skills/instrument-feature-flags/references/usage.md +14 -63
- package/dist/global-skills/instrument-feature-flags/references/web.md +9 -14
- package/dist/global-skills/instrument-product-analytics/SKILL.md +29 -29
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-hybrid.md +3 -1
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-ssr.md +3 -1
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-static.md +3 -1
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-view-transitions.md +3 -1
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-ruby-on-rails.md +3 -1
- package/dist/global-skills/instrument-product-analytics/references/android.md +72 -107
- package/dist/global-skills/instrument-product-analytics/references/angular.md +26 -28
- package/dist/global-skills/instrument-product-analytics/references/astro.md +13 -24
- package/dist/global-skills/instrument-product-analytics/references/configuration.md +45 -63
- package/dist/global-skills/instrument-product-analytics/references/django.md +14 -27
- package/dist/global-skills/instrument-product-analytics/references/dotnet.md +20 -79
- package/dist/global-skills/instrument-product-analytics/references/elixir.md +47 -49
- package/dist/global-skills/instrument-product-analytics/references/flask.md +13 -13
- package/dist/global-skills/instrument-product-analytics/references/flutter.md +60 -90
- package/dist/global-skills/instrument-product-analytics/references/go.md +17 -56
- package/dist/global-skills/instrument-product-analytics/references/identify-users.md +15 -15
- package/dist/global-skills/instrument-product-analytics/references/ios.md +11 -15
- package/dist/global-skills/instrument-product-analytics/references/laravel.md +13 -17
- package/dist/global-skills/instrument-product-analytics/references/next-js.md +25 -32
- package/dist/global-skills/instrument-product-analytics/references/nuxt-js-3-6.md +13 -27
- package/dist/global-skills/instrument-product-analytics/references/nuxt-js.md +14 -28
- package/dist/global-skills/instrument-product-analytics/references/php.md +33 -84
- package/dist/global-skills/instrument-product-analytics/references/posthog-python.md +229 -9
- package/dist/global-skills/instrument-product-analytics/references/python.md +415 -106
- package/dist/global-skills/instrument-product-analytics/references/react-native.md +161 -155
- package/dist/global-skills/instrument-product-analytics/references/react-router-v6.md +12 -33
- package/dist/global-skills/instrument-product-analytics/references/react-router-v7-data-mode.md +15 -33
- package/dist/global-skills/instrument-product-analytics/references/react-router-v7-declarative-mode.md +12 -33
- package/dist/global-skills/instrument-product-analytics/references/react-router-v7-framework-mode.md +26 -41
- package/dist/global-skills/instrument-product-analytics/references/ruby-on-rails.md +37 -83
- package/dist/global-skills/instrument-product-analytics/references/ruby.md +48 -108
- package/dist/global-skills/instrument-product-analytics/references/svelte.md +18 -24
- package/dist/global-skills/instrument-product-analytics/references/tanstack-start.md +17 -19
- package/dist/global-skills/instrument-product-analytics/references/usage.md +14 -63
- package/dist/global-skills/instrument-product-analytics/references/vue-js.md +29 -28
- package/dist/global-skills/manifest.json +8 -2
- package/dist/global-skills/mongodb-search-and-ai/SKILL.md +28 -37
- package/dist/global-skills/mongodb-search-and-ai/references/automated-embedding.md +438 -0
- package/dist/global-skills/mongodb-search-and-ai/references/hybrid-search.md +60 -4
- package/dist/global-skills/mongodb-search-and-ai/references/vector-search.md +46 -108
- package/dist/global-skills/neon/SKILL.md +207 -213
- package/dist/global-skills/neon/references/auth.md +12 -0
- package/dist/global-skills/neon/references/claimable-neon.md +10 -14
- package/dist/global-skills/neon/references/function-triggers.md +53 -0
- package/dist/global-skills/neon/references/logs-loki.md +61 -0
- package/dist/global-skills/neon/references/parse-env.md +32 -0
- package/dist/global-skills/neon/references/sdk.md +7 -0
- package/dist/global-skills/neon-ai-gateway/SKILL.md +14 -16
- package/dist/global-skills/neon-auth/SKILL.md +155 -0
- package/dist/global-skills/neon-auth/references/managed-auth.md +173 -0
- package/dist/global-skills/neon-auth/references/self-managed.md +25 -0
- package/dist/global-skills/neon-functions/SKILL.md +159 -84
- package/dist/global-skills/neon-functions/references/ai-sdk.md +4 -6
- package/dist/global-skills/neon-functions/references/function-triggers.md +249 -0
- package/dist/global-skills/neon-functions/references/mastra-studio.md +3 -3
- package/dist/global-skills/neon-functions/references/mcp.md +1 -1
- package/dist/global-skills/neon-functions/references/production-hardening.md +340 -0
- package/dist/global-skills/neon-functions/references/sse.md +8 -5
- package/dist/global-skills/neon-object-storage/SKILL.md +10 -11
- package/dist/global-skills/neon-postgres/SKILL.md +120 -17
- package/dist/global-skills/neon-postgres/references/full-text-search.md +99 -0
- package/dist/global-skills/neon-postgres/references/hybrid-search.md +90 -0
- package/dist/global-skills/neon-postgres/references/lakebase-search-drizzle.md +172 -0
- package/dist/global-skills/neon-postgres/references/vector-search.md +137 -0
- package/dist/global-skills/neon-postgres-branches/SKILL.md +3 -3
- package/dist/global-skills/neon-postgres-egress-optimizer/SKILL.md +1 -1
- package/dist/global-skills/onboarding/SKILL.md +8 -6
- package/dist/global-skills/resend/SKILL.md +4 -2
- package/dist/global-skills/resend/references/broadcasts.md +6 -1
- package/dist/global-skills/resend/references/receiving.md +29 -10
- package/dist/global-skills/resend/references/sending/email-management.md +14 -4
- package/dist/global-skills/resend/references/topics.md +9 -6
- package/dist/global-skills/resend/references/usage.md +117 -0
- package/dist/global-skills/resend/references/webhooks.md +59 -2
- package/dist/global-skills/stripe-best-practices/SKILL.md +35 -29
- package/dist/global-skills/stripe-best-practices/references/billing.md +9 -2
- package/dist/global-skills/stripe-best-practices/references/payments.md +4 -2
- package/dist/global-skills/stripe-best-practices/references/security.md +3 -1
- package/dist/global-skills/stripe-best-practices/references/tax.md +39 -20
- package/dist/global-skills/supabase/SKILL.md +6 -0
- package/dist/global-skills/use-railway/SKILL.md +42 -22
- package/dist/global-skills/use-railway/references/analyze-db.md +7 -6
- package/dist/global-skills/use-railway/references/cloud-agents.md +70 -0
- package/dist/global-skills/use-railway/references/configure.md +17 -2
- package/dist/global-skills/use-railway/references/databases.md +107 -0
- package/dist/global-skills/use-railway/references/deploy.md +5 -5
- package/dist/global-skills/use-railway/references/feature-flags.md +25 -13
- package/dist/global-skills/use-railway/references/iac.md +66 -77
- package/dist/global-skills/use-railway/references/operate.md +26 -3
- package/dist/global-skills/use-railway/references/request.md +31 -23
- package/dist/global-skills/use-railway/references/setup.md +16 -5
- package/dist/global-skills/use-railway/references/tracing.md +261 -0
- package/dist/global-skills/use-railway/references/usage.md +52 -0
- package/dist/global-skills/validate-my-idea/SKILL.md +54 -0
- package/dist/global-skills/{feedback → vybekiit-feedback}/SKILL.md +16 -12
- package/dist/global-skills/watch-my-app/SKILL.md +53 -0
- package/dist/global-skills/workers-best-practices/SKILL.md +36 -103
- package/dist/global-skills/workers-best-practices/references/configuration.md +139 -0
- package/dist/global-skills/workers-best-practices/references/platform-apis.md +51 -0
- package/dist/global-skills/workers-best-practices/references/{rules.md → runtime-patterns.md} +13 -137
- package/dist/global-skills/wrangler/SKILL.md +48 -901
- package/dist/global-skills/xcode-project-setup/scripts/xcode_spm_setup/Sources/main.swift +19 -15
- package/package.json +9 -8
- package/dist/global-skills/expo-native-ui/references/animations.md +0 -220
- package/dist/global-skills/firebase-firestore/references/enterprise/security_rules.md +0 -577
- package/dist/global-skills/workers-best-practices/references/review.md +0 -174
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Auth
|
|
2
|
+
|
|
3
|
+
Login identity lives in the `neon-auth` skill: choose Managed Better Auth, keep existing Better Auth or another IdP, or point at self-managed Better Auth when a required feature is outside Managed support.
|
|
4
|
+
|
|
5
|
+
Fetch https://neon.com/docs/ai/skills/neon-auth/SKILL.md
|
|
6
|
+
|
|
7
|
+
Until the released CLI catalog includes `neon-auth`, do not run `neon skills -s neon-auth` (unknown names fail). If the neon.com URL is unpublished, fetch https://github.com/neondatabase/agent-skills/blob/main/skills/neon-auth/SKILL.md
|
|
8
|
+
|
|
9
|
+
Implementation:
|
|
10
|
+
|
|
11
|
+
- Managed setup: https://neon.com/docs/ai/skills/neon-auth/references/managed-auth.md
|
|
12
|
+
- Self-managed pointer (not a second tutorial): https://neon.com/docs/ai/skills/neon-auth/references/self-managed.md
|
|
@@ -10,8 +10,8 @@ Use this after the neon skill account check found no account.
|
|
|
10
10
|
|
|
11
11
|
1. Install the CLI: `npm i -g neon@latest`
|
|
12
12
|
2. If `neon claim --help` does not list `create`, skip to [If neon claim is missing](#if-neon-claim-is-missing).
|
|
13
|
-
3. Write a `neon.ts` that declares the services you need, or skip the file and pass `--service` on create. Postgres is always requested.
|
|
14
|
-
4. Create the project: `neon claim create --env-pull` (add `--service
|
|
13
|
+
3. Write a `neon.ts` that declares the services you need, or skip the file and pass `--service` on create. Postgres is always requested. Request Auth when login is needed. Request `data-api` only for PostgREST / Supabase database-client compatibility.
|
|
14
|
+
4. Create the project: `neon claim create --env-pull` (add `--service auth` if there is no `neon.ts` and login is requested)
|
|
15
15
|
5. If create did not write env, pull it: `neon env pull`
|
|
16
16
|
6. Use the `neon-postgres` skill for connections, schemas, and queries. Install it if it is missing: `neon skills -s neon-postgres`
|
|
17
17
|
|
|
@@ -22,17 +22,22 @@ npm i -g neon@latest
|
|
|
22
22
|
neon claim --help
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
If that help lists `create` and you need Auth
|
|
25
|
+
If that help lists `create` and you need Auth, `npm i @neon/config` and write `neon.ts`. Then `neon claim create --env-pull`.
|
|
26
26
|
|
|
27
27
|
```typescript
|
|
28
28
|
import { defineConfig } from "@neon/config/v1";
|
|
29
29
|
|
|
30
30
|
export default defineConfig({
|
|
31
31
|
auth: true,
|
|
32
|
-
dataApi: true,
|
|
33
32
|
});
|
|
34
33
|
```
|
|
35
34
|
|
|
35
|
+
`claim create --service` accepts `postgres`, `auth`, `data-api`, `functions`, `object-storage`, and `ai-gateway`. `init --services` accepts the same names except `postgres` (every branch has it). Selecting `data-api` on init also declares Auth. Compatibility-only:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
neon claim create --service auth --service data-api --env-pull
|
|
39
|
+
```
|
|
40
|
+
|
|
36
41
|
`neon claim create` reads `neon.ts` when it is present. It writes provisioned vars to an existing `.env`, otherwise `.env.local`, and gitignores that file. If `.env` or `.env.local` already has a `DATABASE_URL` (or other Neon-managed keys), pass `--file <path>` or `--no-env-pull`. The identity assertion is the pre-claim credential.
|
|
37
42
|
|
|
38
43
|
Before claim, Postgres is always granted; Auth and the Data API are granted when requested. Functions, Object Storage, and AI Gateway come back with `granted: false` and `reason: "requires_claim"`. The CLI prints those as `denied_capabilities`. Report what you were given. Do not retry or strip them.
|
|
@@ -49,16 +54,7 @@ Continuing to Neon starts a transfer with a new 15-minute window and leaves the
|
|
|
49
54
|
|
|
50
55
|
When `reconciled` is true, the pre-claim `DATABASE_URL` no longer works. Auth and Data API URLs stay if they were granted. The human signs in with `neon auth`. Then the agent runs `neon link` and `neon env pull` to write the new `DATABASE_URL`. `neon link` discovers the project after that sign-in.
|
|
51
56
|
|
|
52
|
-
Auth
|
|
53
|
-
|
|
54
|
-
```typescript
|
|
55
|
-
import { defineConfig } from "@neon/config/v1";
|
|
56
|
-
|
|
57
|
-
export default defineConfig({
|
|
58
|
-
auth: true,
|
|
59
|
-
dataApi: true,
|
|
60
|
-
});
|
|
61
|
-
```
|
|
57
|
+
Auth stays off unless requested at create or enabled later. Request the Data API only for PostgREST / Supabase database-client compatibility. On the unclaimed project, `neon.ts` plus `neon deploy` enables requested services. After claim, the same config talks to Neon directly. An external JWKS is only accepted after claim. Data API with the default auth provider requires Auth.
|
|
62
58
|
|
|
63
59
|
```bash
|
|
64
60
|
neon deploy
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Function Triggers (CLI, MCP, REST)
|
|
2
|
+
|
|
3
|
+
A Function Trigger is a branch-scoped rule that 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 (`aws-us-east-2`, `aws-us-east-1`, `aws-eu-central-1`, and `aws-ap-southeast-1`).
|
|
4
|
+
|
|
5
|
+
**Prefer `neon.ts`.** Declare a `triggers` map. The record key is the trigger name. `neon deploy` applies triggers after the functions they target. Names must be unique among every trigger visible on the branch. Triggers that exist remotely but are omitted from `neon.ts` are left alone; delete with `neon triggers delete`.
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { defineConfig } from "@neon/config/v1";
|
|
9
|
+
|
|
10
|
+
export default defineConfig({
|
|
11
|
+
functions: {
|
|
12
|
+
ingest: { name: "Object ingest", source: "src/index.ts" },
|
|
13
|
+
cron: { name: "Cron", source: "src/cron.ts" },
|
|
14
|
+
},
|
|
15
|
+
buckets: { assets: { access: "public_read" } },
|
|
16
|
+
triggers: {
|
|
17
|
+
"on-upload": {
|
|
18
|
+
type: "storage_object_created",
|
|
19
|
+
function: "ingest",
|
|
20
|
+
bucket: "assets",
|
|
21
|
+
prefix: "logos/",
|
|
22
|
+
functionPath: "/object",
|
|
23
|
+
},
|
|
24
|
+
"every-minute": {
|
|
25
|
+
type: "schedule",
|
|
26
|
+
function: "cron",
|
|
27
|
+
cron: "* * * * *",
|
|
28
|
+
functionPath: "/cron",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Needs Neon CLI 4.21 or newer (`@neon/config` 1.7.0).
|
|
35
|
+
|
|
36
|
+
**CLI** when you are not applying `neon.ts`, or to list, enable, disable, or delete. `create` takes `--cron` or `--bucket`, not both:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
neon triggers create --function-slug cron --name hourly --cron '0 * * * *' --function-path /cron
|
|
40
|
+
neon triggers create --function-slug ingest --name on-upload --bucket assets --prefix 'logos/' --function-path /object
|
|
41
|
+
neon triggers list
|
|
42
|
+
neon triggers update <id> --branch <branch> --cron '*/30 * * * *'
|
|
43
|
+
neon triggers update <id> --branch <branch> --bucket assets --prefix 'incoming/'
|
|
44
|
+
neon triggers enable <id> --branch <branch>
|
|
45
|
+
neon triggers disable <id> --branch <branch>
|
|
46
|
+
neon triggers delete <id> --branch <branch>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Inspect a trigger with `neon triggers list --output json`. Pass `--branch` on get/update/enable/disable/delete: without it the CLI resolves the trigger id as a branch name. Inherited triggers (created on a parent branch) show `Inherited true` on the child and start disabled. `neon deploy` of a `neon.ts` that declares the same trigger enables that copy; omit it to leave the inherited trigger disabled.
|
|
50
|
+
|
|
51
|
+
**MCP backup** (Neon MCP server, `?category=functions`): `list_triggers`, `get_trigger`, `create_trigger`, `update_trigger`, `delete_trigger`. `create_trigger` takes `project_id`, `branch_id` (a `br-…` id, not a name), and `body` with `"type": "schedule"`, `function_slug`, `name`, and `schedule: { cron }`. REST if neither CLI nor MCP is available: `POST /projects/{project_id}/branches/{branch_id}/triggers`. Schedule body matches MCP. Storage body uses `"type": "storage_object_created"` and `storage_object_created: { bucket_name, prefix }`. CLI reference: https://neon.com/docs/cli/triggers.md.
|
|
52
|
+
|
|
53
|
+
Authenticate a trigger delivery with `parseTriggerDelivery` from `@neon/functions` (≥ 0.11.0). `parseTrigger` / `parseTriggerInvocation` stay schedule-only. Full type table, payload, and Hono example: the `neon-functions` skill, `references/function-triggers.md`.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Logs: CLI, Loki, and SDK pagination
|
|
2
|
+
|
|
3
|
+
Neon exposes branch-scoped logs. **Today they cover Neon Functions and Object Storage only.** Postgres computes and the AI Gateway are coming; until then, neither emits records. Logs are available in `aws-us-east-2`, `aws-us-east-1`, `aws-eu-central-1`, and `aws-ap-southeast-1`. A branch that can't serve logs at all answers `404` with `reason: telemetry_not_enabled` (the message says whether it's the wrong region or a branch not collecting telemetry yet), versus a `200` empty result when the branch is enabled but has no records in the window; an unknown branch answers `reason: branch_not_found`.
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
neon logs query --since 1h
|
|
9
|
+
neon logs query --branch production --source function --minimum-severity error --since 6h
|
|
10
|
+
neon logs query --source storage --since 1h --output json
|
|
11
|
+
neon logs fields
|
|
12
|
+
neon logs field-values service_name --since 1h
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`--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.
|
|
16
|
+
|
|
17
|
+
`--logql` replaces the structured filters with a raw stream selector or line filter. Its stream label is `entity_type`, not `source`:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
neon logs query --since 1h --logql '{entity_type="function"} |= "timeout"'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
If the CLI is unavailable, fall back to the Neon MCP server's read-only `query_logs`, `list_log_fields`, and `list_log_field_values` tools.
|
|
24
|
+
|
|
25
|
+
## Loki-compatible read API
|
|
26
|
+
|
|
27
|
+
For direct HTTP reads, authenticate with `Authorization: Bearer <NEON_API_KEY>` and use this branch-scoped base URL:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
https://console.neon.tech/telemetry/v1/projects/{projectId}/branches/{branchId}/loki
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The available endpoints are:
|
|
34
|
+
|
|
35
|
+
- `GET /api/v1/query_range`
|
|
36
|
+
- `GET /api/v1/labels`
|
|
37
|
+
- `GET /api/v1/label/{name}/values`
|
|
38
|
+
|
|
39
|
+
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.
|
|
40
|
+
|
|
41
|
+
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.
|
|
42
|
+
|
|
43
|
+
In TypeScript applications, use `@neon/sdk`. Project and branch are positional, and `query` returns a lazy paginated iterable rather than a promise:
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
for await (const record of neon.logs.query(projectId, branchId, {
|
|
47
|
+
since: "1h",
|
|
48
|
+
source: "function",
|
|
49
|
+
})) {
|
|
50
|
+
console.log(record.timestamp, record.severity_text, record.message);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const { data: fields } = await neon.logs.fields(projectId, branchId);
|
|
54
|
+
const { data: serviceNames } = await neon.logs.fieldValues(
|
|
55
|
+
projectId,
|
|
56
|
+
branchId,
|
|
57
|
+
"service_name",
|
|
58
|
+
);
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
`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.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Type-safe env vars with parseEnv
|
|
2
|
+
|
|
3
|
+
`@neon/env`'s `parseEnv` takes your `neon.ts` config object and returns a parsed, typed env object, validated against the services you declared. The shape of `env` follows your config, and missing variables are flagged with clear errors.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm i @neon/env
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { parseEnv } from "@neon/env";
|
|
11
|
+
import config from "./neon";
|
|
12
|
+
|
|
13
|
+
const env = parseEnv(config);
|
|
14
|
+
|
|
15
|
+
console.log(env.postgres.databaseUrl);
|
|
16
|
+
console.log(env.auth.baseUrl);
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
By default `parseEnv` requires _every_ variable your config implies. When one of your apps only uses a subset, for example when you need to read `DATABASE_URL` but never the unpooled URL, pass an array of env-var keys to require and validate only those. The keys are typesafe: autocomplete only offers variables your config enables, and the returned shape is narrowed to exactly what you selected (so unselected variables are neither enforced nor present).
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { parseEnv } from "@neon/env";
|
|
23
|
+
import config from "./neon";
|
|
24
|
+
|
|
25
|
+
// Only DATABASE_URL is required and returned; DATABASE_URL_UNPOOLED is not enforced.
|
|
26
|
+
const { postgres } = parseEnv(config, ["DATABASE_URL"]);
|
|
27
|
+
console.log(postgres.databaseUrl);
|
|
28
|
+
|
|
29
|
+
// Selecting across services — only these keys are validated.
|
|
30
|
+
const env = parseEnv(config, ["DATABASE_URL", "NEON_AUTH_BASE_URL"]);
|
|
31
|
+
console.log(env.postgres.databaseUrl, env.auth.baseUrl);
|
|
32
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @neon/sdk
|
|
2
|
+
|
|
3
|
+
`@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`.
|
|
4
|
+
|
|
5
|
+
Use it to manage Neon resources programmatically: creating projects, branches, and snapshots for dev scripts, CI/CD automations, and platforms building on top of Neon.
|
|
6
|
+
|
|
7
|
+
Log query pagination lives in [logs-loki.md](https://neon.com/docs/ai/skills/neon/references/logs-loki.md).
|
|
@@ -22,12 +22,12 @@ metadata:
|
|
|
22
22
|
If the `neon` skill is not installed, fetch it from https://neon.com/docs/ai/skills/neon/SKILL.md or install it with:
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
|
|
25
|
+
neon skills -s neon -y
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
# Neon AI Gateway
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
Currently available in `aws-us-east-2`, `aws-us-east-1`, `aws-eu-central-1`, and `aws-ap-southeast-1`.
|
|
31
31
|
|
|
32
32
|
The Neon AI Gateway is the LLM inference layer built into your Neon branch: one API and one Neon credential give you access to frontier and open-source models from many providers (Anthropic, OpenAI, Google, Meta, and more), all hosted and powered by Databricks. The catalog shifts over time, so treat `/v1/models` and the [models.dev Neon page](https://models.dev/providers/neon) as the source of truth rather than a fixed provider list. Your existing OpenAI/Anthropic/Gemini SDK works by changing only the base URL.
|
|
33
33
|
|
|
@@ -55,29 +55,27 @@ If the user already has a deep, single-provider integration and no interest in N
|
|
|
55
55
|
|
|
56
56
|
Check these preconditions before setting anything up:
|
|
57
57
|
|
|
58
|
-
The AI Gateway is
|
|
58
|
+
The AI Gateway is currently available in `aws-us-east-2`, `aws-us-east-1`, `aws-eu-central-1`, and `aws-ap-southeast-1`. Foundation model access requires a paid Neon plan. Confirm the user's project is in one of these regions.
|
|
59
59
|
|
|
60
60
|
### Enabling the gateway: plan and model-catalog gating
|
|
61
61
|
|
|
62
|
-
The AI Gateway is credential-gated rather than a provisioning step, but two plan
|
|
62
|
+
The AI Gateway is credential-gated rather than a provisioning step, but two plan limits gate it — one blocks provisioning, the other only trims the catalog — and the CLI surfaces each:
|
|
63
63
|
|
|
64
|
-
- **Free plan → provisioning is blocked.** `neon config apply` / `deploy` and `neon checkout` **refuse** to enable the gateway on a Free plan (the gateway can't serve requests there), with a friendly "upgrade to a paid plan, or remove `
|
|
65
|
-
- **Paid plan with a reduced model catalog.** On a paid plan the gateway provisions and serves, but
|
|
64
|
+
- **Free plan → provisioning is blocked.** `neon config apply` / `deploy` and `neon checkout` **refuse** to enable the gateway on a Free plan (the gateway can't serve requests there), with a friendly "upgrade to a paid plan, or remove `aiGateway`" error. A dry-run `neon config plan` and `neon env pull` don't provision, so they only **warn**. So: to use the gateway the project's account must be on a paid Neon plan.
|
|
65
|
+
- **Paid plan with a reduced model catalog.** On a paid plan the gateway provisions and serves, but an account can start with a trimmed catalog — some flagship models (e.g. Anthropic Opus, OpenAI Codex / `*-pro`) are missing from `GET /v1/models`. This is expected; `neon env pull` (and the env pull bundled into `apply` / `deploy` / `checkout`) warns and links the user to their branch's AI Gateway page in the Neon Console (`https://console.neon.tech/app/projects/<project-id>/branches/<branch-id>/ai-gateway`) to request access to more models. Verify what's actually available for the branch by reading `/v1/models` (see the models section below) rather than assuming the full catalog.
|
|
66
66
|
|
|
67
67
|
When helping a user debug "the gateway isn't working" or "a model is missing", use `/v1/models` plus the account's plan to distinguish these two cases — a Free plan blocks provisioning entirely, while a reduced catalog on a paid plan just needs a model-access request.
|
|
68
68
|
|
|
69
69
|
## Setup
|
|
70
70
|
|
|
71
|
-
The gateway is part of `neon.ts` (see the `neon` skill for the branch-first workflow and `neon.ts` basics). Enable it
|
|
71
|
+
The gateway is part of `neon.ts` (see the `neon` skill for the branch-first workflow and `neon.ts` basics). Enable it with `aiGateway`:
|
|
72
72
|
|
|
73
73
|
```typescript
|
|
74
74
|
// neon.ts
|
|
75
75
|
import { defineConfig } from "@neon/config/v1";
|
|
76
76
|
|
|
77
77
|
export default defineConfig({
|
|
78
|
-
|
|
79
|
-
aiGateway: true,
|
|
80
|
-
},
|
|
78
|
+
aiGateway: true,
|
|
81
79
|
});
|
|
82
80
|
```
|
|
83
81
|
|
|
@@ -87,7 +85,7 @@ neon deploy # provisions the gateway on the linked branch
|
|
|
87
85
|
|
|
88
86
|
## Neon Infrastructure as Code (`neon.ts`)
|
|
89
87
|
|
|
90
|
-
The `
|
|
88
|
+
The `aiGateway` toggle above is part of `neon.ts`, Neon's infrastructure-as-code file — one TypeScript file declares the gateway alongside every other branch service, in version control (see the `neon` skill for the full reference). Reconcile it against a branch the Terraform way:
|
|
91
89
|
|
|
92
90
|
```bash
|
|
93
91
|
neon config status # print the branch's live config (is the gateway on?)
|
|
@@ -99,7 +97,7 @@ The gateway is **branch-scoped**: each branch gets its own gateway host. When a
|
|
|
99
97
|
|
|
100
98
|
## Environment Variables
|
|
101
99
|
|
|
102
|
-
When `
|
|
100
|
+
When `aiGateway` is enabled, Neon injects the gateway credentials as **Neon-branded** env vars. Inside a deployed Neon Function these are injected automatically; locally, `neon env pull` writes them to `.env`/`.env.local` (or use `neon-env run -- <cmd>` to inject at runtime without a file):
|
|
103
101
|
|
|
104
102
|
| Variable | Meaning |
|
|
105
103
|
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -177,11 +175,11 @@ const { text } = await generateText({
|
|
|
177
175
|
});
|
|
178
176
|
```
|
|
179
177
|
|
|
180
|
-
For a full AI SDK agent deployed as a Neon Function (streaming, tool calling, image generation, persistence), see the `neon-functions` skill's
|
|
178
|
+
For a full AI SDK agent deployed as a Neon Function (streaming, tool calling, image generation, persistence), see the `neon-functions` skill's [references/ai-sdk.md](https://neon.com/docs/ai/skills/neon-functions/references/ai-sdk.md).
|
|
181
179
|
|
|
182
180
|
## Build Agents with Mastra (Recommended)
|
|
183
181
|
|
|
184
|
-
[Mastra](https://mastra.ai) is the recommended framework when you want batteries-included agents — built-in memory, tools, workflows, and tracing — with the model still pointed at the gateway. With `@mastra/core` 1.47+, use a `neon/<model>` magic string; Mastra reads `NEON_AI_GATEWAY_BASE_URL` and `NEON_AI_GATEWAY_TOKEN` from the environment (injected by `neon deploy` when `
|
|
182
|
+
[Mastra](https://mastra.ai) is the recommended framework when you want batteries-included agents — built-in memory, tools, workflows, and tracing — with the model still pointed at the gateway. With `@mastra/core` 1.47+, use a `neon/<model>` magic string; Mastra reads `NEON_AI_GATEWAY_BASE_URL` and `NEON_AI_GATEWAY_TOKEN` from the environment (injected by `neon deploy` when `aiGateway` is enabled). Use `parseEnv` only for other declared services (e.g. `env.postgres.databaseUrl` for `@mastra/pg` memory):
|
|
185
183
|
|
|
186
184
|
```typescript
|
|
187
185
|
import { Agent } from "@mastra/core/agent";
|
|
@@ -255,8 +253,8 @@ curl "$NEON_AI_GATEWAY_BASE_URL/v1/models" \
|
|
|
255
253
|
|
|
256
254
|
**Getting the credentials for the request.** Both values come from the same branch-scoped Neon credential the gateway uses everywhere else — you never manage a provider key:
|
|
257
255
|
|
|
258
|
-
- **Provision via `neon.ts` (recommended).** Enable `
|
|
259
|
-
- **Pull into the environment via CLI.** `neon env pull` writes the two vars to `.env`/`.env.local`, or `neon-env run -- <cmd>` injects them at runtime without a file — but only when `neon.ts` declares `
|
|
256
|
+
- **Provision via `neon.ts` (recommended).** Enable `aiGateway` in `neon.ts` and run `neon deploy` (or `neon config apply`). Provisioning, `neon link`, and `neon checkout` pull `NEON_AI_GATEWAY_TOKEN` + `NEON_AI_GATEWAY_BASE_URL` into your local `.env.local`; inside a deployed Neon Function they're injected automatically. See **Setup** and **Environment Variables** above.
|
|
257
|
+
- **Pull into the environment via CLI.** `neon env pull` writes the two vars to `.env`/`.env.local`, or `neon-env run -- <cmd>` injects them at runtime without a file — but only when `neon.ts` declares `aiGateway`; the vars are never pulled off branch state alone.
|
|
260
258
|
- **Provision via the Console UI.** Enable the AI Gateway on the branch in the Neon Console and copy the branch's gateway base URL and a Neon credential (token) from the project's connection/credentials view.
|
|
261
259
|
|
|
262
260
|
Any Neon credential (`nt_live_...`) valid for the branch works as the bearer token; `NEON_AI_GATEWAY_BASE_URL` is the bare branch host (no path).
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: neon-auth
|
|
3
|
+
description: >-
|
|
4
|
+
Add authentication to a new app. Use for "add auth", "add login", Neon Auth
|
|
5
|
+
(Managed Better Auth), identity routing, sign-up, sign-in, password reset,
|
|
6
|
+
email OTP, magic links, organizations, phone OTP, OAuth, passkeys, MFA,
|
|
7
|
+
trusted domains, invalid domain, and @neondatabase/auth. No existing identity:
|
|
8
|
+
default to Managed Better Auth. Keep working Better Auth, Clerk, Supabase
|
|
9
|
+
Auth, or another IdP. User asked to migrate from Supabase Auth: Managed
|
|
10
|
+
Better Auth. A required plugin outside Managed support: self-managed Better
|
|
11
|
+
Auth on a Neon Function or the existing app host. Also use for auth APIs in
|
|
12
|
+
@neondatabase/neon-js.
|
|
13
|
+
metadata:
|
|
14
|
+
parent: neon
|
|
15
|
+
source: https://github.com/neondatabase/agent-skills/tree/main/skills/neon-auth
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
**FIRST**: Use the parent `neon` skill for a Neon overview, getting started with Neon, Neon development best practices, and more.
|
|
19
|
+
|
|
20
|
+
If the `neon` skill is not installed, fetch it from https://neon.com/docs/ai/skills/neon/SKILL.md or install it with:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
neon skills -s neon -y
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
# Neon Auth
|
|
27
|
+
|
|
28
|
+
Neon Auth is Managed Better Auth: users, sessions, and auth config live in the `neon_auth` schema on the branch's Lakebase Postgres, and auth state branches with the database. The client API is the Better Auth method set (`signIn.email`, `signIn.social`, `getSession`) through `@neondatabase/auth`. That wrapper is not a drop-in for bare `better-auth/client`: it pins the plugin list and adds Neon-specific OAuth verifier, iframe popup, and JWT handling. Stay on the wrapper while Auth is managed.
|
|
29
|
+
|
|
30
|
+
This skill chooses identity, then implements Managed Better Auth. It does not replace a working auth server in order to use Postgres, Functions, Object Storage, or the AI Gateway.
|
|
31
|
+
|
|
32
|
+
## When to Use
|
|
33
|
+
|
|
34
|
+
Inspect existing identity and the required login features before provisioning. A supplied `DATABASE_URL` is not a reason to change identity. Adding a Neon Function is not a reason to change identity.
|
|
35
|
+
|
|
36
|
+
| Situation | What to do |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| No existing auth | Default to Managed Better Auth. [Managed setup](#managed-setup), then [references/managed-auth.md](references/managed-auth.md). |
|
|
39
|
+
| Needs a feature Managed does not offer | Self-managed Better Auth on the existing app host (Vercel or similar) or a Neon Function. Keep Lakebase Postgres. Confirm the **installed** Better Auth version documents that exact flow before recommending the move. If support stays unresolved, keep the current identity. [references/self-managed.md](references/self-managed.md). |
|
|
40
|
+
| Already has Better Auth | Keep it. It works with the other Neon primitives. Migrate to Managed only if the user asks. |
|
|
41
|
+
| User asked to migrate from Supabase Auth | Managed Better Auth. [Supabase Auth](#supabase-auth). Moving only Postgres or adding a Function keeps Supabase Auth. |
|
|
42
|
+
| Clerk, Auth.js, Supabase Auth, or another working IdP | Keep it unless the user asks to migrate. |
|
|
43
|
+
|
|
44
|
+
Google, GitHub, and Vercel social OAuth are offered on Managed Auth. They are not a reason to leave Managed Auth. Other OAuth providers, generic OAuth, MFA, passkeys, API keys, MCP OAuth, SSO, custom plugins, hooks, and custom JWT claims are the [plugin matrix](#plugin-support) check.
|
|
45
|
+
|
|
46
|
+
Before enabling Managed Auth, confirm the project is on AWS and does not use IP Allow or Private Networking. Leave those protections in place.
|
|
47
|
+
|
|
48
|
+
Configure supported Managed plugins through Neon (Console, API, or `neon neon-auth`), not by passing `plugins` into `@neondatabase/auth`. Enabling `auth: true` is not implementing login.
|
|
49
|
+
|
|
50
|
+
## What It Does
|
|
51
|
+
|
|
52
|
+
- **Managed identity in Postgres** — users and sessions in `neon_auth`, queryable with SQL, compatible with RLS.
|
|
53
|
+
- **Auth emails without an app mailer** — verification, email OTP, magic links, and password reset. Getting started uses shared SMTP (`auth@mail.myneon.app`). You do not add Resend or SendGrid to implement login. Production needs custom SMTP: https://neon.com/docs/auth/production-checklist.md
|
|
54
|
+
- **Branches with the database** — each branch has its own Auth URL and isolated auth state.
|
|
55
|
+
- **Better Auth client methods via the Neon SDK** — `@neondatabase/auth` (auth only) or `@neondatabase/neon-js/auth` (combined SDK). Optional UI: `@neondatabase/auth-ui`.
|
|
56
|
+
- **Fixed plugin set** — the Managed client does not accept a `plugins` option. See [plugin support](#plugin-support).
|
|
57
|
+
|
|
58
|
+
## Availability
|
|
59
|
+
|
|
60
|
+
Managed Better Auth is generally available. AWS regions only. It cannot be enabled on a project with IP Allow or Private Networking.
|
|
61
|
+
|
|
62
|
+
Organization is separately Partial / Beta. Hosting self-managed Better Auth in a Neon Function follows Functions availability and claim rules; use the `neon-functions` skill for that host. An unclaimed project that can enable Auth still cannot use Functions until claim.
|
|
63
|
+
|
|
64
|
+
## Managed setup
|
|
65
|
+
|
|
66
|
+
Merge Auth into the existing `neon.ts`. Do not replace other fields:
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
import { defineConfig } from "@neon/config/v1";
|
|
70
|
+
|
|
71
|
+
export default defineConfig({
|
|
72
|
+
auth: true,
|
|
73
|
+
});
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
neon deploy
|
|
78
|
+
neon neon-auth status
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
If Function env in that config reads `process.env`, use `neon deploy --env <file>` as the parent skill describes. The manual service command is `neon neon-auth enable`; do not run both enable and deploy as redundant required steps when `neon.ts` already declares `auth: true`.
|
|
82
|
+
|
|
83
|
+
Then implement login: [references/managed-auth.md](references/managed-auth.md).
|
|
84
|
+
|
|
85
|
+
Claimable projects: follow the parent Claimable path, then `auth: true` and `neon deploy` when login is requested and no existing provider should be preserved.
|
|
86
|
+
|
|
87
|
+
## Supabase Auth
|
|
88
|
+
|
|
89
|
+
When the user asked to migrate login from Supabase Auth, recommend Managed Better Auth and follow https://neon.com/docs/auth/migrate/from-supabase.md. Moving only Postgres or adding a Function is not that request: keep Supabase Auth.
|
|
90
|
+
|
|
91
|
+
`SupabaseAuthAdapter()` keeps method shapes such as `signInWithPassword` and `signInWithOAuth`. Those calls are not interchangeable with default Better Auth examples (`signIn.email`). Keep an existing adapter caller on that API.
|
|
92
|
+
|
|
93
|
+
Inventory the auth methods and database calls actually used:
|
|
94
|
+
|
|
95
|
+
- Password hashes cannot transfer. Users create new accounts or sign in with OAuth.
|
|
96
|
+
- Do not promise unchanged user IDs, sessions, or account linking. Plan application foreign keys with the owner.
|
|
97
|
+
- `updateUser()` cannot change email or password on Managed Auth. Email verification needs application UI (codes work on shared SMTP; links need custom SMTP).
|
|
98
|
+
- The migration guide lists Supabase phone/SMS/WhatsApp, SAML, and Web3 as unsupported on Managed Auth. Confirm the **installed** Better Auth version if the user still needs that exact flow; if support stays unresolved, keep Supabase Auth and stop the auth cutover. That page's "no phone auth" claim is about Supabase phone sign-in, not the constrained Managed Phone Number plugin (existing users link a number).
|
|
99
|
+
- `@supabase/supabase-js` used only for Auth does not justify enabling the Data API. Keep Data API only for existing PostgREST / Supabase database-client queries.
|
|
100
|
+
|
|
101
|
+
## Verification
|
|
102
|
+
|
|
103
|
+
Managed path: sign-up, sign-in, sign-out, session restoration after reload, and protected access, including error and loading states. Exercise email verification (code on shared SMTP) when it is on. Report any flow that remains unverified.
|
|
104
|
+
|
|
105
|
+
A required plugin on the self-managed path is verified in that app's Better Auth setup, not as a Managed flow.
|
|
106
|
+
|
|
107
|
+
## Plugin support
|
|
108
|
+
|
|
109
|
+
Checked 2026-09-17 against https://neon.com/docs/auth/guides/plugins.md, https://neon.com/docs/auth/roadmap.md, and the `@neondatabase/auth` client plugin list. Re-fetch those pages if this skill may be stale. An unlisted upstream plugin needs a live check; do not treat absence from this table as a dated roadmap item.
|
|
110
|
+
|
|
111
|
+
"Not exposed" means the Managed SDK/UI contract. It is not a claim that every raw server request was tested.
|
|
112
|
+
|
|
113
|
+
| Feature | Managed Auth | Boundary |
|
|
114
|
+
| --- | --- | --- |
|
|
115
|
+
| Email/password | Supported | `signUp.email`, `signIn.email` |
|
|
116
|
+
| Social OAuth (Google, GitHub, Vercel) | Supported | `signIn.social`. Shared Google credentials are for development; production and GitHub/Vercel need your own OAuth apps. https://neon.com/docs/auth/guides/setup-oauth.md |
|
|
117
|
+
| Admin | Supported | Admin session required. Plugin customization is on the roadmap. |
|
|
118
|
+
| Email OTP | Supported | Managed delivery. `emailOtp.sendVerificationOtp`, `signIn.emailOtp`. |
|
|
119
|
+
| Magic Link | Supported | Enable on the branch (off by default). `signIn.magicLink`. |
|
|
120
|
+
| Organization | Partial, Beta | Members, invitations, owner/admin/member. No Teams, server hooks, custom roles/permissions, or dynamic access control. Emailed invitations: [managed-auth.md](references/managed-auth.md#organization-invitations). |
|
|
121
|
+
| JWT | Supported | EdDSA (Ed25519), 15-minute expiry, no custom claims. Default client: `.token()` then `data.token`. `SupabaseAuthAdapter()`: `getSession()` then `data.session.access_token` (no `.token()`). |
|
|
122
|
+
| Open API | Supported | Server routes `/reference` and `/open-api/generate-schema`. |
|
|
123
|
+
| Phone Number | Supported with constraints | Browser client: existing users link a number, then sign in; no phone-first signup; own SMS webhook; custom UI. Next.js `auth.handler()` forwards the catch-all path, including phone OTP. A missing `auth.phoneNumber` server method is a missing typed helper, not a proxy rejection. https://neon.com/docs/auth/guides/plugins/phone-number.md |
|
|
124
|
+
| MFA / Two-Factor | Roadmap | Unavailable on Managed Auth. If required: [self-managed.md](references/self-managed.md), after confirming the installed Better Auth version. |
|
|
125
|
+
| Passkey, API Key, Generic OAuth, One Tap, Multi Session | Not exposed by Managed SDK/UI | If required: [self-managed.md](references/self-managed.md). Generic OAuth is not Google/GitHub/Vercel social sign-in. |
|
|
126
|
+
| MCP / OAuth Provider | Not Managed Auth | Third-party MCP clients self-authorizing against your server. Keep existing login. See `neon-functions` [references/mcp.md](https://neon.com/docs/ai/skills/neon-functions/references/mcp.md). |
|
|
127
|
+
| SSO / SAML | Not listed or exposed | If required: [self-managed.md](references/self-managed.md), after confirming the installed Better Auth version. |
|
|
128
|
+
|
|
129
|
+
The default Managed client method is `getAnonymousToken()`. That JWT is a Neon anonymous Data API token. It is not Better Auth's Anonymous-account plugin (`signIn.anonymous`). `anonymousTokenClient()` is the SDK plugin factory, not a method on the public client. Do not call it, and do not call `getAnonymousToken()` on `SupabaseAuthAdapter()`.
|
|
130
|
+
|
|
131
|
+
Trusted domains and webhooks are Neon settings, not installable Better Auth plugins.
|
|
132
|
+
|
|
133
|
+
## Trusted domains
|
|
134
|
+
|
|
135
|
+
Auth redirects only to origins on its allowlist. `invalid domain` means the app origin is missing. Include the scheme, omit a trailing slash, register production and preview origins before pointing users at them, and target the correct branch:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
neon neon-auth domain add https://app.example.com
|
|
139
|
+
neon neon-auth domain list
|
|
140
|
+
neon neon-auth domain delete https://old.example.com
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Localhost ports are pre-approved by default. An existing project can have that off: `neon neon-auth domain allow-localhost get|enable|disable`. Docs: https://neon.com/docs/auth/guides/configure-domains.md
|
|
144
|
+
|
|
145
|
+
OAuth provider redirect is `{NEON_AUTH_BASE_URL}/callback/{provider}` (the Auth URL includes its path). `callbackURL` on `signIn.social` is the later app landing origin and must be trusted.
|
|
146
|
+
|
|
147
|
+
The Managed SDK handles iframe OAuth popup and `neon_auth_session_verifier`. Keep the wrapper, callback route, and middleware. Do not reimplement that flow, and do not promise third-party cookies in every browser.
|
|
148
|
+
|
|
149
|
+
## Functions and Data API
|
|
150
|
+
|
|
151
|
+
A Function authenticates whoever already signs the user in. Do not switch identity to call a Function. Verify the token in the `neon-functions` skill and https://neon.com/docs/compute/functions/authentication.md.
|
|
152
|
+
|
|
153
|
+
Managed Auth: injected `NEON_AUTH_JWKS_URL`, issuer from `NEON_AUTH_BASE_URL`. Token: default client `.token()` then `data.token`; `SupabaseAuthAdapter()` `getSession()` then `data.session.access_token`. A valid token is not permission to read another user's rows. Sign-out ends the browser session; do not claim it immediately revokes an already-issued JWT.
|
|
154
|
+
|
|
155
|
+
Data API identity: [references/managed-auth.md](references/managed-auth.md). New apps query Postgres from Functions or existing handlers, not the Data API.
|