1414
1515# Re-export for backward compatibility
1616from orb .cli .args import parse_args
17+ from orb .cli .console import print_error , print_info , print_success , print_warning
1718from orb .cli .router import execute_command
1819from orb .infrastructure .logging .logger import get_logger
1920
@@ -69,7 +70,7 @@ async def main() -> None:
6970 sys .argv = original_argv
7071
7172 if error_output .strip ():
72- print (error_output .strip (), file = sys . stderr )
73+ print_error (error_output .strip ())
7374 raise
7475
7576 # Setup environment after arg parse — skip for init (it calls get_config_location() directly)
@@ -183,7 +184,7 @@ async def main() -> None:
183184 if result .get ("status" ) == "success" :
184185 sys .exit (0 )
185186 else :
186- print (f"Error: { result .get ('message' )} " , file = sys . stderr )
187+ print_error (f"Error: { result .get ('message' )} " )
187188 sys .exit (1 )
188189 except Exception :
189190 import traceback
@@ -227,9 +228,9 @@ async def main() -> None:
227228 with open (args .output , "w" ) as f :
228229 f .write (formatted_output )
229230 if not args .quiet :
230- print (f"Output written to { args .output } " )
231+ print_success (f"Output written to { args .output } " )
231232 else :
232- print (formatted_output )
233+ print_info (formatted_output )
233234
234235 if exit_code != 0 :
235236 sys .exit (exit_code )
@@ -252,7 +253,7 @@ async def main() -> None:
252253 error_output , exit_code = formatter .format_error (e , output_format )
253254
254255 if not args .quiet :
255- print (error_output )
256+ print_error (error_output )
256257 sys .exit (exit_code )
257258 finally :
258259 if scheduler_override_active :
@@ -267,10 +268,10 @@ async def main() -> None:
267268 logger .warning ("Failed to restore scheduler strategy: %s" , e , exc_info = True )
268269
269270 except KeyboardInterrupt :
270- print ("\n Operation cancelled by user." )
271+ print_warning ("\n Operation cancelled by user." )
271272 sys .exit (130 )
272273 except Exception as e :
273- print (f"Fatal error: { e } " )
274+ print_error (f"Fatal error: { e } " )
274275 sys .exit (1 )
275276
276277
0 commit comments