Add controlled coding agent automation
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-08-21 22:49:49 +02:00
parent 9bac41f071
commit bfa5cdcd3e
25 changed files with 1263 additions and 1 deletions

36
src/lai_automation/cli.py Normal file
View File

@@ -0,0 +1,36 @@
from __future__ import annotations
import argparse
import logging
from .config import Settings
from .worker import AutomationWorker
def main() -> None:
parser = argparse.ArgumentParser(description="LAI controlled coding-agent automation")
parser.add_argument("command", choices=["once", "worker", "check"])
args = parser.parse_args()
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s %(levelname)s %(name)s %(message)s",
)
settings = Settings.from_env()
if args.command == "check":
print(f"mode={settings.mode}")
print(f"source={settings.source_repository}")
print(f"model={settings.agent_model}")
print(f"direct_main_enabled={settings.allow_direct_main}")
return
worker = AutomationWorker(settings)
if args.command == "once":
worker.run_once()
else:
worker.run_forever()
if __name__ == "__main__":
main()