ara-cli 0.1.10.0__tar.gz → 0.1.10.4__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 ara-cli might be problematic. Click here for more details.

Files changed (202) hide show
  1. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/PKG-INFO +2 -1
  2. ara_cli-0.1.10.4/ara_cli/__main__.py +284 -0
  3. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/ara_command_action.py +11 -6
  4. ara_cli-0.1.10.4/ara_cli/ara_subcommands/autofix.py +26 -0
  5. ara_cli-0.1.10.4/ara_cli/ara_subcommands/chat.py +27 -0
  6. ara_cli-0.1.10.4/ara_cli/ara_subcommands/classifier_directory.py +16 -0
  7. ara_cli-0.1.10.4/ara_cli/ara_subcommands/common.py +100 -0
  8. ara_cli-0.1.10.4/ara_cli/ara_subcommands/create.py +75 -0
  9. ara_cli-0.1.10.4/ara_cli/ara_subcommands/delete.py +22 -0
  10. ara_cli-0.1.10.4/ara_cli/ara_subcommands/extract.py +22 -0
  11. ara_cli-0.1.10.4/ara_cli/ara_subcommands/fetch_templates.py +14 -0
  12. ara_cli-0.1.10.4/ara_cli/ara_subcommands/list.py +65 -0
  13. ara_cli-0.1.10.4/ara_cli/ara_subcommands/list_tags.py +25 -0
  14. ara_cli-0.1.10.4/ara_cli/ara_subcommands/load.py +48 -0
  15. ara_cli-0.1.10.4/ara_cli/ara_subcommands/prompt.py +136 -0
  16. ara_cli-0.1.10.4/ara_cli/ara_subcommands/read.py +47 -0
  17. ara_cli-0.1.10.4/ara_cli/ara_subcommands/read_status.py +20 -0
  18. ara_cli-0.1.10.4/ara_cli/ara_subcommands/read_user.py +20 -0
  19. ara_cli-0.1.10.4/ara_cli/ara_subcommands/reconnect.py +27 -0
  20. ara_cli-0.1.10.4/ara_cli/ara_subcommands/rename.py +22 -0
  21. ara_cli-0.1.10.4/ara_cli/ara_subcommands/scan.py +14 -0
  22. ara_cli-0.1.10.4/ara_cli/ara_subcommands/set_status.py +22 -0
  23. ara_cli-0.1.10.4/ara_cli/ara_subcommands/set_user.py +22 -0
  24. ara_cli-0.1.10.4/ara_cli/ara_subcommands/template.py +16 -0
  25. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_autofix.py +44 -6
  26. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_models/artefact_model.py +106 -25
  27. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_models/artefact_templates.py +18 -9
  28. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_models/epic_artefact_model.py +11 -2
  29. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_models/feature_artefact_model.py +31 -1
  30. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_models/userstory_artefact_model.py +15 -3
  31. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_scan.py +2 -2
  32. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/chat.py +1 -19
  33. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/commands/read_command.py +17 -4
  34. ara_cli-0.1.10.4/ara_cli/completers.py +144 -0
  35. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/file_loaders/text_file_loader.py +2 -2
  36. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/prompt_extractor.py +97 -79
  37. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/prompt_handler.py +160 -59
  38. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/tag_extractor.py +38 -18
  39. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/template_loader.py +1 -1
  40. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/version.py +1 -1
  41. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli.egg-info/PKG-INFO +2 -1
  42. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli.egg-info/SOURCES.txt +23 -1
  43. ara_cli-0.1.10.0/docker/base/requirements.txt → ara_cli-0.1.10.4/ara_cli.egg-info/requires.txt +2 -1
  44. ara_cli-0.1.10.0/ara_cli.egg-info/requires.txt → ara_cli-0.1.10.4/docker/base/requirements.txt +1 -0
  45. ara_cli-0.1.10.4/tests/__init__.py +0 -0
  46. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_artefact_scan.py +1 -1
  47. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_prompt_handler.py +12 -4
  48. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_tag_extractor.py +19 -13
  49. ara_cli-0.1.10.0/ara_cli/__main__.py +0 -129
  50. ara_cli-0.1.10.0/ara_cli/ara_command_parser.py +0 -605
  51. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/MANIFEST.in +0 -0
  52. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/README.md +0 -0
  53. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/__init__.py +0 -0
  54. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/ara_config.py +0 -0
  55. {ara_cli-0.1.10.0/ara_cli/artefact_models → ara_cli-0.1.10.4/ara_cli/ara_subcommands}/__init__.py +0 -0
  56. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_creator.py +0 -0
  57. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_deleter.py +0 -0
  58. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_fuzzy_search.py +0 -0
  59. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_link_updater.py +0 -0
  60. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_lister.py +0 -0
  61. {ara_cli-0.1.10.0/ara_cli/commands → ara_cli-0.1.10.4/ara_cli/artefact_models}/__init__.py +0 -0
  62. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_models/artefact_data_retrieval.py +0 -0
  63. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_models/artefact_load.py +0 -0
  64. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_models/artefact_mapping.py +0 -0
  65. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_models/businessgoal_artefact_model.py +0 -0
  66. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_models/capability_artefact_model.py +0 -0
  67. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_models/example_artefact_model.py +0 -0
  68. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_models/issue_artefact_model.py +0 -0
  69. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_models/keyfeature_artefact_model.py +0 -0
  70. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_models/serialize_helper.py +0 -0
  71. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_models/task_artefact_model.py +0 -0
  72. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_models/vision_artefact_model.py +0 -0
  73. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_reader.py +0 -0
  74. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/artefact_renamer.py +0 -0
  75. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/classifier.py +0 -0
  76. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/codefusionretriever.py +0 -0
  77. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/codehierachieretriever.py +0 -0
  78. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/commandline_completer.py +0 -0
  79. {ara_cli-0.1.10.0/ara_cli/file_loaders → ara_cli-0.1.10.4/ara_cli/commands}/__init__.py +0 -0
  80. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/commands/command.py +0 -0
  81. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/commands/extract_command.py +0 -0
  82. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/commands/load_command.py +0 -0
  83. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/commands/load_image_command.py +0 -0
  84. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/directory_navigator.py +0 -0
  85. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/error_handler.py +0 -0
  86. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/file_classifier.py +0 -0
  87. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/file_lister.py +0 -0
  88. {ara_cli-0.1.10.0/tests → ara_cli-0.1.10.4/ara_cli/file_loaders}/__init__.py +0 -0
  89. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/file_loaders/binary_file_loader.py +0 -0
  90. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/file_loaders/document_file_loader.py +0 -0
  91. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/file_loaders/document_reader.py +0 -0
  92. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/file_loaders/document_readers.py +0 -0
  93. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/file_loaders/file_loader.py +0 -0
  94. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/file_loaders/file_loaders.py +0 -0
  95. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/file_loaders/image_processor.py +0 -0
  96. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/file_loaders/markdown_reader.py +0 -0
  97. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/filename_validator.py +0 -0
  98. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/global_file_lister.py +0 -0
  99. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/list_filter.py +0 -0
  100. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/output_suppressor.py +0 -0
  101. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/prompt_chat.py +0 -0
  102. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/prompt_rag.py +0 -0
  103. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/run_file_lister.py +0 -0
  104. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/template_manager.py +0 -0
  105. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/agile.artefacts +0 -0
  106. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/blueprints/complete_pytest_unittest.blueprint.md +0 -0
  107. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/blueprints/empty.blueprint.md +0 -0
  108. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/blueprints/task_todo_list_C4_architecture_analysis.blueprint.md +0 -0
  109. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/blueprints/task_todo_list_implement_feature_BDD_way.blueprint.md +0 -0
  110. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/architecture_C4_analysis.commands.md +0 -0
  111. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/architecture_radon_cc_score.commands.md +0 -0
  112. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/architecture_radon_halstead_v.commands.md +0 -0
  113. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/architecture_radon_maintainability_score.commands.md +0 -0
  114. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/artefact_classification.commands.md +0 -0
  115. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/artefact_extension.commands.md +0 -0
  116. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/artefact_formulation.commands.md +0 -0
  117. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/behave_step_generation.commands.md +0 -0
  118. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/code_generation_complex.commands.md +0 -0
  119. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/code_generation_simple.commands.md +0 -0
  120. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/empty.commands.md +0 -0
  121. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/error_fixing.commands.md +0 -0
  122. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/feature_file_update.commands.md +0 -0
  123. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/feature_formulation.commands.md +0 -0
  124. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/js_code_generation_simple.commands.md +0 -0
  125. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/refactoring.commands.md +0 -0
  126. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/refactoring_analysis.commands.md +0 -0
  127. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/reverse_engineer_feature_file.commands.md +0 -0
  128. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/commands/reverse_engineer_program_flow.commands.md +0 -0
  129. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/classify_task.intention.md +0 -0
  130. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/empty.intention.md +0 -0
  131. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/error_fixing.intention.md +0 -0
  132. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/feature_fix_steps_for_scenario.intention.md +0 -0
  133. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/feature_formulation.intention.md +0 -0
  134. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/feature_reverse_formulation_from_code.intention.md +0 -0
  135. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/feature_scenario_implementation.intention.md +0 -0
  136. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/feature_scenario_implementation_update.intention.md +0 -0
  137. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/feature_scenario_outline_extension.intention.md +0 -0
  138. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/feature_update_formulation.intention.md +0 -0
  139. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/fibonacci_example_implementation.intention.md +0 -0
  140. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/js_implementation_from_task_description.intention.md +0 -0
  141. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/js_steps_implementation.intention.md +0 -0
  142. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/python_cli_implementation_with_test.intention.md +0 -0
  143. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/python_code_understanding.intention.md +0 -0
  144. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/task_implementation.intention.md +0 -0
  145. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/task_prompt_control_by_status.intention.md +0 -0
  146. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/task_stepwise_implementation_by_number.intention.md +0 -0
  147. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/intentions/task_stepwise_implementation_by_status.intention.md +0 -0
  148. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/rules/architecture_analyst.rules.md +0 -0
  149. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/rules/code_analyst.rules.md +0 -0
  150. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/rules/empty.rules.md +0 -0
  151. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/rules/error_analyst.rules.md +0 -0
  152. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/rules/gherkin_expert.rules.md +0 -0
  153. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/rules/js_expert_developer.rules.md +0 -0
  154. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/rules/product_owner.rules.md +0 -0
  155. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/rules/python_behave.rules.md +0 -0
  156. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/prompt-modules/rules/python_developer.rules.md +0 -0
  157. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/specification_breakdown_files/template.concept.exploration.md +0 -0
  158. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/specification_breakdown_files/template.concept.md +0 -0
  159. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/specification_breakdown_files/template.customer.exploration.md +0 -0
  160. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/specification_breakdown_files/template.customer.md +0 -0
  161. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/specification_breakdown_files/template.persona.exploration.md +0 -0
  162. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/specification_breakdown_files/template.persona.md +0 -0
  163. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/specification_breakdown_files/template.step.exploration.md +0 -0
  164. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/specification_breakdown_files/template.step.md +0 -0
  165. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/specification_breakdown_files/template.technology.exploration.md +0 -0
  166. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/specification_breakdown_files/template.technology.md +0 -0
  167. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/template.businessgoal.prompt_log.md +0 -0
  168. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/template.capability.prompt_log.md +0 -0
  169. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/template.epic.prompt_log.md +0 -0
  170. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/template.example.prompt_log.md +0 -0
  171. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/template.feature.prompt_log.md +0 -0
  172. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/template.issue.prompt_log.md +0 -0
  173. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/template.keyfeature.prompt_log.md +0 -0
  174. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/template.steps.prompt_log.md +0 -0
  175. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/template.task.prompt_log.md +0 -0
  176. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/template.userstory.prompt_log.md +0 -0
  177. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/templates/template.vision.prompt_log.md +0 -0
  178. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli/update_config_prompt.py +0 -0
  179. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli.egg-info/dependency_links.txt +0 -0
  180. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli.egg-info/entry_points.txt +0 -0
  181. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/ara_cli.egg-info/top_level.txt +0 -0
  182. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/setup.cfg +0 -0
  183. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/setup.py +0 -0
  184. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_ara_command_action.py +0 -0
  185. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_ara_config.py +0 -0
  186. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_artefact_autofix.py +0 -0
  187. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_artefact_fuzzy_search.py +0 -0
  188. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_artefact_link_updater.py +0 -0
  189. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_artefact_lister.py +0 -0
  190. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_artefact_reader.py +0 -0
  191. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_artefact_renamer.py +0 -0
  192. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_chat.py +0 -0
  193. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_classifier.py +0 -0
  194. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_directory_navigator.py +0 -0
  195. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_file_classifier.py +0 -0
  196. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_file_creator.py +0 -0
  197. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_file_lister.py +0 -0
  198. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_global_file_lister.py +0 -0
  199. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_list_filter.py +0 -0
  200. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_template_loader.py +0 -0
  201. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_template_manager.py +0 -0
  202. {ara_cli-0.1.10.0 → ara_cli-0.1.10.4}/tests/test_update_config_prompt.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ara_cli
