convex-env

Configure Convex deployment environment variables and secrets for backend actions.

9.4k|1.5k|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/openclaw/clawhub --skill convex-env
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-env
Source: https://github.com/openclaw/clawhub/tree/main/.agents/skills/convex-env
Command: npx skills add https://github.com/openclaw/clawhub --skill convex-env

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing API keys and secrets for a Convex backend is error-prone: developers often hardcode credentials, commit them to git, or try to read them in the wrong function context. This Skill provides a clear, safe workflow for storing and accessing secrets via Convex deployment environment variables.

Core Features & Use Cases

  • Secret Storage: Set secrets per deployment using npx convex env set KEY value instead of committing them to source control.
  • Correct Access Patterns: Read values with process.env.KEY inside actions (with 'use node' when needed), avoiding misuse in queries and mutations.
  • Multi-Deployment Management: Confirm configuration with npx convex env list and maintain separate values per deployment.
  • Use Case: When adding a third-party API key to your Convex app, use this Skill to store it as a deployment env var and access it safely inside a Node action.

Quick Start

Set up a new API key as a Convex environment variable and show me how to read it inside an action.

Frequently Asked Questions about convex-env

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set environment variables in Convex?

Set environment variables in Convex with the CLI command npx convex env set KEY value, which stores the value per deployment. Verify the stored variables at any time with npx convex env list.

How do I store API keys and secrets for a Convex backend?

Store API keys as Convex deployment environment variables using npx convex env set, never in code or git. For local development only, you may add them to .env.local, but production secrets belong in deployment env vars.

Can I use process.env in Convex queries and mutations?

No, process.env should only be read inside Convex actions, not queries or mutations. If the runtime requires it, mark the file with 'use node' so the action runs in the Node environment.

Do Convex environment variables work across multiple deployments?

Each Convex deployment maintains its own set of environment variables, so values must be set separately per deployment. Run npx convex env set against each deployment that needs the secret.

Why should secrets not be committed to git in a Convex project?

Committing secrets to git exposes credentials to anyone with repository access and keeps them in history permanently. Convex deployment env vars keep secrets server-side and out of source control entirely.