chore: archive previous Aider worker
This commit is contained in:
36
old_2026-08-31/src/lai_automation/cli.py
Normal file
36
old_2026-08-31/src/lai_automation/cli.py
Normal 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()
|
||||
Reference in New Issue
Block a user