ext_commands.py 660 B

1234567891011121314151617181920212223242526272829
  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. )
  14. cmds_to_register = [
  15. reset_password,
  16. reset_email,
  17. reset_encrypt_key_pair,
  18. vdb_migrate,
  19. convert_to_agent_apps,
  20. add_qdrant_doc_id_index,
  21. create_tenant,
  22. upgrade_db,
  23. fix_app_site_missing,
  24. ]
  25. for cmd in cmds_to_register:
  26. app.cli.add_command(cmd)