ext_commands.py 776 B

12345678910111213141516171819202122232425262728293031323334
  1. from dify_app import DifyApp
  2. def init_app(app: DifyApp):
  3. from commands import (
  4. add_qdrant_doc_id_index,
  5. convert_to_agent_apps,
  6. create_tenant,
  7. fix_app_site_missing,
  8. reset_email,
  9. reset_encrypt_key_pair,
  10. reset_password,
  11. upgrade_db,
  12. vdb_migrate,
  13. migrate_data_for_plugin,
  14. extract_plugins,
  15. )
  16. cmds_to_register = [
  17. reset_password,
  18. reset_email,
  19. reset_encrypt_key_pair,
  20. vdb_migrate,
  21. convert_to_agent_apps,
  22. add_qdrant_doc_id_index,
  23. create_tenant,
  24. upgrade_db,
  25. fix_app_site_missing,
  26. migrate_data_for_plugin,
  27. extract_plugins,
  28. ]
  29. for cmd in cmds_to_register:
  30. app.cli.add_command(cmd)