aider icon indicating copy to clipboard operation
aider copied to clipboard

Is there a startup parameter that allows using only the specified env file?

Open purelind opened this issue 1 year ago • 1 comments

Issue

I referred to the documentation to configure the env-file because I already had a .env file in the home directory for other purposes. image

So, I created a ~/.aider.env file to store aider's environment configuration, and then executed aider --env-file ~/.aider.env to start it. At this point, I expect aider to only read the file I specified, rather than having to read the ~/.env file (this file is not for aider to use).

image

Version and model info

Aider: v0.45.1

purelind avatar Jul 26 '24 09:07 purelind

Thanks for trying aider and filing this issue.

Aider always searches all the listed env locations. If your more general env has settings you don't want in the more specific env, can you just override them?

paul-gauthier avatar Jul 28 '24 10:07 paul-gauthier

I'm going to close this issue for now, but feel free to add a comment here and I will re-open or file a new issue any time.

paul-gauthier avatar Jul 30 '24 16:07 paul-gauthier

Perhaps I didn't express myself clearly. In my local environment, the .env file under the HOME directory is an environment configuration file for other programs, not a general configuration file for aider. Currently, aider will parse all environment configuration files, so when loading $HOME/.env, it will display a warning because the configuration items in this file are for use with zsh and therefore do not conform to aider's configuration specifications.

purelind avatar Aug 12 '24 07:08 purelind

What I hope is that when we specify a configuration file, only that specified file is loaded, rather than continuing to load all the configuration files in the traversal order. In my opinion, this would be a more reasonable configuration file loading behavior.

purelind avatar Aug 12 '24 07:08 purelind