Skip to main content
Angreal Documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Create a Command Group

Create a Command Group

Command groups allow you to organize related commands under a common namespace.

Preferred Method

  1. Create a command group.
  2. Apply the resulting decorator to a command decorator.
import angreal
test = angreal.group(name="test")

@test
@angreal.command(name="command", about="a test command")
def command_function():
    pass

Alternative Method

You can directly invoke a group decorator on a command decorator:

import angreal

@angreal.group(name="test_", about="commands for testing")
@angreal.command(name="command", about="a test command")
def command_function():
    pass