Skip to content

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:

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:

  1. Searches for fnox.toml in the current directory and parent directories
  2. Resolves secrets using your configured providers
  3. Exports the secrets as environment variables
  4. Watches fnox.toml for changes to invalidate the cache

Configuration Options

OptionDescriptionDefault
profilefnox profile to usedefault
fnox_binPath to fnox binaryfnox

Examples

toml
[plugins]
fnox-env = "https://github.com/jdx/mise-env-fnox"

[env]
# Use default profile
_.fnox-env = {}
toml
[plugins]
fnox-env = "https://github.com/jdx/mise-env-fnox"

[env]
# Use production profile
_.fnox-env = { profile = "production" }
toml
[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:

toml
[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:

bash
# Development (default)
mise env

# Production
MISE_ENV=production mise env

# Staging
MISE_ENV=staging mise env

Caching

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.toml changes
  • Scoped to your shell session for security

To enable caching:

bash
export MISE_ENV_CACHE=1

Comparison with Shell Integration

FeatureShell IntegrationMise Integration
Automatic loading on cdYesYes (via mise)
Works without miseYesNo
CachingNoYes (with env cache)
Task integrationNoYes
Tool version managementNoYes

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

  1. Ensure fnox.toml exists in your project:

    bash
    ls fnox.toml
  2. Test fnox directly:

    bash
    fnox export --format json
  3. Check mise is loading the plugin:

    bash
    mise env

Cache not invalidating

If secrets aren't updating after changes to fnox.toml:

bash
# Clear mise's env cache
mise cache clear

# Or use fresh flag
mise exec --fresh-env -- your-command

Next Steps

Released under the MIT License.