Skip to content

Integrate CLI arguments with djls-conf settings #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
joshuadavidthomas opened this issue May 1, 2025 · 0 comments
Open

Integrate CLI arguments with djls-conf settings #130

joshuadavidthomas opened this issue May 1, 2025 · 0 comments

Comments

@joshuadavidthomas
Copy link
Owner

Integrate CLI arguments into the configuration loading handled by the djls-conf crate, allowing CLI flags to override settings found in files.

This came up while working on #66, but I punted it because merging CLI arguments with the settings loaded by the config crate (which djls-conf uses) can be a bit tricky.

The desired priority for settings is:

  1. CLI Arguments
  2. Project Files (djls.toml, .djls.toml, pyproject.toml)
  3. User Config File (~/.config/djls/djls.toml)
  4. Defaults

To do this, we'll need to map the CLI arguments to the fields in the Settings struct within djls-conf and decide where in the startup sequence this merge should happen.

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

No branches or pull requests

1 participant