Files
automaton/automaton/dashboard/__main__.py
T

44 lines
1.4 KiB
Python

#!/usr/bin/env python3
"""Automaton Dashboard - Interactive web dashboard for automaton task progress.
Usage:
python -m automaton.dashboard # Start from current directory
python -m automaton.dashboard /path/to/project # Start from specific directory
python -m automaton.dashboard --host 0.0.0.0 --port 3000 # Custom host/port
The dashboard is scope-aware:
- When run from ~/.automaton/, it tracks framework development
- When run from a project root, it tracks that project's tasks
"""
import argparse
import sys
from pathlib import Path
# Add the automaton dashboard to the path
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
from automaton.dashboard.ui.app import DashboardApp
def main():
parser = argparse.ArgumentParser(description="Automaton Dashboard")
parser.add_argument("path", nargs="?", default=None,
help="Project directory (defaults to current directory)")
parser.add_argument("--host", default="localhost",
help="Host to bind to (default: localhost)")
parser.add_argument("--port", type=int, default=8080,
help="Port to listen on (default: 8080)")
args = parser.parse_args()
start_path = Path(args.path) if args.path else None
app = DashboardApp(start_path=start_path, host=args.host, port=args.port)
if not app.initialize():
sys.exit(1)
app.run()
if __name__ == "__main__":
main()