Skip to content

Commit

Permalink
Update config.show output format.
Browse files Browse the repository at this point in the history
  • Loading branch information
eli64s committed Jan 8, 2025
1 parent adc915d commit 9c86023
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
15 changes: 9 additions & 6 deletions src/splitme_ai/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ class ConfigCommand(BaseModel):

def cli_cmd(self) -> None:
"""Execute the config command."""
if self.show:
settings = SplitmeSettings()
_logger.info("Current configuration settings:")
for field, value in settings.model_dump().items():
_logger.info(f"Field: {field}, Value: {value}")

if self.generate:
settings = SplitmeSettings()
config_path = Path(".splitme.yml")
Expand All @@ -46,6 +40,15 @@ def cli_cmd(self) -> None:
f.write(settings.model_dump_json())
_logger.info("Generated default configuration in .splitme.yml")

if self.show:
settings = SplitmeSettings()
print("\nCurrent configuration settings:")
print("-" * 32)
max_field_len = max(len(field) for field in settings.model_dump())
for field, value in settings.model_dump().items():
print(f"{field:<{max_field_len}} = {value}")
print()


class RefLinksCommand(BaseModel):
"""
Expand Down
1 change: 0 additions & 1 deletion src/splitme_ai/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ def _format_section_content(self, content: str, references: Dict[str, str]) -> s

def main():
"""CLI entry point for splitme-ai."""
_logger.info("Starting splitme_ai CLI")
app = SplitmeApp()
app.cli_cmd()

Expand Down

0 comments on commit 9c86023

Please sign in to comment.