Mise Integration
fnox integrates with mise through the jdx/mise-env-fnox env plugin, allowing you to automatically load secrets into your development environment.
Installation
Add the plugin to your project's mise.toml:
[plugins]
fnox-env = "https://github.com/jdx/mise-env-fnox"
[env]
_.fnox-env = {}How It Works
When mise activates your environment, the fnox plugin:
- Searches for
fnox.tomlin the current directory and parent directories - Resolves secrets using your configured providers
- Exports the secrets as environment variables
- Watches
fnox.tomlfor changes to invalidate the cache
Configuration Options
| Option | Description | Default |
|---|---|---|
profile | fnox profile to use | default |
fnox_bin | Path to fnox binary | fnox |
Examples
[plugins]
fnox-env = "https://github.com/jdx/mise-env-fnox"
[env]
# Use default profile
_.fnox-env = {}[plugins]
fnox-env = "https://github.com/jdx/mise-env-fnox"
[env]
# Use production profile
_.fnox-env = { profile = "production" }[plugins]
fnox-env = "https://github.com/jdx/mise-env-fnox"
[env]
# Custom fnox binary path
_.fnox-env = { fnox_bin = "/usr/local/bin/fnox" }Environment-Specific Configuration
Combine with mise's environment system for different profiles per environment:
[plugins]
fnox-env = "https://github.com/jdx/mise-env-fnox"
[env]
_.fnox-env = { profile = "dev" }
[env.production]
_.fnox-env = { profile = "production" }
[env.staging]
_.fnox-env = { profile = "staging" }Then activate different environments:
# Development (default)
mise env
# Production
MISE_ENV=production mise env
# Staging
MISE_ENV=staging mise envCaching
The fnox plugin supports mise's environment caching (when MISE_ENV_CACHE=1). Secrets are:
- Cached encrypted on disk for fast subsequent loads
- Automatically refreshed when
fnox.tomlchanges - Scoped to your shell session for security
To enable caching:
export MISE_ENV_CACHE=1Comparison with Shell Integration
| Feature | Shell Integration | Mise Integration |
|---|---|---|
Automatic loading on cd | Yes | Yes (via mise) |
| Works without mise | Yes | No |
| Caching | No | Yes (with env cache) |
| Task integration | No | Yes |
| Tool version management | No | Yes |
Use shell integration if you want fnox-only secret loading. Use mise integration if you're already using mise for tool/environment management.
Troubleshooting
Secrets not loading
Ensure
fnox.tomlexists in your project:bashls fnox.tomlTest fnox directly:
bashfnox export --format jsonCheck mise is loading the plugin:
bashmise env
Cache not invalidating
If secrets aren't updating after changes to fnox.toml:
# Clear mise's env cache
mise cache clear
# Or use fresh flag
mise exec --fresh-env -- your-commandNext Steps
- Shell Integration - Alternative direct shell integration
- Profiles - Managing multiple environments
- Hierarchical Config - Organizing secrets across directories