How-To Guides
Task-oriented guides for common workflows.
Add a Command to axm
To expose a CLI command from your AXM package, add an entry point in your pyproject.toml:
Command names must follow the {domain}_{action} convention:
TOML
# Example from axm-init
[project.entry-points."axm.commands"]
init_scaffold = "axm_init.cli:scaffold"
init_check = "axm_init.cli:check"
The function must be a valid cyclopts command:
Python
# my_package/cli.py
from pathlib import Path
def my_function(path: Path = Path(".")) -> None:
"""My custom AXM command."""
print(f"Running on {path}")
After installing your package, axm mycommand will be available automatically.