3
- Version: 0.1.10.0
3
+ Version: 0.1.10.4
4
4
  Summary: Powerful, open source command-line tool for managing, structuring and automating software development artifacts in line with Business-Driven Development (BDD) and AI-assisted processes
5
5
  Description-Content-Type: text/markdown
6
6
  Requires-Dist: langfuse
@@ -19,6 +19,7 @@ Requires-Dist: pydantic
19
19
  Requires-Dist: pydantic_ai
20
20
  Requires-Dist: python-docx
21
21
  Requires-Dist: pymupdf4llm
22
+ Requires-Dist: typer
22
23
  Dynamic: description
23
24
  Dynamic: description-content-type
24
25
  Dynamic: requires-dist
@@ -0,0 +1,284 @@
1
+ import typer
2
+ import sys
3
+ import os
4
+ from typing import Optional
5
+ from os import getenv
6
+ from ara_cli.error_handler import AraError
7
+ from ara_cli.version import __version__
8
+ from ara_cli import error_handler
9
+ from ara_cli.ara_subcommands.create import register as register_create_cli
10
+ from ara_cli.ara_subcommands.delete import register as register_delete_cli
11
+ from ara_cli.ara_subcommands.rename import register as register_rename_cli
12
+ from ara_cli.ara_subcommands.list import register as register_list_cli
13
+ from ara_cli.ara_subcommands.list_tags import register as register_list_tags_cli
14
+ from ara_cli.ara_subcommands.prompt import register as register_prompt_cli
15
+ from ara_cli.ara_subcommands.chat import register as register_chat_cli
16
+ from ara_cli.ara_subcommands.template import register as register_template_cli
17
+ from ara_cli.ara_subcommands.fetch_templates import register as register_fetch_templates_cli
18
+ from ara_cli.ara_subcommands.read import register as register_read_cli
19
+ from ara_cli.ara_subcommands.reconnect import register as register_reconnect_cli
20
+ from ara_cli.ara_subcommands.read_status import register as register_read_status_cli
21
+ from ara_cli.ara_subcommands.read_user import register as register_read_user_cli
22
+ from ara_cli.ara_subcommands.set_status import register as register_set_status_cli
23
+ from ara_cli.ara_subcommands.set_user import register as register_set_user_cli
24
+ from ara_cli.ara_subcommands.classifier_directory import register as register_classifier_directory_cli
25
+ from ara_cli.ara_subcommands.scan import register as register_scan_cli
26
+ from ara_cli.ara_subcommands.autofix import register as register_autofix_cli
27
+ from ara_cli.ara_subcommands.extract import register as register_extract_cli
28
+ from ara_cli.ara_subcommands.load import register as register_load_cli
29
+
30
+
31
+ def version_callback(value: bool):
32
+ if value:
33
+ typer.echo(f"ara {__version__}")
34
+ raise typer.Exit()
35
+
36
+
37
+ def is_debug_mode_enabled():
38
+ """Check if debug mode is enabled via environment variable."""
39
+ return getenv('ARA_DEBUG', '').lower() in ('1', 'true', 'yes')
40
+
41
+
42
+ def configure_debug_mode(debug: bool, env_debug_mode: bool):
43
+ """Configure debug mode based on arguments and environment."""
44
+ if debug or env_debug_mode:
45
+ error_handler.debug_mode = True
46
+
47
+
48
+ def find_ara_directory_root():
49
+ """Find the root ara directory by traversing up the directory tree."""
50
+ current_dir = os.getcwd()
51
+
52
+ # Check if we're already inside an ara directory structure
53
+ path_parts = current_dir.split(os.sep)
54
+
55
+ # Look for 'ara' in the path parts
56
+ if 'ara' in path_parts:
57
+ ara_index = path_parts.index('ara')
58
+ # Reconstruct path up to and including 'ara'
59
+ ara_root_parts = path_parts[:ara_index + 1]
60
+ potential_ara_root = os.sep.join(ara_root_parts)
61
+ if os.path.exists(potential_ara_root) and os.path.isdir(potential_ara_root):
62
+ return potential_ara_root
63
+
64
+ # If not inside ara directory, check current directory and parents
65
+ check_dir = current_dir
66
+ while check_dir != os.path.dirname(check_dir): # Stop at filesystem root
67
+ ara_path = os.path.join(check_dir, 'ara')
68
+ if os.path.exists(ara_path) and os.path.isdir(ara_path):
69
+ return ara_path
70
+ check_dir = os.path.dirname(check_dir)
71
+
72
+ return None
73
+
74
+
75
+ def check_ara_directory_exists():
76
+ """Check if ara directory exists or if we're inside ara directory tree."""
77
+ return find_ara_directory_root() is not None
78
+
79
+
80
+ def prompt_create_ara_directory():
81
+ """Prompt user to create ara directory and create it if confirmed."""
82
+ # Print the prompt message
83
+ print("No 'ara' directory found. Create one in the current directory? (Y/n)", end=" ", flush=True)
84
+
85
+ # Read user input
86
+ try:
87
+ response = input().strip()
88
+ except (EOFError, KeyboardInterrupt):
89
+ typer.echo("\nOperation cancelled.")
90
+ raise typer.Exit(1)
91
+
92
+ if response.lower() in ('y', 'yes', ''):
93
+ current_dir = os.getcwd()
94
+ ara_path = os.path.join(current_dir, 'ara')
95
+
96
+ # Create ara directory structure
97
+ subdirectories = [
98
+ 'businessgoals',
99
+ 'capabilities',
100
+ 'epics',
101
+ 'examples',
102
+ 'features',
103
+ 'keyfeatures',
104
+ 'tasks',
105
+ 'userstories',
106
+ 'vision'
107
+ ]
108
+
109
+ try:
110
+ # Create main ara directory
111
+ os.makedirs(ara_path, exist_ok=True)
112
+
113
+ # Create subdirectories for artefact types
114
+ for subdir in subdirectories:
115
+ os.makedirs(os.path.join(ara_path, subdir), exist_ok=True)
116
+
117
+ # Create .araconfig directory
118
+ araconfig_path = os.path.join(ara_path, '.araconfig')
119
+ os.makedirs(araconfig_path, exist_ok=True)
120
+
121
+ # Create default ara_config.json using ConfigManager
122
+ from ara_cli.ara_config import ConfigManager, ARAconfig
123
+ config_file_path = os.path.join(araconfig_path, 'ara_config.json')
124
+
125
+ # Reset ConfigManager to ensure clean state
126
+ ConfigManager.reset()
127
+
128
+ # Create default config and save it
129
+ default_config = ARAconfig()
130
+ from ara_cli.ara_config import save_data
131
+ save_data(config_file_path, default_config)
132
+
133
+ typer.echo(f"Created ara directory structure at {ara_path}")
134
+ typer.echo(f"Created default configuration at {config_file_path}")
135
+ return True
136
+
137
+ except OSError as e:
138
+ typer.echo(f"Error creating ara directory: {e}", err=True)
139
+ raise typer.Exit(1)
140
+ except Exception as e:
141
+ typer.echo(f"Error creating configuration file: {e}", err=True)
142
+ raise typer.Exit(1)
143
+ else:
144
+ typer.echo("Ara directory creation cancelled.")
145
+ raise typer.Exit(0)
146
+
147
+
148
+ def requires_ara_directory():
149
+ """Check if ara directory exists and prompt to create if not."""
150
+ if not check_ara_directory_exists():
151
+ return prompt_create_ara_directory()
152
+ return True
153
+
154
+
155
+ def create_app():
156
+ app = typer.Typer(
157
+ help="""The ara cli terminal tool is a management tool for classified ara artefacts.
158
+
159
+ Valid classified artefacts are: businessgoal, vision, capability, keyfeature, feature, epic, userstory, example, feature, task.
160
+
161
+ The default ara directory structure of classified artefact of the ara cli tool is:
162
+ .
163
+ └── ara
164
+ ├── businessgoals
165
+ ├── capabilities
166
+ ├── epics
167
+ ├── examples
168
+ ├── features
169
+ ├── keyfeatures
170
+ ├── tasks
171
+ ├── userstories
172
+ └── vision
173
+
174
+ ara artefact handling examples:
175
+ > create a new artefact for e.g. a feature: ara create feature {feature_name}
176
+ > create a new artefact for e.g. a feature that contributes to an userstory: ara create feature {feature_name} contributes-to userstory {story_name}
177
+ > read an artefact and return the content as terminal output, for eg. of a task: ara read task {task_name}
178
+ > read an artefact and its full chain of contributions to its parents and return
179
+ the content as terminal output, for eg. of a task: ara read task {task_name} --branch
180
+ > delete an artefact for e.g. feature: ara delete feature {feature_name}
181
+ > rename artefact and artefact data directory for e.g. a feature: ara rename feature {initial_feature_name} {new_feature_name}
182
+ > create additional templates for a specific aspect (valid aspects are: customer,
183
+ persona, concept, technology) related to an existing artefact like a feature: ara create feature {feature_name} aspect {aspect_name}
184
+ > list artefact data with .md file extension ara list --data {classifier} {artefact_name} --include-extension .md
185
+ > list artefact data with .md and .json file extensions ara list --data {classifier} {artefact_name} --include-extension .md .json
186
+ > list everything but userstories ara list --exclude-extension .userstory
187
+ > list all existing features: ara list --include-extension .feature
188
+ > list all child artefacts contributing value to a parent artefact: ara list --include-content "Contributes to {name_of_parent_artefact} {ara classifier_of_parent_artefact}"
189
+ > list tasks which contain 'example content' ara list --include-extension .task --include-content "example content"
190
+ > list children artefacts of a userstory ara list --children userstory {name_of_userstory}
191
+ > list parent artefacts of a userstory ara list --branch userstory {name_of_userstory}
192
+ > list parent businessgoal artefact of a userstory ara list --branch userstory {name_of_userstory} --include-extension .businessgoal
193
+ > print any artefact template for e.g. a feature file template in the terminal: ara template feature
194
+
195
+ ara prompt templates examples:
196
+ > get and copy all prompt templates (blueprints, rules, intentions, commands
197
+ in the ara/.araconfig/global-prompt-modules directory: ara fetch-templates
198
+
199
+ ara chat examples:
200
+ > chat with ara and save the default chat.md file in the working directory: ara chat
201
+ > chat with ara and save the default task_chat.md file in the task.data directory: ara prompt chat task {task_name}
202
+
203
+ > initialize a macro prompt for a task: ara prompt init task {task_name}
204
+ > load selected templates in config_prompt_templates.md for the task {task_name}: ara prompt load task {task_name}
205
+ > create and send configured prompt of the task {task_name} to the configured LLM: ara prompt send task {task_name}
206
+ > extract the selected LLM response in task.exploration.md and save to disk: ara prompt extract task {task_name}
207
+ """,
208
+ no_args_is_help=True,
209
+ add_completion=True,
210
+ rich_markup_mode="rich"
211
+ )
212
+
213
+ @app.callback(invoke_without_command=True)
214
+ def main(
215
+ ctx: typer.Context,
216
+ version: Optional[bool] = typer.Option(
217
+ None, "--version", "-v",
218
+ callback=version_callback,
219
+ is_eager=True,
220
+ help="Show version and exit"
221
+ ),
222
+ debug: bool = typer.Option(
223
+ False, "--debug",
224
+ help="Enable debug mode for detailed error output"
225
+ )
226
+ ):
227
+ """The ara cli terminal tool is a management tool for classified ara artefacts."""
228
+ debug_mode = is_debug_mode_enabled()
229
+ configure_debug_mode(debug, debug_mode)
230
+
231
+ # Only show help if no subcommand is invoked
232
+ if ctx.invoked_subcommand is None:
233
+ ctx.get_help()
234
+ ctx.exit()
235
+
236
+ # Check for ara directory before executing any command
237
+ # Skip check for commands that don't require ara directory
238
+ commands_requiring_ara = {
239
+ 'create', 'delete', 'rename', 'list', 'list-tags', 'prompt',
240
+ 'read', 'reconnect', 'read-status', 'read-user', 'set-status',
241
+ 'set-user', 'classifier-directory', 'scan', 'autofix'
242
+ }
243
+
244
+ if ctx.invoked_subcommand in commands_requiring_ara:
245
+ requires_ara_directory()
246
+
247
+ # Register all commands
248
+ register_create_cli(app)
249
+ register_delete_cli(app)
250
+ register_rename_cli(app)
251
+ register_list_cli(app)
252
+ register_list_tags_cli(app)
253
+ register_prompt_cli(app)
254
+ register_chat_cli(app)
255
+ register_template_cli(app)
256
+ register_fetch_templates_cli(app)
257
+ register_read_cli(app)
258
+ register_reconnect_cli(app)
259
+ register_read_status_cli(app)
260
+ register_read_user_cli(app)
261
+ register_set_status_cli(app)
262
+ register_set_user_cli(app)
263
+ register_classifier_directory_cli(app)
264
+ register_scan_cli(app)
265
+ register_autofix_cli(app)
266
+ register_extract_cli(app)
267
+ register_load_cli(app)
268
+
269
+ return app
270
+
271
+
272
+ def cli():
273
+ app = create_app()
274
+ try:
275
+ app()
276
+ except KeyboardInterrupt:
277
+ typer.echo("\n[INFO] Operation cancelled by user", err=True)
278
+ raise typer.Exit(130) # Standard exit code for Ctrl+C
279
+ except Exception as e:
280
+ error_handler.handle_error(e, context="cli")
281
+
282
+
283
+ if __name__ == "__main__":
284
+ cli()
@@ -130,9 +130,6 @@ def list_action(args):
130
130
  )
