|
1 | 1 | # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
2 | 2 | # SPDX-License-Identifier: Apache-2.0 |
3 | 3 |
|
4 | | -import typer |
| 4 | +from data_designer.cli.main import app, main |
5 | 5 |
|
6 | | -# Initialize Typer app with custom configuration |
7 | | -app = typer.Typer( |
8 | | - name="data-designer", |
9 | | - help="Data Designer CLI - Configure model providers and models for synthetic data generation", |
10 | | - add_completion=False, |
11 | | - no_args_is_help=True, |
12 | | - rich_markup_mode="rich", |
13 | | -) |
14 | | - |
15 | | -# Import and register command groups |
16 | | -# We import here to avoid circular dependencies |
17 | | -from data_designer.cli.commands import list as list_cmd |
18 | | -from data_designer.cli.commands import models, providers, validate |
19 | | - |
20 | | -# Create config subcommand group |
21 | | -config_app = typer.Typer( |
22 | | - name="config", |
23 | | - help="Manage configuration files", |
24 | | - no_args_is_help=True, |
25 | | -) |
26 | | -config_app.command(name="providers", help="Configure model providers interactively")(providers.providers_command) |
27 | | -config_app.command(name="models", help="Configure models interactively")(models.models_command) |
28 | | -config_app.command(name="list", help="List current configurations")(list_cmd.list_command) |
29 | | -config_app.command(name="validate", help="Validate configuration files")(validate.validate_command) |
30 | | - |
31 | | -app.add_typer(config_app, name="config") |
32 | | - |
33 | | - |
34 | | -def main() -> None: |
35 | | - """Main entry point for the CLI.""" |
36 | | - app() |
37 | | - |
38 | | - |
39 | | -if __name__ == "__main__": |
40 | | - main() |
| 6 | +__all__ = ["app", "main"] |
0 commit comments