Replies: 4 comments 1 reply
|
I would also greatly appreciate an example on how to use fnox with mise in the "canonical" way. But in the meantime thx @beleam for the work around snippet. |
|
If I may ask, what are you trying to accomplish here? Is this to activate fnox upon using the directory with mise, and then to extract out the secrets into env vars? I believe fnox does this already if you:
Or is it to use the fnox shell integration without adding the activate line to your rc file? I found a method to do this for users who don't want to use fnox across their shell but only inside of their project directory by using mise hooks, such as In mise.toml: # NOTE: These hooks are here if you do not want to install shell activation for fnox globally in your shell rc file.
[hooks.enter]
shell = "zsh"
script = "eval \"$(fnox activate zsh)\""
[hooks.leave]
shell = "zsh"
script = "eval \"$(fnox deactivate)\""And then I have my separate fnox.toml with definitions defined. Grant it, I am very new to using fnox, but I found that this works reliably for folder local activation of fnox for users who may not want it system wide. |
|
For reference, there is an official mise plugin with docs here TL;DR: Add the plugin to your project's [plugins]
fnox-env = "https://github.com/jdx/mise-env-fnox"
[tools]
fnox = "latest"
[env]
_.fnox-env = { tools = true } |
|
To clarify, I had some run configurations and integration tests that needed some secrets and I wanted to run them seamlessly from the cli or from the ides (vscode/intellij). The settings that I posted work for all these scenarios. Thanks for your suggestions so far, will check the new env plugin! As for the patterns with source or hooks, they should be applicable for other tools where no plugins are there. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm using mise with intellij run configurations to provide environment variables. However I'd like it to also provide the secrets from fnox. Any plans to provide it as an environment plugin? https://mise.jdx.dev/env-plugin-development.html
Also for now workarounds are also welcome, I tried source but didn't work, but might be making some mistake.
fnox-export.sh
edit: workarounds I found so far (had to manually type so expect errors)
Thanks
All reactions