Skip to content

File-based Snouty configuration#128

Open
jeskew wants to merge 4 commits into
mainfrom
jeskew/config
Open

File-based Snouty configuration#128
jeskew wants to merge 4 commits into
mainfrom
jeskew/config

Conversation

@jeskew

@jeskew jeskew commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Closes #120

This PR adds support for reading configuration from two locations on disk in addition to the currently supported environment variables. All access to configuration is routed through a SnoutyConfig value that will try to source the tenant and container repository from the following locations on disk if the ANTITHESIS_TENANT or ANTITHESIS_REPOSITORY environment variables are not set:

  • <project configuration directory>/snoutyconfig.toml
  • $XDG_CONFIG_HOME/snouty/settings.toml/$HOME/Library/Application Support/com.Antithesis.Snouty/settings.toml

The first item is only supported for commands where the user is supplying a directory with a docker-compose.yaml file or kubernetes manifests, and the second item is in the global snouty config directory (as identified by the directories-next crate).

Both files have the same format, which looks like:

tenant = "your-tenant"
repository = "us-central1-docker.pkg.dev/your-project/your-repo"

profiles.bar.tenant = "another-tenant"

[profiles.foo]
repository = "us-central1-docker.pkg.dev/your-project/foo-repo"

Snouty will use the top-level tenant/repository values unless a profile is supplied via the ANTITHESIS_PROFILE environment variable. When we add OAuth support to Snouty, any requisite configuration will come from these files. API keys and basic auth are not supported via the config files, as those values are sensitive and thus shouldn't appear in a plaintext config file.

One thing I want to add that is not included in this PR is a snouty init command that will prompt the user for values and then write out config files for them. This PR was just feeling a bit large without it added, so I thought it made sense to split it out.

@jeskew

jeskew commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

@claude review

@jeskew jeskew force-pushed the jeskew/config branch 4 times, most recently from 330a0d9 to d510112 Compare June 15, 2026 20:41
@carlsverre

Copy link
Copy Markdown
Member

main review:

  1. switch to .snouty.toml for project local config
  2. Let's remove directories-next in place of just manually resolving XDG config dir
  3. rebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Snouty config from files + precedence

2 participants