Como usar
- Copie o comando e verifique o pacote antes de instalar no seu ambiente de agente.
- Consulte no original as ferramentas, credenciais e ambientes necessários.
- Descreva os dados de entrada e a entrega esperada; confira a saída com as fontes.
npx skills add https://github.com/convex/agent-skills --skill convex-envAntes de começar
- A instalação não inclui assinatura de modelo, franquia API ou acesso aos seus arquivos.
- Estrelas e instalações indicam atividade, não um teste independente de qualidade ou segurança.
Renderizado do repositório de origem, preservando títulos, exemplos, código, tabelas, links e imagens.
<!-- GENERATED from convex-agents content/capabilities/env.json — do not edit by hand. -->
Manage env vars + secrets
Store secrets as Convex deployment env vars (npx convex env set), read them in any Convex function through the typed env export, never commit them.
Workflow
- Declare the var in the
envsection ofdefineApp(ordefineComponentfor a component) inconvex.config.ts, e.g.env: { KEY: v.string() }. This generates the typedenvexport. Components don't see the app's env vars, so pass any a component declares through its.use()call, e.g.app.use(myComponent, { env: { KEY: app.env.KEY } }). npx convex env set KEY value(per deployment). For secrets, keep the value out of shell history: omit it to be prompted (npx convex env set KEY) or pipe it in on stdin (e.g.pbpaste | npx convex env set KEY).- Read via
env.KEYfromimport { env } from "./_generated/server"in queries, mutations or actions. Prefer it overprocess.env.KEY. - Never hardcode or commit secrets;
.env.localvalues don't reach Convex functions, so set the dev deployment's value too. - 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.
- Read env vars through the typed
envexport in queries, mutations and actions.process.envremains available as a legacy/fallback path, e.g. for existing or third-party code that expects to read env vars there. - Different deployments need their own values.
- Check what is set with
npx convex env list --names-only; never print secret values into the conversation.