-
-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
Description
Currently, the --structures-path (-s) argument can only be set via the command-line flag. It would be convenient to also support setting this via an environment variable, similar to how STRUCTKIT_LOG_LEVEL works for logging.
Motivation
- Allows users to set a default custom structures path without repeating the
-sflag on every command - Useful for CI/CD pipelines and Docker containers where environment variables are the standard way to configure applications
- Consistent with the existing pattern used for
STRUCTKIT_LOG_LEVEL
Proposed Solution
Add support for a STRUCTKIT_STRUCTURES_PATH environment variable that would be used as the default value for --structures-path if not explicitly provided via the command-line flag.
Example Usage
export STRUCTKIT_STRUCTURES_PATH=~/custom-structures
structkit generate python-basic ./my-project
# Would behave the same as:
# structkit generate -s ~/custom-structures python-basic ./my-projectPriority
Command-line arguments should take precedence over the environment variable (current behavior for other similar tools).
Related Code
The environment variable pattern is already implemented for logging in structkit/main.py (lines 72-74), which could serve as a reference for this implementation.
Metadata
Metadata
Assignees
Labels
No labels