skills/smithery.ai/Add Environment Variable

Add Environment Variable

Installation
SKILL.md

Add Environment Variable

When adding a new environment variable to an app, follow these steps:

1. Locate the env file

Find the env.ts or env.mjs file in the app that uses @t3-oss/env-nextjs. Common locations:

  • apps/<app-name>/src/env.ts
  • apps/<app-name>/src/lib/env.ts

2. Add the variable in the correct section

The createEnv function has three sections:

  • client: For variables prefixed with NEXT_PUBLIC_ (exposed to browser)
  • server: For server-only variables (secrets, API keys, configuration)
  • shared: For variables used in both client and server (like NODE_ENV)

3. Define the schema with Zod

Installs
–
First Seen
–
Add Environment Variable from smithery.ai