Skip to content

Commit d5f4fc2

Browse files
committed
Enhance CLI with subcommand handling and usage instructions
1 parent c78f576 commit d5f4fc2

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

ModelForge/cli.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,24 @@ def check_huggingface_login():
5050
def main():
5151
"""
5252
Main entry point for ModelForge CLI.
53+
54+
Subcommands:
55+
modelforge — start the web server
56+
modelforge cli — launch the interactive CLI wizard
5357
"""
58+
if len(sys.argv) > 1:
59+
subcommand = sys.argv[1]
60+
if subcommand == "cli":
61+
from .notebook_cli.wizard import main as cli_main
62+
cli_main()
63+
return
64+
else:
65+
print(f"Unknown subcommand: '{subcommand}'")
66+
print("Usage:")
67+
print(" modelforge Start the web server")
68+
print(" modelforge cli Launch the interactive CLI wizard")
69+
sys.exit(1)
70+
5471
print("\n" + "=" * 80)
5572
print(" __ __ _ _ _____ ")
5673
print(" | \\/ | | | | | ___| ")

ModelForge/notebook_cli/wizard.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
prompt_task,
3333
)
3434

35-
_BANNER = """
35+
_BANNER = r"""
3636
__ __ _ _ _____
3737
| \/ | ___ __| | ___| || ___|__ _ __ __ _ ___
38-
| |\/| |/ _ \ / _` |/ _ \ || |_ / _ \| '__/ _` |/ _ \\
38+
| |\/| |/ _ \ / _` |/ _ \ || |_ / _ \| '__/ _` |/ _ \
3939
| | | | (_) | (_| | __/ || _| (_) | | | (_| | __/
4040
|_| |_|\___/ \__,_|\___|_||_| \___/|_| \__, |\___|
4141
|___/

0 commit comments

Comments
 (0)