
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), "company-explorer"))
from backend.database import SessionLocal, Industry

def list_industries():
    db = SessionLocal()
    try:
        industries = db.query(Industry.name).all()
        print("Available Industries:")
        for (name,) in industries:
            print(f"- {name}")
    finally:
        db.close()

if __name__ == "__main__":
    list_industries()