131
131
  return
132
132
 
133
- if (args.tags):
134
- artefact_lister.list_files(tags=args.tags, list_filter=list_filter)
135
- return
136
133
  artefact_lister.list_files(list_filter=list_filter)
137
134
 
138
135
 
@@ -147,17 +144,25 @@ def list_tags_action(args):
147
144
  )
148
145
 
149
146
  tag_extractor = TagExtractor()
150
- tags = tag_extractor.extract_tags(
147
+ tag_groups = tag_extractor.extract_tags(
151
148
  filtered_extra_column=getattr(args, "filtered_extra_column", False),
152
149
  list_filter=list_filter
153
150
  )
154
151
 
155
152
  if args.json:
156
- output = json.dumps({"tags": tags})
153
+ all_tags = []
154
+ for group in tag_groups.values():
155
+ all_tags.extend(group)
156
+ output = json.dumps({"tags": sorted(all_tags)})
157
157
  print(output)
158
158
  return
159
159
 
160
- output = "\n".join(f"- {tag}" for tag in tags)
160
+ output_lines = []
161
+ for key in sorted(tag_groups.keys()):
162
+ line = " ".join(sorted(list(tag_groups[key])))
163
+ output_lines.append(line)
164
+
165
+ output = "\n".join(f"- {tag}" for tag in output_lines)
161
166
  print(output)
162
167
 
163
168
 
@@ -0,0 +1,26 @@
1
+ import typer
2
+ from .common import MockArgs
3
+ from ara_cli.ara_command_action import autofix_action
4
+
5
+
6
+ def autofix_main(
7
+ single_pass: bool = typer.Option(False, "--single-pass", help="Run the autofix once for every scanned file"),
8
+ deterministic: bool = typer.Option(False, "-d", "--deterministic", help="Run only deterministic fixes e.g Title-FileName Mismatch fix"),
9
+ non_deterministic: bool = typer.Option(False, "-nd", "--non-deterministic", help="Run only non-deterministic fixes")
10
+ ):
11
+ """Fix ARA tree with llm models for scanned artefacts with ara scan command."""
12
+ if deterministic and non_deterministic:
13
+ typer.echo("Error: --deterministic and --non-deterministic are mutually exclusive", err=True)
14
+ raise typer.Exit(1)
15
+
16
+ args = MockArgs(
17
+ single_pass=single_pass,
18
+ deterministic=deterministic,
19
+ non_deterministic=non_deterministic
20
+ )
21
+ autofix_action(args)
22
+
23
+
24
+ def register(parent: typer.Typer):
25
+ help_text = "Fix ARA tree with llm models for scanned artefacts"
26
+ parent.command(name="autofix", help=help_text)(autofix_main)
@@ -0,0 +1,27 @@
1
+ import typer
2
+ from typing import Optional, List
3
+ from .common import MockArgs, ChatNameArgument
4
+ from ara_cli.ara_command_action import chat_action
5
+
6
+
7
+ def chat_main(
8
+ chat_name: Optional[str] = ChatNameArgument("Optional name for a specific chat. Pass the .md file to continue an existing chat", None),
9
+ reset: Optional[bool] = typer.Option(None, "-r", "--reset/--no-reset", help="Reset the chat file if it exists"),
10
+ output_mode: bool = typer.Option(False, "--out", help="Output the contents of the chat file instead of entering interactive chat mode"),
11
+ append: Optional[List[str]] = typer.Option(None, "--append", help="Append strings to the chat file"),
12
+ restricted: Optional[bool] = typer.Option(None, "--restricted/--no-restricted", help="Start with a limited set of commands")
13
+ ):
14
+ """Command line chatbot. Chat control with SEND/s | RERUN/r | QUIT/q"""
15
+ args = MockArgs(
16
+ chat_name=chat_name,
17
+ reset=reset,
18
+ output_mode=output_mode,
19
+ append=append,
20
+ restricted=restricted
21
+ )
22
+ chat_action(args)
23
+
24
+
25
+ def register(parent: typer.Typer):
26
+ help_text = "Command line chatbot. Chat control with SEND/s | RERUN/r | QUIT/q"
27
+ parent.command(name="chat", help=help_text)(chat_main)
@@ -0,0 +1,16 @@
1
+ import typer
2
+ from .common import ClassifierEnum, MockArgs, ClassifierArgument
3
+ from ara_cli.ara_command_action import classifier_directory_action
4
+
5
+
6
+ def classifier_directory_main(
7
+ classifier: ClassifierEnum = ClassifierArgument("Classifier of the artefact type")
8
+ ):
9
+ """Print the ara subdirectory for an artefact classifier."""
10
+ args = MockArgs(classifier=classifier.value)
11
+ classifier_directory_action(args)
12
+
13
+
14
+ def register(parent: typer.Typer):
15
+ help_text = "Print the ara subdirectory for an artefact classifier"
16
+ parent.command(name="classifier-directory", help=help_text)(classifier_directory_main)
@@ -0,0 +1,100 @@
1
+ from typing import Optional
2
+ from enum import Enum
3
+ import typer
4
+ from ara_cli.classifier import Classifier
5
+ from ara_cli.template_manager import SpecificationBreakdownAspects
6
+ from ara_cli.completers import DynamicCompleters
7
+
8
+
9
+ # Get classifiers and aspects
10
+ classifiers = Classifier.ordered_classifiers()
11
+ aspects = SpecificationBreakdownAspects.VALID_ASPECTS
12
+
13
+
14
+ # Create enums for better type safety
15
+ ClassifierEnum = Enum('ClassifierEnum', {c: c for c in classifiers})
16
+ AspectEnum = Enum('AspectEnum', {a: a for a in aspects})
17
+ TemplateTypeEnum = Enum('TemplateTypeEnum', {
18
+ 'rules': 'rules',
19
+ 'intention': 'intention',
20
+ 'commands': 'commands',
21
+ 'blueprint': 'blueprint'
22
+ })
23
+
24
+
25
+ # Create typed arguments and options with autocompletion
26
+ def ClassifierArgument(help_text: str, default=...):
27
+ """Create a classifier argument with autocompletion."""
28
+ return typer.Argument(
29
+ default,
30
+ help=help_text,
31
+ autocompletion=DynamicCompleters.create_classifier_completer()
32
+ )
33
+
34
+
35
+ def ClassifierOption(help_text: str, *names):
36
+ """Create a classifier option with autocompletion."""
37
+ return typer.Option(
38
+ None,
39
+ *names,
40
+ help=help_text,
41
+ autocompletion=DynamicCompleters.create_classifier_completer()
42
+ )
43
+
44
+
45
+ def ArtefactNameArgument(help_text: str, default=...):
46
+ """Create an artefact name argument with autocompletion."""
47
+ return typer.Argument(
48
+ default,
49
+ help=help_text,
50
+ autocompletion=DynamicCompleters.create_artefact_name_completer()
51
+ )
52
+
53
+
54
+
55
+ def ParentNameArgument(help_text: str):
56
+ """Create a parent name argument with autocompletion."""
57
+ return typer.Argument(
58
+ help=help_text,
59
+ autocompletion=DynamicCompleters.create_parent_name_completer()
60
+ )
61
+
62
+
63
+ def AspectArgument(help_text: str):
64
+ """Create an aspect argument with autocompletion."""
65
+ return typer.Argument(
66
+ help=help_text,
67
+ autocompletion=DynamicCompleters.create_aspect_completer()
68
+ )
69
+
70
+
71
+ def StatusArgument(help_text: str):
72
+ """Create a status argument with autocompletion."""
73
+ return typer.Argument(
74
+ help=help_text,
75
+ autocompletion=DynamicCompleters.create_status_completer()
76
+ )
77
+
78
+
79
+ def TemplateTypeArgument(help_text: str):
80
+ """Create a template type argument with autocompletion."""
81
+ return typer.Argument(
82
+ help=help_text,
83
+ autocompletion=DynamicCompleters.create_template_type_completer()
84
+ )
85
+
86
+
87
+ def ChatNameArgument(help_text: str, default=None):
88
+ """Create a chat name argument with autocompletion."""
89
+ return typer.Argument(
90
+ default,
91
+ help=help_text,
92
+ autocompletion=DynamicCompleters.create_chat_file_completer()
93
+ )
94
+
95
+
96
+ # Mock args class to maintain compatibility with existing action functions
97
+ class MockArgs:
98
+ def __init__(self, **kwargs):
99
+ for key, value in kwargs.items():
100
+ setattr(self, key, value)
@@ -0,0 +1,75 @@
1
+ import typer
2
+ from typing import Optional
3
+ from .common import (
4
+ ClassifierEnum, AspectEnum, MockArgs,
5
+ ClassifierArgument, ArtefactNameArgument, ParentNameArgument, AspectArgument
6
+ )
7
+ from ara_cli.ara_command_action import create_action
8
+
9
+
10
+ def create_contributes_to(
11
+ ctx: typer.Context,
12
+ parent_classifier: ClassifierEnum = ClassifierArgument("Classifier of the parent"),
13
+ parent_name: str = ParentNameArgument("Name of a parent artefact"),
14
+ rule: Optional[str] = typer.Option(None, "-r", "--rule", help="Rule for contribution")
15
+ ):
16
+ """Create an artefact that contributes to a parent artefact."""
17
+ # Get classifier and parameter from parent context
18
+ parent_params = ctx.parent.params
19
+ classifier = parent_params['classifier']
20
+ parameter = parent_params['parameter']
21
+
22
+ args = MockArgs(
23
+ classifier=classifier,
24
+ parameter=parameter,
25
+ option="contributes-to",
26
+ parent_classifier=parent_classifier.value,
27
+ parent_name=parent_name,
28
+ rule=rule
29
+ )
30
+ create_action(args)
31
+
32
+
33
+ def create_aspect(
34
+ ctx: typer.Context,
35
+ aspect: AspectEnum = AspectArgument("Adds additional specification breakdown aspects")
36
+ ):
37
+ """Create an artefact with additional specification breakdown aspects."""
38
+ # Get classifier and parameter from parent context
39
+ parent_params = ctx.parent.params
40
+ classifier = parent_params['classifier']
41
+ parameter = parent_params['parameter']
42
+
43
+ args = MockArgs(
44
+ classifier=classifier,
45
+ parameter=parameter,
46
+ option="aspect",
47
+ aspect=aspect.value
48
+ )
49
+ create_action(args)
50
+
51
+
52
+ def create_main(
53
+ ctx: typer.Context,
54
+ classifier: ClassifierEnum = ClassifierArgument("Classifier that also serves as file extension"),
55
+ parameter: str = ArtefactNameArgument("Artefact name that serves as filename")
56
+ ):
57
+ """Create a classified artefact with data directory."""
58
+ if ctx.invoked_subcommand is None:
59
+ args = MockArgs(
60
+ classifier=classifier.value,
61
+ parameter=parameter,
62
+ option=None
63
+ )
64
+ create_action(args)
65
+
66
+
67
+ def register(parent: typer.Typer):
68
+ create_app = typer.Typer(
69
+ help="Create a classified artefact with data directory",
70
+ add_completion=False # Disable completion on subcommand
71
+ )
72
+ create_app.command("contributes-to")(create_contributes_to)
73
+ create_app.command("aspect")(create_aspect)
74
+ create_app.callback(invoke_without_command=True)(create_main)
75
+ parent.add_typer(create_app, name="create")
@@ -0,0 +1,22 @@
1
+ import typer
2
+ from .common import ClassifierEnum, MockArgs, ClassifierArgument, ArtefactNameArgument
3
+ from ara_cli.ara_command_action import delete_action
4
+
5
+
6
+ def delete_main(
7
+ classifier: ClassifierEnum = ClassifierArgument("Classifier of the artefact to be deleted"),
8
+ parameter: str = ArtefactNameArgument("Filename of artefact"),
9
+ force: bool = typer.Option(False, "-f", "--force", help="ignore nonexistent files and arguments, never prompt")
10
+ ):
11
+ """Delete an artefact file including its data directory."""
12
+ args = MockArgs(
13
+ classifier=classifier.value,
14
+ parameter=parameter,
15
+ force=force
16
+ )
17
+ delete_action(args)
18
+
19
+
20
+ def register(parent: typer.Typer):
21
+ help_text = "Delete an artefact file including its data directory"
22
+ parent.command(name="delete", help=help_text)(delete_main)
@@ -0,0 +1,22 @@
1
+ import typer
2
+ from .common import MockArgs
3
+ from ara_cli.ara_command_action import extract_action
4
+
5
+
6
+ def extract_main(
7
+ filename: str = typer.Argument(help="Input file to extract from"),
8
+ force: bool = typer.Option(False, "-f", "--force", help="Answer queries with yes when extracting"),
9
+ write: bool = typer.Option(False, "-w", "--write", help="Overwrite existing files without using LLM for merging")
10
+ ):
11
+ """Extract blocks of marked content from a given file."""
12
+ args = MockArgs(
13
+ filename=filename,
14
+ force=force,
15
+ write=write
16
+ )
17
+ extract_action(args)
18
+
19
+
20
+ def register(parent: typer.Typer):
21
+ help_text = "Extract blocks of marked content from a given file"
22
+ parent.command(name="extract", help=help_text)(extract_main)
@@ -0,0 +1,14 @@
1
+ import typer
2
+ from .common import MockArgs
3
+ from ara_cli.ara_command_action import fetch_templates_action
4
+
5
+
6
+ def fetch_templates_main():
7
+ """Fetches templates and stores them in .araconfig."""
8
+ args = MockArgs()
9
+ fetch_templates_action(args)
10
+
11
+
12
+ def register(parent: typer.Typer):
13
+ help_text = "Fetches templates and stores them in .araconfig"
14
+ parent.command(name="fetch-templates", help=help_text)(fetch_templates_main)