11import typer
22from rich .traceback import install
33
4+ from codegen import __version__
5+
46# Import config command (still a Typer app)
57from codegen .cli .commands .config .main import config_command
6- from codegen import __version__
8+
9+ # Import the actual command functions
10+ from codegen .cli .commands .init .main import init
11+ from codegen .cli .commands .login .main import login
12+ from codegen .cli .commands .logout .main import logout
13+ from codegen .cli .commands .mcp .main import mcp
14+ from codegen .cli .commands .profile .main import profile
15+ from codegen .cli .commands .style_debug .main import style_debug
16+ from codegen .cli .commands .update .main import update
717
818install (show_locals = True )
919
@@ -14,21 +24,9 @@ def version_callback(value: bool):
1424 print (__version__ )
1525 raise typer .Exit ()
1626
17- # Create the main Typer app
18- main = typer .Typer (
19- name = "codegen" ,
20- help = "Codegen CLI - Transform your code with AI." ,
21- rich_markup_mode = "rich"
22- )
2327
24- # Import the actual command functions
25- from codegen .cli .commands .init .main import init
26- from codegen .cli .commands .login .main import login
27- from codegen .cli .commands .logout .main import logout
28- from codegen .cli .commands .mcp .main import mcp
29- from codegen .cli .commands .profile .main import profile
30- from codegen .cli .commands .style_debug .main import style_debug
31- from codegen .cli .commands .update .main import update
28+ # Create the main Typer app
29+ main = typer .Typer (name = "codegen" , help = "Codegen CLI - Transform your code with AI." , rich_markup_mode = "rich" )
3230
3331# Add individual commands to the main app
3432main .command ("init" , help = "Initialize or update the Codegen folder." )(init )
@@ -44,13 +42,10 @@ def version_callback(value: bool):
4442
4543
4644@main .callback ()
47- def main_callback (
48- version : bool = typer .Option (False , "--version" , callback = version_callback , is_eager = True , help = "Show version and exit" )
49- ):
45+ def main_callback (version : bool = typer .Option (False , "--version" , callback = version_callback , is_eager = True , help = "Show version and exit" )):
5046 """Codegen CLI - Transform your code with AI."""
5147 pass
5248
5349
54-
5550if __name__ == "__main__" :
5651 main ()
0 commit comments