Settings location for CLI #2049
|
I'm struggling to find where settings files should be located when using the CLI. I am trying to use something like I've verified that my settings work by passing them as environment variables to the docker container. Can someone point me to information on how the CLI searches for and loads settings from TOML file(s)? |
Replies: 2 comments
|
Hi @tompropst , thank you so much for adding those questions. |
|
The CLI does not search the working directory. Settings files are resolved relative to the installed package, so under pipx or uv they must sit in |
The CLI does not search the working directory. Settings files are resolved relative to the installed package, so under pipx or uv they must sit in
<venv>/lib/python3.x/site-packages/pr_agent/settings/, which is why copies elsewhere were ignored. For an isolated install the supported route is to keep your own TOML anywhere and pass--extra_config_url=/path/to/your.toml(or setPR_AGENT_EXTRA_CONFIG_URL); it accepts a bare filesystem path as well as http and file URLs, and is merged beneath the repo config. Secrets are better supplied as environment variables using the<TABLE>__<KEY>convention, for exampleOPENAI__KEYandGITHUB__USER_TOKEN, which is the same mechanism your working Docker …