Manage application secrets and environment variables with Infisical — open-source secrets management platform. Use when someone asks to "manage secrets", "Infisical", "centralize environment variables", "secrets manager", "replace .env files", "rotate API keys", or "sync secrets to CI/CD". Covers secret storage, team sharing, auto-rotation, CI/CD injection, and Kubernetes integration.
Infisical is an open-source secrets management platform — a centralized place to store, sync, and rotate secrets (API keys, database URLs, tokens) across your team and infrastructure. Instead of .env files scattered across repos and Slack messages with passwords, Infisical stores secrets encrypted, syncs them to environments, injects them into CI/CD, and rotates them automatically.
.env files in repos or shared drives# Install CLI
npm install -g @infisical/cli
# Or self-host
docker compose up -d # From infisical/infisical repo
# Login
infisical login
# Initialize in your project
infisical init
# Push secrets from .env file
infisical secrets set DATABASE_URL="postgresql://..." API_KEY="sk-..."
# List secrets
infisical secrets list --env=dev
# Run your app with injected secrets
infisical run -- npm start
# ^ Injects all secrets as environment variables
# Run with specific environment
infisical run --env=production -- node server.js
// config.ts — Fetch secrets programmatically
import { InfisicalClient } from "@infisical/sdk";
const infisical = new InfisicalClient({
clientId: process.env.INFISICAL_CLIENT_ID,
clientSecret: process.env.INFISICAL_CLIENT_SECRET,
siteUrl: "https://infisical.mycompany.com", // Self-hosted URL
});
// Get all secrets for an environment
const secrets = await infisical.listSecrets({
environment: "production",
projectId: "proj_xxx",
path: "/",
});
// Get a specific secret
const dbUrl = await infisical.getSecret({
environment: "production",
projectId: "proj_xxx",
secretName: "DATABASE_URL",
});
console.log(dbUrl.secretValue);
# .github/workflows/deploy.yml — Inject secrets in GitHub Actions
name: Deploy
on: push
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Infisical/secrets-action@v1
with:
client-id: ${{ secrets.INFISICAL_CLIENT_ID }}
client-secret: ${{ secrets.INFISICAL_CLIENT_SECRET }}
project-id: proj_xxx
env-slug: production
# All secrets are now environment variables
- run: npm run deploy
# infisical-secret.yaml — Sync to Kubernetes secrets
apiVersion: secrets.infisical.com/v1alpha1
kind: InfisicalSecret
metadata:
name: my-app-secrets
spec:
hostAPI: https://infisical.mycompany.com
authentication:
universalAuth:
credentialsRef:
secretName: infisical-credentials
secretNamespace: default
managedSecretReference:
secretName: my-app-env # Created/synced K8s Secret
secretNamespace: default
creationPolicy: Owner
resyncInterval: 60 # Refresh every 60 seconds
# Auto-rotate database credentials
infisical secrets rotation create \
--provider=postgres \
--interval=30d \
--secret-name=DATABASE_URL \
--env=production
User prompt: "Our team shares .env files via Slack. Set up proper secrets management."
The agent will set up Infisical, import existing .env files, configure per-environment secrets, and update the dev workflow to use infisical run.
User prompt: "Our GitHub Actions workflow hardcodes API keys in repository secrets. Centralize them."
The agent will set up Infisical with a machine identity for CI, configure the GitHub Action to inject secrets, and remove hardcoded values.
infisical run -- replaces .env files — inject secrets as env varsnpx skills add TerminalSkills/infisical下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer