mcli-framework 7.1.0__tar.gz → 7.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mcli-framework might be problematic. Click here for more details.

Files changed (299) hide show
  1. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/.github/workflows/security.yml +2 -2
  2. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/PKG-INFO +2 -2
  3. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/mcli_rust/src/command_parser.rs +14 -7
  4. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/mcli_rust/src/file_watcher.rs +9 -0
  5. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/mcli_rust/src/process_manager.rs +6 -0
  6. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/mcli_rust/src/tfidf.rs +3 -0
  7. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/pyproject.toml +2 -2
  8. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/app/completion_cmd.py +59 -49
  9. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/app/completion_helpers.py +60 -138
  10. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/app/logs_cmd.py +46 -13
  11. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/app/main.py +17 -14
  12. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/app/model_cmd.py +19 -4
  13. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/chat/chat.py +3 -2
  14. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/search/cached_vectorizer.py +1 -0
  15. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/services/data_pipeline.py +12 -5
  16. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/services/lsh_client.py +69 -58
  17. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/api/app.py +28 -36
  18. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/api/middleware.py +8 -16
  19. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/api/routers/admin_router.py +3 -1
  20. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/api/routers/auth_router.py +32 -56
  21. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/api/routers/backtest_router.py +3 -1
  22. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/api/routers/data_router.py +3 -1
  23. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/api/routers/model_router.py +35 -74
  24. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/api/routers/monitoring_router.py +3 -1
  25. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/api/routers/portfolio_router.py +3 -1
  26. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/api/routers/prediction_router.py +60 -65
  27. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/api/routers/trade_router.py +6 -2
  28. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/api/routers/websocket_router.py +12 -9
  29. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/api/schemas.py +10 -2
  30. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/auth/auth_manager.py +49 -114
  31. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/auth/models.py +30 -15
  32. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/auth/permissions.py +12 -19
  33. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/backtesting/backtest_engine.py +134 -108
  34. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/backtesting/performance_metrics.py +142 -108
  35. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/cache.py +12 -18
  36. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/cli/main.py +37 -23
  37. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/config/settings.py +29 -12
  38. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/dashboard/app.py +122 -130
  39. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/dashboard/app_integrated.py +283 -152
  40. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/dashboard/app_supabase.py +176 -108
  41. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/dashboard/app_training.py +212 -206
  42. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/dashboard/cli.py +14 -5
  43. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/data_ingestion/api_connectors.py +51 -81
  44. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/data_ingestion/data_pipeline.py +127 -125
  45. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/data_ingestion/stream_processor.py +72 -80
  46. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/database/migrations/env.py +3 -2
  47. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/database/models.py +112 -79
  48. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/database/session.py +6 -5
  49. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/experimentation/ab_testing.py +149 -99
  50. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/features/ensemble_features.py +9 -8
  51. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/features/political_features.py +6 -5
  52. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/features/recommendation_engine.py +15 -14
  53. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/features/stock_features.py +7 -6
  54. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/features/test_feature_engineering.py +8 -7
  55. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/logging.py +10 -15
  56. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/mlops/data_versioning.py +57 -64
  57. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/mlops/experiment_tracker.py +49 -41
  58. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/mlops/model_serving.py +59 -62
  59. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/mlops/pipeline_orchestrator.py +203 -149
  60. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/models/base_models.py +8 -7
  61. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/models/ensemble_models.py +6 -5
  62. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/models/recommendation_models.py +7 -6
  63. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/models/test_models.py +18 -14
  64. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/monitoring/drift_detection.py +95 -74
  65. mcli_framework-7.1.2/src/mcli/ml/monitoring/metrics.py +33 -0
  66. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/optimization/portfolio_optimizer.py +172 -132
  67. mcli_framework-7.1.2/src/mcli/ml/predictions/prediction_engine.py +235 -0
  68. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/preprocessing/data_cleaners.py +6 -5
  69. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/preprocessing/feature_extractors.py +7 -6
  70. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/preprocessing/ml_pipeline.py +3 -2
  71. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/preprocessing/politician_trading_preprocessor.py +11 -10
  72. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/scripts/populate_sample_data.py +36 -16
  73. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/tasks.py +82 -83
  74. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/tests/test_integration.py +86 -76
  75. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/tests/test_training_dashboard.py +169 -142
  76. mcli_framework-7.1.2/src/mcli/mygroup/test_cmd.py +2 -0
  77. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/self/self_cmd.py +38 -18
  78. mcli_framework-7.1.2/src/mcli/self/test_cmd.py +2 -0
  79. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/dashboard/dashboard_cmd.py +13 -6
  80. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/lsh_integration.py +46 -58
  81. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/politician_trading/commands.py +576 -427
  82. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/politician_trading/config.py +7 -7
  83. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/politician_trading/connectivity.py +35 -33
  84. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/politician_trading/data_sources.py +72 -71
  85. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/politician_trading/database.py +18 -16
  86. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/politician_trading/demo.py +4 -3
  87. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/politician_trading/models.py +5 -5
  88. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/politician_trading/monitoring.py +13 -13
  89. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/politician_trading/scrapers.py +332 -224
  90. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/politician_trading/scrapers_california.py +116 -94
  91. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/politician_trading/scrapers_eu.py +70 -71
  92. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/politician_trading/scrapers_uk.py +118 -90
  93. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/politician_trading/scrapers_us_states.py +125 -92
  94. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/politician_trading/workflow.py +98 -71
  95. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli_framework.egg-info/PKG-INFO +2 -2
  96. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli_framework.egg-info/SOURCES.txt +22 -0
  97. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli_framework.egg-info/requires.txt +1 -1
  98. mcli_framework-7.1.2/tests/cli/test_app_logs_cmd.py +208 -0
  99. mcli_framework-7.1.2/tests/cli/test_app_redis_cmd.py +280 -0
  100. mcli_framework-7.1.2/tests/cli/test_logs_cmd.py +284 -0
  101. mcli_framework-7.1.2/tests/cli/test_self_cmd_commands.py +244 -0
  102. mcli_framework-7.1.2/tests/cli/test_self_cmd_plugins.py +260 -0
  103. mcli_framework-7.1.2/tests/cli/test_self_cmd_utilities.py +243 -0
  104. mcli_framework-7.1.2/tests/cli/test_workflow_file.py +140 -0
  105. mcli_framework-7.1.2/tests/cli/test_workflow_gcloud.py +122 -0
  106. mcli_framework-7.1.2/tests/cli/test_workflow_registry.py +234 -0
  107. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_california_scraper.py +13 -2
  108. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_congress_scraper.py +13 -2
  109. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_daemon_client.py +10 -4
  110. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_lsh_service.py +16 -2
  111. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_ml_auth.py +18 -4
  112. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_ml_models.py +21 -9
  113. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_ml_pipeline.py +22 -7
  114. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_politician_trading.py +19 -9
  115. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_repo_operations.py +18 -1
  116. mcli_framework-7.1.2/tests/integration/test_scheduler_integration.py +496 -0
  117. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_service_registry.py +26 -1
  118. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_uk_scraper.py +13 -2
  119. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_us_states_scraper.py +13 -2
  120. mcli_framework-7.1.2/tests/unit/test_auth_modules.py +328 -0
  121. mcli_framework-7.1.2/tests/unit/test_config.py +104 -0
  122. mcli_framework-7.1.2/tests/unit/test_daemon_api.py +266 -0
  123. mcli_framework-7.1.2/tests/unit/test_dashboard_functions.py +266 -0
  124. mcli_framework-7.1.2/tests/unit/test_logger.py +218 -0
  125. mcli_framework-7.1.2/tests/unit/test_prediction_engine.py +490 -0
  126. mcli_framework-7.1.2/tests/unit/test_scheduler_cron_parser.py +511 -0
  127. mcli_framework-7.1.2/tests/unit/test_scheduler_job.py +530 -0
  128. mcli_framework-7.1.2/tests/unit/test_scheduler_monitor.py +551 -0
  129. mcli_framework-7.1.2/tests/unit/test_scheduler_persistence.py +720 -0
  130. mcli_framework-7.1.2/tests/unit/test_self_update.py +183 -0
  131. mcli_framework-7.1.2/tests/unit/test_toml_utils.py +194 -0
  132. mcli_framework-7.1.0/src/mcli/ml/monitoring/metrics.py +0 -45
  133. mcli_framework-7.1.0/src/mcli/mygroup/test_cmd.py +0 -1
  134. mcli_framework-7.1.0/src/mcli/self/test_cmd.py +0 -1
  135. mcli_framework-7.1.0/tests/unit/test_config.py +0 -129
  136. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/.github/dependabot.yml +0 -0
  137. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/.github/workflows/build.yml +0 -0
  138. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/.github/workflows/ci.yml +0 -0
  139. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/.github/workflows/ml-pipeline.yml +0 -0
  140. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/.github/workflows/publish-self-hosted.yml +0 -0
  141. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/.github/workflows/publish.yml +0 -0
  142. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/.github/workflows/release.yml +0 -0
  143. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/.github/workflows/test.yml +0 -0
  144. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/LICENSE +0 -0
  145. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/MANIFEST.in +0 -0
  146. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/PERFORMANCE_OPTIMIZATIONS.md +0 -0
  147. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/README.md +0 -0
  148. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/mcli_rust/Cargo.toml +0 -0
  149. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/mcli_rust/src/lib.rs +0 -0
  150. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/setup.cfg +0 -0
  151. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/app/chat_cmd.py +0 -0
  152. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/app/commands_cmd.py +0 -0
  153. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/app/cron_test_cmd.py +0 -0
  154. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/app/model/model.py +0 -0
  155. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/app/redis_cmd.py +0 -0
  156. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/app/video/video.py +0 -0
  157. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/app/visual_cmd.py +0 -0
  158. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/chat/command_rag.py +0 -0
  159. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/chat/enhanced_chat.py +0 -0
  160. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/chat/system_controller.py +0 -0
  161. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/chat/system_integration.py +0 -0
  162. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/cli.py +0 -0
  163. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/config.toml +0 -0
  164. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/api/api.py +0 -0
  165. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/api/daemon_client.py +0 -0
  166. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/api/daemon_client_local.py +0 -0
  167. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/api/daemon_decorator.py +0 -0
  168. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/api/mcli_decorators.py +0 -0
  169. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/auth/auth.py +0 -0
  170. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/auth/aws_manager.py +0 -0
  171. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/auth/azure_manager.py +0 -0
  172. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/auth/credential_manager.py +0 -0
  173. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/auth/gcp_manager.py +0 -0
  174. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/auth/key_manager.py +0 -0
  175. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/auth/mcli_manager.py +0 -0
  176. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/auth/token_manager.py +0 -0
  177. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/auth/token_util.py +0 -0
  178. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/config/config.py +0 -0
  179. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/discovery/__init__.py +0 -0
  180. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/discovery/command_discovery.py +0 -0
  181. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/erd/erd.py +0 -0
  182. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/erd/generate_graph.py +0 -0
  183. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/files/files.py +0 -0
  184. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/fs/fs.py +0 -0
  185. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/lib.py +0 -0
  186. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/logger/logger.py +0 -0
  187. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/paths.py +0 -0
  188. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/performance/optimizer.py +0 -0
  189. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/performance/rust_bridge.py +0 -0
  190. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/performance/uvloop_config.py +0 -0
  191. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/pickles/pickles.py +0 -0
  192. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/services/redis_service.py +0 -0
  193. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/shell/shell.py +0 -0
  194. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/toml/toml.py +0 -0
  195. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/ui/styling.py +0 -0
  196. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/ui/visual_effects.py +0 -0
  197. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/lib/watcher/watcher.py +0 -0
  198. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/configs/dvc_config.py +0 -0
  199. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/configs/mlflow_config.py +0 -0
  200. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/configs/mlops_manager.py +0 -0
  201. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/ml/preprocessing/test_preprocessing.py +4 -4
  202. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/public/oi/oi.py +0 -0
  203. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/public/public.py +0 -0
  204. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/daemon/api_daemon.py +0 -0
  205. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/daemon/async_command_database.py +0 -0
  206. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/daemon/async_process_manager.py +0 -0
  207. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/daemon/client.py +0 -0
  208. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/daemon/commands.py +0 -0
  209. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/daemon/daemon.py +0 -0
  210. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/daemon/daemon_api.py +0 -0
  211. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/daemon/enhanced_daemon.py +0 -0
  212. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/daemon/process_cli.py +0 -0
  213. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/daemon/process_manager.py +0 -0
  214. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/daemon/test_daemon.py +0 -0
  215. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/docker/docker.py +0 -0
  216. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/file/file.py +0 -0
  217. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/gcloud/config.toml +0 -0
  218. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/gcloud/gcloud.py +0 -0
  219. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/git_commit/ai_service.py +0 -0
  220. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/git_commit/commands.py +0 -0
  221. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/model_service/client.py +0 -0
  222. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/model_service/download_and_run_efficient_models.py +0 -0
  223. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/model_service/lightweight_embedder.py +0 -0
  224. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/model_service/lightweight_model_server.py +0 -0
  225. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/model_service/lightweight_test.py +0 -0
  226. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/model_service/model_service.py +0 -0
  227. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/model_service/ollama_efficient_runner.py +0 -0
  228. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/model_service/pdf_processor.py +0 -0
  229. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/model_service/test_efficient_runner.py +0 -0
  230. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/model_service/test_example.py +0 -0
  231. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/model_service/test_integration.py +0 -0
  232. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/model_service/test_new_features.py +0 -0
  233. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/openai/openai.py +0 -0
  234. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/politician_trading/supabase_functions.py +0 -0
  235. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/registry/registry.py +0 -0
  236. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/repo/repo.py +0 -0
  237. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/scheduler/commands.py +0 -0
  238. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/scheduler/cron_parser.py +0 -0
  239. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/scheduler/job.py +0 -0
  240. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/scheduler/monitor.py +0 -0
  241. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/scheduler/persistence.py +0 -0
  242. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/scheduler/scheduler.py +0 -0
  243. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/sync/sync_cmd.py +0 -0
  244. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/sync/test_cmd.py +0 -0
  245. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/videos/videos.py +0 -0
  246. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/wakatime/wakatime.py +0 -0
  247. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli/workflow/workflow.py +0 -0
  248. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli_framework.egg-info/dependency_links.txt +0 -0
  249. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli_framework.egg-info/entry_points.txt +0 -0
  250. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/src/mcli_framework.egg-info/top_level.txt +0 -0
  251. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/cli/test_all_commands.py +0 -0
  252. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/cli/test_chat_cmd.py +0 -0
  253. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/cli/test_main_app.py +0 -0
  254. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/cli/test_model_cmd.py +0 -0
  255. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/cli/test_self_cmd.py +0 -0
  256. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/conftest.py +0 -0
  257. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/demo_generate_graph.py +0 -0
  258. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/demo_hierarchical_transform.py +0 -0
  259. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/e2e/test_complete_workflows.py +0 -0
  260. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/e2e/test_model_workflow.py +0 -0
  261. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/e2e/test_new_user_workflow.py +0 -0
  262. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/e2e/test_update_workflow.py +0 -0
  263. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/fixtures/chat_fixtures.py +0 -0
  264. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/fixtures/cli_fixtures.py +0 -0
  265. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/fixtures/data_fixtures.py +0 -0
  266. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/fixtures/db_fixtures.py +0 -0
  267. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/fixtures/model_fixtures.py +0 -0
  268. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_agent.py +0 -0
  269. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_chat_client.py +0 -0
  270. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_chat_system.py +0 -0
  271. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_daemon_server.py +0 -0
  272. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_flask_webapp.py +0 -0
  273. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_gcloud_services.py +0 -0
  274. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_lsh_client.py +0 -0
  275. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_ml_data_pipeline.py +0 -0
  276. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_module_imports.py +0 -0
  277. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_oi_service.py +0 -0
  278. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_video_processing.py +0 -0
  279. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_wakatime_api.py +0 -0
  280. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_webapp_full.py +0 -0
  281. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_workflow.py +0 -0
  282. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/integration/test_workflow_commands.py +0 -0
  283. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/run_tests.py +0 -0
  284. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/test_harness.py +0 -0
  285. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/unit/test_api_utils.py +0 -0
  286. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/unit/test_bug_fixes.py +0 -0
  287. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/unit/test_dependencies.py +0 -0
  288. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/unit/test_erd_generation.py +0 -0
  289. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/unit/test_erd_generic.py +0 -0
  290. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/unit/test_erd_imports.py +0 -0
  291. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/unit/test_graph_generation.py +0 -0
  292. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/unit/test_lib_auth.py +0 -0
  293. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/unit/test_lib_files.py +0 -0
  294. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/unit/test_lib_utils.py +0 -0
  295. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/unit/test_ml_preprocessing.py +0 -0
  296. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/unit/test_paths.py +0 -0
  297. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/unit/test_regression.py +0 -0
  298. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/unit/test_ui_rich.py +0 -0
  299. {mcli_framework-7.1.0 → mcli_framework-7.1.2}/tests/unit/test_uv_compat.py +0 -0
@@ -109,6 +109,6 @@ jobs:
109
109
  uses: trufflesecurity/trufflehog@main
110
110
  with:
111
111
  path: ./
112
- base: main
113
- head: HEAD
112
+ base: ${{ github.event.before || 'main' }}
113
+ head: ${{ github.sha }}
114
114
  extra_args: --debug --only-verified
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcli-framework
3
- Version: 7.1.0
3
+ Version: 7.1.2
4
4
  Summary: 🚀 High-performance CLI framework with Rust extensions, AI chat, and stunning visuals
5
5
  Author-email: Luis Fernandez de la Vara <luis@lefv.io>
6
6
  Maintainer-email: Luis Fernandez de la Vara <luis@lefv.io>
@@ -63,7 +63,7 @@ Requires-Dist: uvloop>=0.19.0
63
63
  Requires-Dist: aiosqlite>=0.20.0
64
64
  Requires-Dist: redis>=5.0.0
65
65
  Requires-Dist: aiohttp-sse-client>=0.2.1
66
- Requires-Dist: asyncio-mqtt>=0.13.0
66
+ Requires-Dist: aiomqtt>=2.0.0
67
67
  Requires-Dist: opencv-python>=4.11.0.86
68
68
  Requires-Dist: pillow>=11.2.1
69
69
  Requires-Dist: numpy<2.0.0,>=1.24.0
