Currently, when defining a quick action in .herdr-plus/quick-actions/run.toml:
name = "Run"
command = "cargo run"
It appears that herdr-plus executes the command without inheriting the environment variables of the current terminal session.
I rely on direnv to manage my development toolchains, meaning I do not have tools like cargo installed globally. My shell uses a direnv hook to automatically load the project-local PATH when I enter the directory. However, when invoking the quick action via herdr-plus, the command fails because it does not have access to this context-aware environment.
Proposed Solution:
Would it be possible to spawn a real, interactive shell to execute these quick action commands? Similar to how herdr restores agents on startup, injecting the command into an actual shell session would ensure that all shell hooks (like direnv) and environment variables are properly loaded before execution.
Current Workaround:
I can temporarily bypass this by explicitly prepending the environment manager to the command:
name = "Run"
command = "direnv exec {{.WorkDir}} cargo run"
However, this is far from ideal. It forces me to hardcode my local, environment-specific setup (direnv) into a project-level configuration file. This pollutes the shared config and exposes local development details to all other potential herdr-plus users of the project, who might be using completely different environment managers.
Currently, when defining a quick action in
.herdr-plus/quick-actions/run.toml:It appears that
herdr-plusexecutes the command without inheriting the environment variables of the current terminal session.I rely on
direnvto manage my development toolchains, meaning I do not have tools likecargoinstalled globally. My shell uses adirenvhook to automatically load the project-localPATHwhen I enter the directory. However, when invoking the quick action viaherdr-plus, the command fails because it does not have access to this context-aware environment.Proposed Solution:
Would it be possible to spawn a real, interactive shell to execute these quick action commands? Similar to how
herdrrestores agents on startup, injecting the command into an actual shell session would ensure that all shell hooks (likedirenv) and environment variables are properly loaded before execution.Current Workaround:
I can temporarily bypass this by explicitly prepending the environment manager to the command:
However, this is far from ideal. It forces me to hardcode my local, environment-specific setup (
direnv) into a project-level configuration file. This pollutes the shared config and exposes local development details to all other potentialherdr-plususers of the project, who might be using completely different environment managers.