Skip to content

Integrate CLI arguments with djls-conf settings #130

@joshuadavidthomas

Description

@joshuadavidthomas

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions