This commit is contained in:
2025-11-02 01:04:31 +03:00
parent 64c984a704
commit 9c58c10152
70 changed files with 341 additions and 391 deletions
+11 -16
View File
@@ -2,25 +2,20 @@ from argenta import Command
from argenta.command import Flag, Flags
# Простая команда без флагов
hello_cmd = Command(
"hello",
description="Greet the user"
)
hello_cmd = Command("hello", description="Greet the user")
# Команда с описанием и псевдонимами
quit_cmd = Command(
"quit",
description="Exit the application",
aliases=["exit", "q"]
)
quit_cmd = Command("quit", description="Exit the application", aliases=["exit", "q"])
# Команда с флагами
# Команда с флагами
deploy_cmd = Command(
"deploy",
description="Deploy application to server",
flags=Flags([
Flag("env", help="Environment name", possible_values=["dev", "prod"]),
Flag("force", help="Force deployment")
]),
aliases=["dep"]
)
flags=Flags(
[
Flag("env", help="Environment name", possible_values=["dev", "prod"]),
Flag("force", help="Force deployment"),
]
),
aliases=["dep"],
)