Overview
Infisical is an all-in-one platform to securely manage application configuration and secrets across your team and infrastructure. Used by Fortune 500 enterprises, international governments, and fastest-growing startups, Infisical helps you save time and boost security.ZeroStarter includes Infisical configuration via
.infisical.json for seamless secrets management across development, staging, and production environments.Why Infisical?
- Secure Secret Management - Centralized, encrypted storage for all secrets
- Environment Sync - Automatically sync secrets across dev, staging, and production
- Team Collaboration - Share secrets securely with team members
- Version Control - Track secret changes and roll back if needed
- CLI Integration - Export secrets to
.envfiles for local development - Self-Hosting Option - Full control over your infrastructure
Self-Hosting
Deploy Infisical to your own infrastructure with one click:Why self-host?
Why self-host?
- Data Sovereignty - Keep secrets in your own infrastructure
- Custom Compliance - Meet specific regulatory requirements
- Cost Control - No per-seat pricing for large teams
- Network Isolation - Secrets never leave your VPC
Project Configuration
ZeroStarter includes a.infisical.json file at the repository root:
.infisical.json
Configuration fields
Configuration fields
workspaceId- Your Infisical project ID (generated duringinfisical init)defaultEnvironment- Default environment to use (dev, staging, prod)gitBranchToEnvironmentMapping- Map Git branches to Infisical environments
Installation
Install Infisical CLI
Install the Infisical CLI globally using Bun:Setup
Login to Infisical
Authenticate with your Infisical account:Interactive login (recommended for local development):This opens a browser window for authentication.Non-interactive login (for CI/CD):
Flag explanations
Flag explanations
--plain- Outputs only the JWT access token without formatting (useful for scripting)--silent- Disables all console messages except the access token- Use both flags together for CI/CD pipelines
Initialize project
Link your local ZeroStarter project to Infisical:This command:
- Prompts you to select your Infisical project
- Creates
.infisical.jsonwith yourworkspaceId - Establishes the connection for secret syncing
The
.infisical.json file is already included in ZeroStarter. You can run infisical init to update the workspace ID.CLI Reference
Login
Authenticate with Infisical:--domain- Your Infisical instance URL--email- Account email--password- Account password--organization-id- Organization ID--plain- Output only JWT token--silent- Suppress all messages except token
Init
Link local project to Infisical workspace:.infisical.json with your project configuration.
Export
Export secrets to different file formats:--env=<environment>- Environment to export from (dev, staging, prod). Defaults todev.--output-file=<path>- Path to output file (e.g.,.env.development)--projectId=<id>- Override project ID from.infisical.json--format=<format>- Output format (dotenv, json, yaml, csv)
Environment Structure
ZeroStarter uses these environment files:Environment Variables in ZeroStarter
Based on.env.example, ZeroStarter requires:
- Tab Title
- Tab Title
- Tab Title
Workflow
Local Development
CI/CD Pipeline
Integrate Infisical in your CI/CD for automated secret injection:.github/workflows/deploy.yml
Store
INFISICAL_TOKEN in GitHub Secrets for secure CI/CD authentication.Git Branch Mapping
Map Git branches to Infisical environments automatically:.infisical.json
mainbranch → usesprodenvironmentstagingbranch → usesstagingenvironmentdevelopbranch → usesdevenvironment- Other branches → use
defaultEnvironment(dev)
Security Best Practices
Use Infisical for all environments
Manage dev, staging, and prod secrets in Infisical, not local files.
Use service tokens for CI/CD
Create dedicated service tokens with minimal permissions for automation.
Troubleshooting
infisical: command not found
infisical: command not found
Install the CLI:Verify installation:
Authentication failed
Authentication failed
- Check your credentials are correct
- Verify organization ID is accurate
- Try interactive login:
infisical login - Check Infisical instance is accessible
Project not found
Project not found
- Run
infisical initto link project - Verify
workspaceIdin.infisical.jsonmatches your Infisical project - Check you have access to the project in Infisical dashboard
Secrets not loading in app
Secrets not loading in app
- Verify
.env.developmentfile exists and has correct variables - Check file is not in
.gitignorepreventing it from being read - Restart development servers:
bun dev - Verify
@packages/envis correctly configured