Securely manage environment variables for your projects in Mux. Project secrets are automatically injected when the agent executes bash commands, making it easy to provide API keys, tokens, and other sensitive configuration.Documentation Index
Fetch the complete documentation index at: https://mux-goals-8h36.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.

What Are Project Secrets?
Project secrets are key-value pairs stored per project that are:- Automatically injected as environment variables when running bash commands
- Stored outside repo in
~/.mux/secrets.json - Project-scoped - each project has its own set of secrets
- Workspace-inherited - all workspaces in a project use the same secrets
Common Use Cases
- API Keys:
ANTHROPIC_API_KEY,OPENAI_API_KEY,GITHUB_TOKEN - Authentication tokens:
NPM_TOKEN,DOCKER_HUB_TOKEN - Database credentials:
DATABASE_URL,POSTGRES_PASSWORD - Service endpoints:
API_BASE_URL,WEBHOOK_URL - Build configuration:
BUILD_ENV,FEATURE_FLAGS
Managing Secrets
Opening the Secrets Modal
- Find your project in the left sidebar
- Hover over the project name
- Click the 🔑 key icon that appears
How Secrets Are Used
When the agent runs bash commands (via thebash tool), all project secrets are automatically injected as environment variables:
Security Considerations
Storage
- Secrets are stored in
~/.mux/secrets.json(outside your repo) - Stored in plaintext — the file is not encrypted
- The file is created with user-only permissions; treat it like any other credentials file
Related
- Agentic Git Identity - Configure Git credentials for AI commits using Project Secrets