ext_commands.py 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. from dify_app import DifyApp
  2. def init_app(app: DifyApp):
  3. from commands import (
  4. add_qdrant_index,
  5. clear_free_plan_tenant_expired_logs,
  6. convert_to_agent_apps,
  7. create_tenant,
  8. extract_plugins,
  9. extract_unique_plugins,
  10. fix_app_site_missing,
  11. install_plugins,
  12. migrate_data_for_plugin,
  13. old_metadata_migration,
  14. reset_email,
  15. reset_encrypt_key_pair,
  16. reset_password,
  17. upgrade_db,
  18. vdb_migrate,
  19. )
  20. cmds_to_register = [
  21. reset_password,
  22. reset_email,
  23. reset_encrypt_key_pair,
  24. vdb_migrate,
  25. convert_to_agent_apps,
  26. add_qdrant_index,
  27. create_tenant,
  28. upgrade_db,
  29. fix_app_site_missing,
  30. migrate_data_for_plugin,
  31. extract_plugins,
  32. extract_unique_plugins,
  33. install_plugins,
  34. old_metadata_migration,
  35. clear_free_plan_tenant_expired_logs,
  36. ]
  37. for cmd in cmds_to_register:
  38. app.cli.add_command(cmd)