@@ -1,3 +1,5 @@
1
+ #![allow(clippy::useless_conversion)]
2
+
1
3
  use pyo3::prelude::*;
2
4
  use regex::Regex;
3
5
  use rustc_hash::{FxHashMap, FxHashSet};
@@ -30,6 +32,7 @@ pub struct Command {
30
32
  impl Command {
31
33
  #[new]
32
34
  #[pyo3(signature = (id, name, description, code, language, group=None, tags=None, execution_count=None))]
35
+ #[allow(clippy::too_many_arguments)]
33
36
  pub fn new(
34
37
  id: String,
35
38
  name: String,
@@ -109,6 +112,7 @@ impl CommandMatcher {
109
112
  }
110
113
  }
111
114
 
115
+ #[allow(clippy::useless_conversion)]
112
116
  pub fn add_commands(&mut self, commands: Vec<Command>) -> PyResult<()> {
113
117
  for command in commands {
114
118
  self.add_command(command)?;
@@ -116,6 +120,7 @@ impl CommandMatcher {
116
120
  Ok(())
117
121
  }
118
122
 
123
+ #[allow(clippy::useless_conversion)]
119
124
  pub fn add_command(&mut self, command: Command) -> PyResult<()> {
120
125
  let index = self.commands.len();
121
126
 
@@ -123,7 +128,7 @@ impl CommandMatcher {
123
128
  let normalized_name = normalize_text(&command.name);
124
129
  self.name_index
125
130
  .entry(normalized_name)
126
- .or_insert_with(Vec::new)
131
+ .or_default()
127
132
  .push(index);
128
133
 
129
134
  // Index by tags
@@ -131,7 +136,7 @@ impl CommandMatcher {
131
136
  let normalized_tag = normalize_text(tag);
132
137
  self.tag_index
133
138
  .entry(normalized_tag)
134
- .or_insert_with(Vec::new)
139
+ .or_default()
135
140
  .push(index);
136
141
  }
137
142
 
@@ -139,10 +144,7 @@ impl CommandMatcher {
139
144
  let text = format!("{} {}", command.name, command.description);
140
145
  let words = self.extract_words(&text);
141
146
  for word in words {
142
- self.word_index
143
- .entry(word)
144
- .or_insert_with(Vec::new)
145
- .push(index);
147
+ self.word_index.entry(word).or_default().push(index);
146
148
  }
147
149
 
148
150
  self.commands.push(command);
@@ -150,6 +152,7 @@ impl CommandMatcher {
150
152
  }
151
153
 
152
154
  #[pyo3(signature = (query, limit=None))]
155
+ #[allow(clippy::useless_conversion)]
153
156
  pub fn search(&self, query: String, limit: Option<usize>) -> PyResult<Vec<MatchResult>> {
154
157
  if self.commands.is_empty() {
155
158
  return Ok(Vec::new());
@@ -257,6 +260,7 @@ impl CommandMatcher {
257
260
  }
258
261
 
259
262
  #[pyo3(signature = (tags, limit=None))]
263
+ #[allow(clippy::useless_conversion)]
260
264
  pub fn search_by_tags(
261
265
  &self,
262
266
  tags: Vec<String>,
@@ -294,6 +298,7 @@ impl CommandMatcher {
294
298
  }
295
299
 
296
300
  #[pyo3(signature = (group, limit=None))]
301
+ #[allow(clippy::useless_conversion)]
297
302
  pub fn search_by_group(
298
303
  &self,
299
304
  group: String,
@@ -326,6 +331,7 @@ impl CommandMatcher {
326
331
  }
327
332
 
328
333
  #[pyo3(signature = (limit=None))]
334
+ #[allow(clippy::useless_conversion)]
329
335
  pub fn get_popular_commands(&self, limit: Option<usize>) -> PyResult<Vec<MatchResult>> {
330
336
  let limit = limit.unwrap_or(10);
331
337
  let mut commands_with_scores: Vec<_> = self
@@ -352,6 +358,7 @@ impl CommandMatcher {
352
358
  Ok(results)
353
359
  }
354
360
 
361
+ #[allow(clippy::useless_conversion)]
355
362
  pub fn clear(&mut self) -> PyResult<()> {
356
363
  self.commands.clear();
357
364
  self.name_index.clear();
@@ -393,7 +400,7 @@ impl CommandMatcher {
393
400
  let query_chars: Vec<char> = query.chars().collect();
394
401
  let mut matches = Vec::new();
395
402
 
396
- for (_idx, command) in self.commands.iter().enumerate() {
403
+ for command in self.commands.iter() {
397
404
  let name_score = fuzzy_score(&query_chars, &command.name);
398
405
  let desc_score = fuzzy_score(&query_chars, &command.description);
399
406
 
@@ -1,3 +1,6 @@
1
+ #![allow(clippy::useless_conversion)]
2
+ #![allow(clippy::uninlined_format_args)]
3
+
1
4
  use notify::{Config, Event, EventKind, RecommendedWatcher, RecursiveMode, Watcher};
2
5
  use pyo3::prelude::*;
3
6
  use serde::{Deserialize, Serialize};
@@ -34,6 +37,12 @@ pub struct FileWatcher {
34
37
  watch_paths: Vec<PathBuf>,
35
38
  }
36
39
 
40
+ impl Default for FileWatcher {
41
+ fn default() -> Self {
42
+ Self::new()
43
+ }
44
+ }
45
+
37
46
  #[pymethods]
38
47
  impl FileWatcher {
39
48
  #[new]
@@ -1,3 +1,6 @@
1
+ #![allow(clippy::useless_conversion)]
2
+ #![allow(clippy::uninlined_format_args)]
3
+
1
4
  use pyo3::prelude::*;
2
5
  use serde::{Deserialize, Serialize};
3
6
  use std::collections::HashMap;
@@ -10,6 +13,7 @@ use tokio::time::{timeout, Duration};
10
13
  use uuid::Uuid;
11
14
 
12
15
  #[derive(Debug, Clone, Serialize, Deserialize)]
16
+ #[allow(dead_code)]
13
17
  pub enum ProcessStatus {
14
18
  Created,
15
19
  Running,
@@ -100,7 +104,9 @@ impl ProcessInfo {
100
104
  struct ManagedProcess {
101
105
  info: Arc<Mutex<ProcessInfo>>,
102
106
  child: Option<Child>,
107
+ #[allow(dead_code)]
103
108
  stdout_receiver: Option<mpsc::Receiver<String>>,
109
+ #[allow(dead_code)]
104
110
  stderr_receiver: Option<mpsc::Receiver<String>>,
105
111
  }
106
112
 
@@ -1,3 +1,5 @@
1
+ #![allow(clippy::useless_conversion)]
2
+
1
3
  use pyo3::prelude::*;
2
4
  use rayon::prelude::*;
3
5
  use regex::Regex;
@@ -6,6 +8,7 @@ use unicode_normalization::UnicodeNormalization;
6
8
 
7
9
  #[derive(Clone)]
8
10
  struct Document {
11
+ #[allow(dead_code)]
9
12
  id: usize,
10
13
  tokens: Vec<String>,
11
14
  token_counts: FxHashMap<String, usize>,
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mcli-framework"
3
- version = "7.1.0"
3
+ version = "7.1.2"
4
4
  description = "🚀 High-performance CLI framework with Rust extensions, AI chat, and stunning visuals"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.9"
@@ -73,7 +73,7 @@ dependencies = [
73
73
  "aiosqlite>=0.20.0",
74
74
  "redis>=5.0.0",
75
75
  "aiohttp-sse-client>=0.2.1",
76
- "asyncio-mqtt>=0.13.0",
76
+ "aiomqtt>=2.0.0",
77
77
 
78
78
  # Video processing
79
79
  "opencv-python>=4.11.0.86",
@@ -6,8 +6,10 @@ for bash, zsh, and fish shells.
6
6
  """
7
7
 
8
8
  import os
9
- import click
10
9
  from pathlib import Path
10
+
11
+ import click
12
+
11
13
  from mcli.lib.ui.styling import success
12
14
 
13
15
 
@@ -22,29 +24,29 @@ def completion():
22
24
  def bash_completion(ctx):
23
25
  """Generate bash completion script"""
24
26
  from click.shell_completion import BashComplete
25
-
27
+
26
28
  # Get the root CLI app
27
29
  app = ctx.find_root().command
28
30
  complete = BashComplete(app, {}, "mcli", "complete")
29
31
  script = complete.source()
30
-
32
+
31
33
  click.echo("# Bash completion script for MCLI")
32
34
  click.echo("# Add this to your ~/.bashrc or ~/.bash_profile:")
33
35
  click.echo()
34
36
  click.echo(script)
35
37
 
36
38
 
37
- @completion.command(name="zsh")
39
+ @completion.command(name="zsh")
38
40
  @click.pass_context
39
41
  def zsh_completion(ctx):
40
42
  """Generate zsh completion script"""
41
43
  from click.shell_completion import ZshComplete
42
-
44
+
43
45
  # Get the root CLI app
44
46
  app = ctx.find_root().command
45
47
  complete = ZshComplete(app, {}, "mcli", "complete")
46
48
  script = complete.source()
47
-
49
+
48
50
  click.echo("# Zsh completion script for MCLI")
49
51
  click.echo("# Add this to your ~/.zshrc:")
50
52
  click.echo()
@@ -56,12 +58,12 @@ def zsh_completion(ctx):
56
58
  def fish_completion(ctx):
57
59
  """Generate fish completion script"""
58
60
  from click.shell_completion import FishComplete
59
-
61
+
60
62
  # Get the root CLI app
61
63
  app = ctx.find_root().command
62
64
  complete = FishComplete(app, {}, "mcli", "complete")
63
65
  script = complete.source()
64
-
66
+
65
67
  click.echo("# Fish completion script for MCLI")
66
68
  click.echo("# Add this to ~/.config/fish/completions/mcli.fish:")
67
69
  click.echo()
@@ -69,45 +71,49 @@ def fish_completion(ctx):
69
71
 
70
72
 
71
73
  @completion.command(name="install")
72
- @click.option("--shell", type=click.Choice(['bash', 'zsh', 'fish']),
73
- help="Shell to install for (auto-detected if not specified)")
74
+ @click.option(
75
+ "--shell",
76
+ type=click.Choice(["bash", "zsh", "fish"]),
77
+ help="Shell to install for (auto-detected if not specified)",
78
+ )
74
79
  @click.pass_context
75
80
  def install_completion(ctx, shell):
76
81
  """Install shell completion for the current user"""
77
82
  import subprocess
78
-
83
+
79
84
  # Auto-detect shell if not specified
80
85
  if not shell:
81
- shell_path = os.environ.get('SHELL', '')
82
- if 'bash' in shell_path:
83
- shell = 'bash'
84
- elif 'zsh' in shell_path:
85
- shell = 'zsh'
86
- elif 'fish' in shell_path:
87
- shell = 'fish'
86
+ shell_path = os.environ.get("SHELL", "")
87
+ if "bash" in shell_path:
88
+ shell = "bash"
89
+ elif "zsh" in shell_path:
90
+ shell = "zsh"
91
+ elif "fish" in shell_path:
92
+ shell = "fish"
88
93
  else:
89
94
  click.echo("❌ Could not auto-detect shell. Please specify --shell")
90
95
  return
91
-
96
+
92
97
  # Get the root CLI app
93
98
  app = ctx.find_root().command
94
-
99
+
95
100
  try:
96
- if shell == 'bash':
101
+ if shell == "bash":
97
102
  from click.shell_completion import BashComplete
103
+
98
104
  complete = BashComplete(app, {}, "mcli", "complete")
99
105
  script = complete.source()
100
-
106
+
101
107
  # Install to bash completion directory
102
108
  bash_completion_dir = Path.home() / ".bash_completion.d"
103
109
  bash_completion_dir.mkdir(exist_ok=True)
104
110
  completion_file = bash_completion_dir / "mcli"
105
111
  completion_file.write_text(script)
106
-
112
+
107
113
  # Add sourcing to .bashrc if needed
108
114
  bashrc = Path.home() / ".bashrc"
109
115
  source_line = f"[ -f {completion_file} ] && source {completion_file}"
110
-
116
+
111
117
  if bashrc.exists():
112
118
  content = bashrc.read_text()
113
119
  if source_line not in content:
@@ -120,50 +126,54 @@ def install_completion(ctx, shell):
120
126
  click.echo(f"✅ Completion installed to {completion_file}")
121
127
  click.echo("💡 Add this to your ~/.bashrc:")
122
128
  click.echo(source_line)
123
-
124
- elif shell == 'zsh':
125
- from click.shell_completion import ZshComplete
129
+
130
+ elif shell == "zsh":
131
+ from click.shell_completion import ZshComplete
132
+
126
133
  complete = ZshComplete(app, {}, "mcli", "complete")
127
134
  script = complete.source()
128
-
135
+
129
136
  # Install to zsh completion directory
130
137
  zsh_completion_dir = Path.home() / ".config" / "zsh" / "completions"
131
138
  zsh_completion_dir.mkdir(parents=True, exist_ok=True)
132
139
  completion_file = zsh_completion_dir / "_mcli"
133
140
  completion_file.write_text(script)
134
-
141
+
135
142
  # Add to fpath in .zshrc if needed
136
143
  zshrc = Path.home() / ".zshrc"
137
144
  fpath_line = f'fpath=("{zsh_completion_dir}" $fpath)'
138
-
145
+
139
146
  if zshrc.exists():
140
147
  content = zshrc.read_text()
141
148
  if str(zsh_completion_dir) not in content:
142
149
  with zshrc.open("a") as f:
143
- f.write(f"\n# MCLI completion\n{fpath_line}\nautoload -U compinit && compinit\n")
144
- click.echo(" Added completion to ~/.zshrc")
150
+ f.write(
151
+ f"\n# MCLI completion\n{fpath_line}\nautoload -U compinit && compinit\n"
152
+ )
153
+ click.echo("✅ Added completion to ~/.zshrc")
145
154
  else:
146
155
  click.echo("ℹ️ Completion already configured in ~/.zshrc")
147
156
  else:
148
157
  click.echo(f"✅ Completion installed to {completion_file}")
149
158
  click.echo("💡 Add this to your ~/.zshrc:")
150
159
  click.echo(f"{fpath_line}\nautoload -U compinit && compinit")
151
-
152
- elif shell == 'fish':
160
+
161
+ elif shell == "fish":
153
162
  from click.shell_completion import FishComplete
163
+
154
164
  complete = FishComplete(app, {}, "mcli", "complete")
155
165
  script = complete.source()
156
-
166
+
157
167
  # Install to fish completion directory
158
168
  fish_completion_dir = Path.home() / ".config" / "fish" / "completions"
159
169
  fish_completion_dir.mkdir(parents=True, exist_ok=True)
160
170
  completion_file = fish_completion_dir / "mcli.fish"
161
171
  completion_file.write_text(script)
162
172
  click.echo(f"✅ Completion installed to {completion_file}")
163
-
173
+
164
174
  click.echo(f"🎉 Shell completion for {shell} installed successfully!")
165
175
  click.echo("💡 Restart your shell or source your profile to enable completions")
166
-
176
+
167
177
  except Exception as e:
168
178
  click.echo(f"❌ Failed to install completion: {e}")
169
179
 
@@ -171,39 +181,39 @@ def install_completion(ctx, shell):
171
181
  @completion.command(name="status")
172
182
  def completion_status():
173
183
  """Check current shell completion status"""
174
- current_shell = os.environ.get('SHELL', 'unknown')
175
- shell_name = Path(current_shell).name if current_shell != 'unknown' else 'unknown'
176
-
184
+ current_shell = os.environ.get("SHELL", "unknown")
185
+ shell_name = Path(current_shell).name if current_shell != "unknown" else "unknown"
186
+
177
187
  click.echo(f"🐚 Current shell: {shell_name} ({current_shell})")
178
188
  click.echo()
179
-
189
+
180
190
  # Check for existing completions
181
191
  completions_found = []
182
-
192
+
183
193
  # Check bash
184
194
  bash_completion = Path.home() / ".bash_completion.d" / "mcli"
185
195
  if bash_completion.exists():
186
196
  completions_found.append(f"✅ Bash completion: {bash_completion}")
187
197
  else:
188
198
  completions_found.append("❌ Bash completion: Not installed")
189
-
199
+
190
200
  # Check zsh
191
- zsh_completion = Path.home() / ".config" / "zsh" / "completions" / "_mcli"
201
+ zsh_completion = Path.home() / ".config" / "zsh" / "completions" / "_mcli"
192
202
  if zsh_completion.exists():
193
203
  completions_found.append(f"✅ Zsh completion: {zsh_completion}")
194
204
  else:
195
205
  completions_found.append("❌ Zsh completion: Not installed")
196
-
206
+
197
207
  # Check fish
198
208
  fish_completion = Path.home() / ".config" / "fish" / "completions" / "mcli.fish"
199
209
  if fish_completion.exists():
200
210
  completions_found.append(f"✅ Fish completion: {fish_completion}")
201
211
  else:
202
212
  completions_found.append("❌ Fish completion: Not installed")
203
-
213
+
204
214
  for status in completions_found:
205
215
  click.echo(status)
206
-
216
+
207
217
  click.echo()
208
218
  click.echo("💡 To install completion for your shell:")
209
219
  click.echo(" mcli completion install")
@@ -212,5 +222,5 @@ def completion_status():
212
222
  click.echo(f" mcli completion {shell_name}")
213
223
 
214
224
 
215
- # Export the CLI group for registration
216
- cli = completion
225
+ # Export the CLI group for registration
226
+ cli = completion