import sys from pathlib import Path from xic_shell import xic_cli from xic_executor import run_xic def main(): argv = sys.argv[1:] if not argv: print("Usage: glyph [options]") print(" glyph xic [run|inspect|...] - XIC shell") print(" glyph --xic - Run XIC program directly") return # Check for --xic flag (direct XIC execution) if argv[0] == "--xic": if len(argv) < 2: print("Usage: glyph --xic ") return xic_path = argv[1] try: run_xic(xic_path, debug=False) except Exception as e: print(f"Error: {e}") sys.exit(1) return cmd = argv[0] rest = argv[1:] if cmd == "xic": xic_cli(rest) return print(f"Unknown command: {cmd}") if __name__ == "__main__": main()