Add ArgumentAction.ACTION, support POSIX bundling in CAP, Move all Actions to their own file

This commit is contained in:
2025-05-25 19:25:32 -04:00
parent 429b434566
commit fb1ffbe9f6
46 changed files with 1630 additions and 842 deletions

View File

@ -1,6 +1,7 @@
import asyncio
from falyx import Action, ActionGroup, Command, Falyx
from falyx import Falyx
from falyx.action import Action, ActionGroup
# Define a shared async function
@ -19,10 +20,11 @@ action3 = Action("say_hello_3", action=say_hello)
# Combine into an ActionGroup
group = ActionGroup(name="greet_group", actions=[action1, action2, action3])
# Create the Command with auto_args=True
cmd = Command(
flx = Falyx("Test Group")
flx.add_command(
key="G",
description="Greet someone with multiple variations.",
aliases=["greet", "hello"],
action=group,
arg_metadata={
"name": {
@ -33,7 +35,4 @@ cmd = Command(
},
},
)
flx = Falyx("Test Group")
flx.add_command_from_command(cmd)
asyncio.run(flx.run())