mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 18:15:28 +03:00
docs
This commit is contained in:
@@ -1,20 +1,19 @@
|
||||
from argenta import Command
|
||||
from argenta.command import Flag, Flags
|
||||
from argenta.command import Flag, Flags, Command
|
||||
|
||||
# Простая команда без флагов
|
||||
# Simple command without flags
|
||||
hello_cmd = Command("hello", description="Greet the user")
|
||||
|
||||
# Команда с описанием и псевдонимами
|
||||
# Command with description and aliases
|
||||
quit_cmd = Command("quit", description="Exit the application", aliases=["exit", "q"])
|
||||
|
||||
# Команда с флагами
|
||||
# Command with flags
|
||||
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"),
|
||||
Flag("env", possible_values=["dev", "prod"]),
|
||||
Flag("force"),
|
||||
]
|
||||
),
|
||||
aliases=["dep"],
|
||||
|
||||
Reference in New Issue
Block a user