convex-env
Sets and wires Convex deployment environment variables and secrets for an app: write values per deployment with npx convex env set, read them through process.env inside actions, and verify with npx convex env list --names-only so secret values never appear in logs or chat. It keeps credentials out of code and Git, gives each deployment its own values, and prevents accidental leakage or hardcoded keys during local, staging, and production setup.
npx skills add https://github.com/convex/agent-skills --skill convex-envBefore / After Comparison
2 组Developers hardcode secrets in source files or scattered .env files, then paste them into each deployment by hand and rely on memory to know which environment is configured, discovering gaps only when production breaks.
This Skill sets values per deployment, reads them via process.env inside actions, and lets you confirm which names exist with env list --names-only, so switching environments no longer depends on memory.
Manage env vars + secrets
Store secrets as Convex deployment env vars (npx convex env set), read them with process.env in actions, never commit them.
Workflow
npx convex env set KEY value(per deployment).- Read via process.env.KEY inside actions (not queries/mutations).
- Never hardcode or commit secrets; add to .env.local only for local.
- Confirm it's set with
npx convex env list --names-only, which lists names without printing the secret values.
Rules
- Secrets live in Convex env vars, never in code or git.
- process.env only in actions ('use node' if needed), not queries/mutations.
- Different deployments need their own values.
- Check what is set with
npx convex env list --names-only; never print secret values into the conversation.
User Reviews (0)
Write a Review
No reviews yet
Statistics
User Rating
Rate this Skill