better-env

द्वारा neondatabase

एजेंट और मानव के लिए बेहतर एनवायरनमेंट वेरिएबल प्रबंधन, पूर्ण प्रकार सुरक्षा, CLI-आधारित रिमोट एनवायरनमेंट सिंक्रोनाइज़ेशन और एनवायरनमेंट वैलिडेशन के साथ।…

npx skills add https://github.com/neondatabase/better-env --skill better-env

Work With better-env In A Repo

Type-safe environment config modules

Follow this best practice to manage environment variables in TypeScript applications with full type safety and clear server/public boundaries.

better-env exports configSchema to define typed env modules and recommends placing them in feature-level config.ts files (for example src/lib/auth/config.ts and src/lib/database/config.ts).

Learn more:

  • references/config-schema.md

Validate existence of all env variables in the current environment

Run env validation early so missing or invalid values fail fast before dev, build, or deploy steps.

better-env validate --environment <name> loads .env* files with Next.js semantics, discovers src/lib/*/config.ts modules, and checks every declared variable from your configSchema modules.

If your dotenv files intentionally include keys that are not referenced by config modules, add per-env suppressions in better-env.ts:

environments.<env>.ignoreUnused: string[]

These suppress only the selected local environment during validate. Adapter defaults are merged in automatically; for Vercel, VERCEL_OIDC_TOKEN is ignored by default in development, preview, and production.

Learn more:

  • references/env-validation.md

Configure runtime syncing between local files and hosted providers

Use runtime configuration to keep local dotenv targets aligned with provider environments while preserving safe defaults.

Create better-env.ts with defineBetterEnv(...) and an adapter (vercelAdapter, netlifyAdapter, railwayAdapter, or cloudflareAdapter).

For a standard Vercel setup, prefer the minimal config:

export default defineBetterEnv({ adapter: vercelAdapter() });

Do not add an environments block when it only duplicates adapter defaults. Add environments only when you intentionally need custom mappings, custom env files, or per-environment ignoreUnused behavior.

Learn more:

  • references/config.md
  • references/runtime.md

Use the CLI for day-to-day environment operations

The CLI gives a consistent workflow for initialization, sync, validation, and remote variable management, which is great for local development and CI automation.

Choose the command runner to match the repo:

  • Use npx in npm/pnpm-based repos (for example lockfiles like package-lock.json or pnpm-lock.yaml and scripts run via npm/pnpm).
  • Use bunx in Bun-based repos (for example bun.lock and scripts run via bun).
  • Keep commands aligned with the project's existing package manager/runtime conventions; do not mix runners unless the repo already does.

Recommended flow in a repo:

  1. Run better-env init once to verify adapter prerequisites.
  2. Run better-env pull --environment <name> to sync local env files.
  3. Run better-env validate --environment <name> before app startup/build.
  4. Use add, upsert, update, delete, and load for remote env changes.

Choose command behavior intentionally:

  • upsert for idempotent automation and scripts
  • add when duplicate keys should fail
  • update when missing keys should fail
  • delete to remove remote keys
  • load for batch updates from dotenv files

Learn more:

  • references/cli.md
  • references/vercel-adapter.md

neondatabase की और Skills

claimable-postgres
neondatabase
स्थानीय विकास, डेमो, प्रोटोटाइपिंग और परीक्षण वातावरण के लिए तत्काल Postgres डेटाबेस। खाते की आवश्यकता नहीं है। डेटाबेस 72 घंटे के बाद समाप्त हो जाते हैं जब तक कि किसी Neon खाते में दावा न किया जाए।
official
neon-postgres-branches
neondatabase
इस कौशल का परिणाम एक निर्मित Neon ब्रांच (या सृजन आगे नहीं बढ़ पाने पर एक स्पष्ट, कार्रवाई योग्य अगला कदम) होना चाहिए। सही ब्रांच प्रकार चुनें, फिर MCP या CLI के माध्यम से ब्रांच निर्माण निष्पादित करें।
official
neon-postgres-egress-optimizer
neondatabase
उपयोगकर्ता को उनके Postgres डेटाबेस से अत्यधिक डेटा स्थानांतरण (एग्रेस) का कारण बनने वाले एप्लिकेशन-साइड क्वेरी पैटर्न के निदान और सुधार में मार्गदर्शन करें। अधिकांश उच्च एग्रेस बिल एप्लिकेशन द्वारा आवश्यकता से अधिक डेटा लाने के कारण आते हैं।
official
plugin-manager
neondatabase
इस रिपॉजिटरी के लिए Cursor और Claude Code दोनों में प्लगइन संरचना और कॉन्फ़िगरेशन प्रबंधित करें। प्लगइन फ़ोल्डर बनाते, अपडेट करते या समीक्षा करते समय उपयोग करें…
official
skill-creator
neondatabase
प्रभावी कौशल बनाने के लिए मार्गदर्शिका। इस कौशल का उपयोग तब किया जाना चाहिए जब उपयोगकर्ता एक नया कौशल बनाना (या मौजूदा कौशल को अपडेट करना) चाहते हैं जो Claude की क्षमताओं को बढ़ाता है…
official
add-neon-docs
neondatabase
इस कौशल का उपयोग तब करें जब उपयोगकर्ता Neon के बारे में दस्तावेज़ीकरण, डॉक्स, संदर्भ जोड़ने या दस्तावेज़ीकरण स्थापित करने के लिए कहे। Neon के सर्वोत्तम अभ्यास संदर्भ लिंक जोड़ता है…
official
neon-auth
neondatabase
आपके एप्लिकेशन के लिए Neon Auth सेट करता है। प्रमाणीकरण कॉन्फ़िगर करता है, प्रमाणीकरण रूट बनाता है, और UI घटक उत्पन्न करता है। Next.js में प्रमाणीकरण जोड़ते समय उपयोग करें,…
official
neon-drizzle
neondatabase
एक पूर्णतः कार्यशील Drizzle ORM सेटअप बनाता है जिसमें एक प्रावधानित Neon डेटाबेस होता है। निर्भरताएँ स्थापित करता है, डेटाबेस क्रेडेंशियल्स प्रदान करता है, कनेक्शन कॉन्फ़िगर करता है,…
official