ara-cli 0.1.10.5__py3-none-any.whl → 0.1.14.0__py3-none-any.whl
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.
- ara_cli/__init__.py +51 -6
- ara_cli/__main__.py +87 -75
- ara_cli/ara_command_action.py +189 -101
- ara_cli/ara_config.py +187 -128
- ara_cli/ara_subcommands/common.py +2 -2
- ara_cli/ara_subcommands/config.py +221 -0
- ara_cli/ara_subcommands/convert.py +107 -0
- ara_cli/ara_subcommands/fetch.py +41 -0
- ara_cli/ara_subcommands/fetch_agents.py +22 -0
- ara_cli/ara_subcommands/fetch_scripts.py +19 -0
- ara_cli/ara_subcommands/fetch_templates.py +15 -10
- ara_cli/ara_subcommands/list.py +97 -23
- ara_cli/ara_subcommands/prompt.py +266 -106
- ara_cli/artefact_autofix.py +117 -64
- ara_cli/artefact_converter.py +355 -0
- ara_cli/artefact_creator.py +41 -17
- ara_cli/artefact_lister.py +3 -3
- ara_cli/artefact_models/artefact_model.py +1 -1
- ara_cli/artefact_models/artefact_templates.py +0 -9
- ara_cli/artefact_models/feature_artefact_model.py +8 -8
- ara_cli/artefact_reader.py +62 -43
- ara_cli/artefact_scan.py +39 -17
- ara_cli/chat.py +300 -71
- ara_cli/chat_agent/__init__.py +0 -0
- ara_cli/chat_agent/agent_process_manager.py +155 -0
- ara_cli/chat_script_runner/__init__.py +0 -0
- ara_cli/chat_script_runner/script_completer.py +23 -0
- ara_cli/chat_script_runner/script_finder.py +41 -0
- ara_cli/chat_script_runner/script_lister.py +36 -0
- ara_cli/chat_script_runner/script_runner.py +36 -0
- ara_cli/chat_web_search/__init__.py +0 -0
- ara_cli/chat_web_search/web_search.py +263 -0
- ara_cli/children_contribution_updater.py +737 -0
- ara_cli/classifier.py +34 -0
- ara_cli/commands/agent_run_command.py +98 -0
- ara_cli/commands/fetch_agents_command.py +106 -0
- ara_cli/commands/fetch_scripts_command.py +43 -0
- ara_cli/commands/fetch_templates_command.py +39 -0
- ara_cli/commands/fetch_templates_commands.py +39 -0
- ara_cli/commands/list_agents_command.py +39 -0
- ara_cli/commands/load_command.py +4 -3
- ara_cli/commands/load_image_command.py +1 -1
- ara_cli/commands/read_command.py +23 -27
- ara_cli/completers.py +95 -35
- ara_cli/constants.py +2 -0
- ara_cli/directory_navigator.py +37 -4
- ara_cli/error_handler.py +26 -11
- ara_cli/file_loaders/document_reader.py +0 -178
- ara_cli/file_loaders/factories/__init__.py +0 -0
- ara_cli/file_loaders/factories/document_reader_factory.py +32 -0
- ara_cli/file_loaders/factories/file_loader_factory.py +27 -0
- ara_cli/file_loaders/file_loader.py +1 -30
- ara_cli/file_loaders/loaders/__init__.py +0 -0
- ara_cli/file_loaders/{document_file_loader.py → loaders/document_file_loader.py} +1 -1
- ara_cli/file_loaders/loaders/text_file_loader.py +47 -0
- ara_cli/file_loaders/readers/__init__.py +0 -0
- ara_cli/file_loaders/readers/docx_reader.py +49 -0
- ara_cli/file_loaders/readers/excel_reader.py +27 -0
- ara_cli/file_loaders/{markdown_reader.py → readers/markdown_reader.py} +1 -1
- ara_cli/file_loaders/readers/odt_reader.py +59 -0
- ara_cli/file_loaders/readers/pdf_reader.py +54 -0
- ara_cli/file_loaders/readers/pptx_reader.py +104 -0
- ara_cli/file_loaders/tools/__init__.py +0 -0
- ara_cli/llm_utils.py +58 -0
- ara_cli/output_suppressor.py +53 -0
- ara_cli/prompt_chat.py +20 -4
- ara_cli/prompt_extractor.py +47 -32
- ara_cli/prompt_handler.py +123 -17
- ara_cli/tag_extractor.py +8 -7
- ara_cli/template_loader.py +2 -1
- ara_cli/template_manager.py +52 -21
- ara_cli/templates/global-scripts/hello_global.py +1 -0
- ara_cli/templates/prompt-modules/commands/add_scenarios_for_new_behaviour.feature_creation_agent.commands.md +1 -0
- ara_cli/templates/prompt-modules/commands/align_feature_with_implementation_changes.interview_agent.commands.md +1 -0
- ara_cli/templates/prompt-modules/commands/analyze_codebase_and_plan_tasks.interview_agent.commands.md +1 -0
- ara_cli/templates/prompt-modules/commands/choose_best_parent_artefact.interview_agent.commands.md +1 -0
- ara_cli/templates/prompt-modules/commands/create_tasks_from_artefact_content.interview_agent.commands.md +1 -0
- ara_cli/templates/prompt-modules/commands/create_tests_for_uncovered_modules.test_generation_agent.commands.md +1 -0
- ara_cli/templates/prompt-modules/commands/derive_features_from_video_description.feature_creation_agent.commands.md +1 -0
- ara_cli/templates/prompt-modules/commands/describe_agent_capabilities.agent.commands.md +1 -0
- ara_cli/templates/prompt-modules/commands/empty.commands.md +2 -12
- ara_cli/templates/prompt-modules/commands/execute_scoped_todos_in_task.interview_agent.commands.md +1 -0
- ara_cli/templates/prompt-modules/commands/explain_single_file_purpose.interview_agent.commands.md +1 -0
- ara_cli/templates/prompt-modules/commands/extract_file_information_bullets.interview_agent.commands.md +1 -0
- ara_cli/templates/prompt-modules/commands/extract_general.commands.md +12 -0
- ara_cli/templates/prompt-modules/commands/extract_markdown.commands.md +11 -0
- ara_cli/templates/prompt-modules/commands/extract_python.commands.md +13 -0
- ara_cli/templates/prompt-modules/commands/feature_add_or_modifiy_specified_behavior.commands.md +36 -0
- ara_cli/templates/prompt-modules/commands/feature_generate_initial_specified_bevahior.commands.md +53 -0
- ara_cli/templates/prompt-modules/commands/fix_failing_behave_step_definitions.interview_agent.commands.md +1 -0
- ara_cli/templates/prompt-modules/commands/fix_failing_pytest_tests.interview_agent.commands.md +1 -0
- ara_cli/templates/prompt-modules/commands/general_instruction_policy.commands.md +47 -0
- ara_cli/templates/prompt-modules/commands/generate_and_fix_pytest_tests.test_generation_agent.commands.md +1 -0
- ara_cli/templates/prompt-modules/commands/prompt_template_tech_stack_transformer.commands.md +95 -0
- ara_cli/templates/prompt-modules/commands/python_bug_fixing_code.commands.md +34 -0
- ara_cli/templates/prompt-modules/commands/python_generate_code.commands.md +27 -0
- ara_cli/templates/prompt-modules/commands/python_refactoring_code.commands.md +39 -0
- ara_cli/templates/prompt-modules/commands/python_step_definitions_generation_and_fixing.commands.md +40 -0
- ara_cli/templates/prompt-modules/commands/python_unittest_generation_and_fixing.commands.md +48 -0
- ara_cli/templates/prompt-modules/commands/suggest_next_story_child_tasks.interview_agent.commands.md +1 -0
- ara_cli/templates/prompt-modules/commands/summarize_or_transcribe_media.interview_agent.commands.md +1 -0
- ara_cli/templates/prompt-modules/commands/update_feature_to_match_implementation.feature_creation_agent.commands.md +1 -0
- ara_cli/templates/prompt-modules/commands/update_user_story_with_requirements.interview_agent.commands.md +1 -0
- ara_cli/version.py +1 -1
- {ara_cli-0.1.10.5.dist-info → ara_cli-0.1.14.0.dist-info}/METADATA +49 -11
- ara_cli-0.1.14.0.dist-info/RECORD +253 -0
- {ara_cli-0.1.10.5.dist-info → ara_cli-0.1.14.0.dist-info}/WHEEL +1 -1
- tests/test_ara_command_action.py +31 -19
- tests/test_ara_config.py +177 -90
- tests/test_artefact_autofix.py +170 -97
- tests/test_artefact_autofix_integration.py +495 -0
- tests/test_artefact_converter.py +312 -0
- tests/test_artefact_extraction.py +564 -0
- tests/test_artefact_lister.py +11 -8
- tests/test_chat.py +166 -130
- tests/test_chat_givens_images.py +603 -0
- tests/test_chat_script_runner.py +454 -0
- tests/test_children_contribution_updater.py +98 -0
- tests/test_document_loader_office.py +267 -0
- tests/test_llm_utils.py +164 -0
- tests/test_prompt_chat.py +343 -0
- tests/test_prompt_extractor.py +683 -0
- tests/test_prompt_handler.py +416 -214
- tests/test_setup_default_chat_prompt_mode.py +198 -0
- tests/test_tag_extractor.py +95 -49
- tests/test_web_search.py +467 -0
- ara_cli/file_loaders/document_readers.py +0 -233
- ara_cli/file_loaders/file_loaders.py +0 -123
- ara_cli/file_loaders/text_file_loader.py +0 -187
- ara_cli/templates/prompt-modules/blueprints/complete_pytest_unittest.blueprint.md +0 -27
- ara_cli/templates/prompt-modules/blueprints/pytest_unittest_prompt.blueprint.md +0 -32
- ara_cli/templates/prompt-modules/blueprints/task_todo_list_implement_feature_BDD_way.blueprint.md +0 -30
- ara_cli/templates/prompt-modules/commands/artefact_classification.commands.md +0 -9
- ara_cli/templates/prompt-modules/commands/artefact_extension.commands.md +0 -17
- ara_cli/templates/prompt-modules/commands/artefact_formulation.commands.md +0 -14
- ara_cli/templates/prompt-modules/commands/behave_step_generation.commands.md +0 -102
- ara_cli/templates/prompt-modules/commands/code_generation_complex.commands.md +0 -20
- ara_cli/templates/prompt-modules/commands/code_generation_simple.commands.md +0 -13
- ara_cli/templates/prompt-modules/commands/error_fixing.commands.md +0 -20
- ara_cli/templates/prompt-modules/commands/feature_file_update.commands.md +0 -18
- ara_cli/templates/prompt-modules/commands/feature_formulation.commands.md +0 -43
- ara_cli/templates/prompt-modules/commands/js_code_generation_simple.commands.md +0 -13
- ara_cli/templates/prompt-modules/commands/refactoring.commands.md +0 -15
- ara_cli/templates/prompt-modules/commands/refactoring_analysis.commands.md +0 -9
- ara_cli/templates/prompt-modules/commands/reverse_engineer_feature_file.commands.md +0 -15
- ara_cli/templates/prompt-modules/commands/reverse_engineer_program_flow.commands.md +0 -19
- ara_cli-0.1.10.5.dist-info/RECORD +0 -194
- /ara_cli/file_loaders/{binary_file_loader.py → loaders/binary_file_loader.py} +0 -0
- /ara_cli/file_loaders/{image_processor.py → tools/image_processor.py} +0 -0
- {ara_cli-0.1.10.5.dist-info → ara_cli-0.1.14.0.dist-info}/entry_points.txt +0 -0
- {ara_cli-0.1.10.5.dist-info → ara_cli-0.1.14.0.dist-info}/top_level.txt +0 -0
ara_cli/__init__.py
CHANGED
|
@@ -1,20 +1,65 @@
|
|
|
1
1
|
import warnings
|
|
2
2
|
from .error_handler import ErrorHandler
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
whitelisted_commands = [
|
|
5
|
+
"RERUN",
|
|
6
|
+
"SEND",
|
|
7
|
+
"EXTRACT",
|
|
8
|
+
"LOAD_IMAGE",
|
|
9
|
+
"CHOOSE_MODEL",
|
|
10
|
+
"CHOOSE_EXTRACTION_MODEL",
|
|
11
|
+
"CURRENT_MODEL",
|
|
12
|
+
"CURRENT_EXTRACTION_MODEL",
|
|
13
|
+
"LIST_MODELS",
|
|
14
|
+
]
|
|
7
15
|
|
|
8
16
|
error_handler = ErrorHandler()
|
|
9
17
|
|
|
10
18
|
|
|
11
19
|
# ANSI escape codes for coloring
|
|
12
|
-
YELLOW =
|
|
13
|
-
RESET =
|
|
20
|
+
YELLOW = "\033[93m"
|
|
21
|
+
RESET = "\033[0m"
|
|
14
22
|
|
|
15
23
|
|
|
16
24
|
def format_warning(message, category, *args, **kwargs):
|
|
17
|
-
return f
|
|
25
|
+
return f"{YELLOW}[WARNING] {category.__name__}: {message}{RESET}\n"
|
|
18
26
|
|
|
19
27
|
|
|
20
28
|
warnings.formatwarning = format_warning
|
|
29
|
+
|
|
30
|
+
### CHAT VALUES ###
|
|
31
|
+
|
|
32
|
+
CATEGORY_CHAT_CONTROL = "Chat control commands"
|
|
33
|
+
CATEGORY_LLM_CONTROL = "Language model controls"
|
|
34
|
+
CATEGORY_SCRIPT_CONTROL = "Script control commands"
|
|
35
|
+
CATEGORY_AGENT_CONTROL = "Agent control commands"
|
|
36
|
+
|
|
37
|
+
ROLE_PROMPT = "ara prompt"
|
|
38
|
+
ROLE_RESPONSE = "ara response"
|
|
39
|
+
|
|
40
|
+
INTRO = """/***************************************/
|
|
41
|
+
araarar
|
|
42
|
+
aa ara
|
|
43
|
+
aa aa aara
|
|
44
|
+
a araarar
|
|
45
|
+
a ar ar
|
|
46
|
+
aa ara
|
|
47
|
+
a a
|
|
48
|
+
a aa
|
|
49
|
+
a a
|
|
50
|
+
ar aa aa
|
|
51
|
+
(c) ara chat by talsen team
|
|
52
|
+
aa aa
|
|
53
|
+
aa a
|
|
54
|
+
a aa
|
|
55
|
+
aa
|
|
56
|
+
/***************************************/
|
|
57
|
+
Start chatting (type 'HELP'/'h' for available commands, 'QUIT'/'q' to exit chat mode):"""
|
|
58
|
+
|
|
59
|
+
BINARY_TYPE_MAPPING = {
|
|
60
|
+
".png": "image/png",
|
|
61
|
+
".jpg": "image/jpeg",
|
|
62
|
+
".jpeg": "image/jpeg",
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
DOCUMENT_TYPE_EXTENSIONS = [".docx", ".doc", ".odt", ".pdf", ".xlsx", ".xls", ".pptx"]
|
ara_cli/__main__.py
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import typer
|
|
2
|
-
import sys
|
|
3
2
|
import os
|
|
4
3
|
from typing import Optional
|
|
5
4
|
from os import getenv
|
|
6
|
-
from ara_cli.error_handler import AraError
|
|
7
5
|
from ara_cli.version import __version__
|
|
8
6
|
from ara_cli import error_handler
|
|
9
7
|
from ara_cli.ara_subcommands.create import register as register_create_cli
|
|
@@ -14,18 +12,29 @@ from ara_cli.ara_subcommands.list_tags import register as register_list_tags_cli
|
|
|
14
12
|
from ara_cli.ara_subcommands.prompt import register as register_prompt_cli
|
|
15
13
|
from ara_cli.ara_subcommands.chat import register as register_chat_cli
|
|
16
14
|
from ara_cli.ara_subcommands.template import register as register_template_cli
|
|
17
|
-
from ara_cli.ara_subcommands.fetch_templates import
|
|
15
|
+
from ara_cli.ara_subcommands.fetch_templates import (
|
|
16
|
+
register as register_fetch_templates_cli,
|
|
17
|
+
)
|
|
18
|
+
from ara_cli.ara_subcommands.fetch_scripts import register as register_fetch_scripts_cli
|
|
19
|
+
from ara_cli.ara_subcommands.fetch_agents import register as register_fetch_agents_cli
|
|
20
|
+
from ara_cli.ara_subcommands.fetch import register as register_fetch_cli
|
|
18
21
|
from ara_cli.ara_subcommands.read import register as register_read_cli
|
|
19
22
|
from ara_cli.ara_subcommands.reconnect import register as register_reconnect_cli
|
|
20
23
|
from ara_cli.ara_subcommands.read_status import register as register_read_status_cli
|
|
21
24
|
from ara_cli.ara_subcommands.read_user import register as register_read_user_cli
|
|
22
25
|
from ara_cli.ara_subcommands.set_status import register as register_set_status_cli
|
|
23
26
|
from ara_cli.ara_subcommands.set_user import register as register_set_user_cli
|
|
24
|
-
from ara_cli.ara_subcommands.classifier_directory import
|
|
27
|
+
from ara_cli.ara_subcommands.classifier_directory import (
|
|
28
|
+
register as register_classifier_directory_cli,
|
|
29
|
+
)
|
|
25
30
|
from ara_cli.ara_subcommands.scan import register as register_scan_cli
|
|
26
31
|
from ara_cli.ara_subcommands.autofix import register as register_autofix_cli
|
|
27
32
|
from ara_cli.ara_subcommands.extract import register as register_extract_cli
|
|
28
33
|
from ara_cli.ara_subcommands.load import register as register_load_cli
|
|
34
|
+
from ara_cli.ara_subcommands.config import register as register_config_cli
|
|
35
|
+
from ara_cli.ara_subcommands.convert import register as register_convert_cli
|
|
36
|
+
|
|
37
|
+
from ara_cli.directory_navigator import DirectoryNavigator
|
|
29
38
|
|
|
30
39
|
|
|
31
40
|
def version_callback(value: bool):
|
|
@@ -36,7 +45,7 @@ def version_callback(value: bool):
|
|
|
36
45
|
|
|
37
46
|
def is_debug_mode_enabled():
|
|
38
47
|
"""Check if debug mode is enabled via environment variable."""
|
|
39
|
-
return getenv(
|
|
48
|
+
return getenv("ARA_DEBUG", "").lower() in ("1", "true", "yes")
|
|
40
49
|
|
|
41
50
|
|
|
42
51
|
def configure_debug_mode(debug: bool, env_debug_mode: bool):
|
|
@@ -45,95 +54,74 @@ def configure_debug_mode(debug: bool, env_debug_mode: bool):
|
|
|
45
54
|
error_handler.debug_mode = True
|
|
46
55
|
|
|
47
56
|
|
|
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
57
|
def check_ara_directory_exists():
|
|
76
58
|
"""Check if ara directory exists or if we're inside ara directory tree."""
|
|
77
|
-
return find_ara_directory_root() is not None
|
|
59
|
+
return DirectoryNavigator.find_ara_directory_root() is not None
|
|
78
60
|
|
|
79
61
|
|
|
80
62
|
def prompt_create_ara_directory():
|
|
81
63
|
"""Prompt user to create ara directory and create it if confirmed."""
|
|
82
64
|
# Print the prompt message
|
|
83
|
-
print(
|
|
84
|
-
|
|
65
|
+
print(
|
|
66
|
+
"No 'ara' directory found. Create one in the current directory? (Y/n)",
|
|
67
|
+
end=" ",
|
|
68
|
+
flush=True,
|
|
69
|
+
)
|
|
70
|
+
|
|
85
71
|
# Read user input
|
|
86
72
|
try:
|
|
87
73
|
response = input().strip()
|
|
88
74
|
except (EOFError, KeyboardInterrupt):
|
|
89
75
|
typer.echo("\nOperation cancelled.")
|
|
90
76
|
raise typer.Exit(1)
|
|
91
|
-
|
|
92
|
-
if response.lower() in (
|
|
77
|
+
|
|
78
|
+
if response.lower() in ("y", "yes", ""):
|
|
93
79
|
current_dir = os.getcwd()
|
|
94
|
-
ara_path = os.path.join(current_dir,
|
|
95
|
-
|
|
80
|
+
ara_path = os.path.join(current_dir, "ara")
|
|
81
|
+
|
|
96
82
|
# Create ara directory structure
|
|
97
83
|
subdirectories = [
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
84
|
+
"businessgoals",
|
|
85
|
+
"capabilities",
|
|
86
|
+
"epics",
|
|
87
|
+
"examples",
|
|
88
|
+
"features",
|
|
89
|
+
"keyfeatures",
|
|
90
|
+
"tasks",
|
|
91
|
+
"userstories",
|
|
92
|
+
"vision",
|
|
107
93
|
]
|
|
108
|
-
|
|
94
|
+
|
|
109
95
|
try:
|
|
110
96
|
# Create main ara directory
|
|
111
97
|
os.makedirs(ara_path, exist_ok=True)
|
|
112
|
-
|
|
98
|
+
|
|
113
99
|
# Create subdirectories for artefact types
|
|
114
100
|
for subdir in subdirectories:
|
|
115
101
|
os.makedirs(os.path.join(ara_path, subdir), exist_ok=True)
|
|
116
|
-
|
|
102
|
+
|
|
117
103
|
# Create .araconfig directory
|
|
118
|
-
araconfig_path = os.path.join(ara_path,
|
|
104
|
+
araconfig_path = os.path.join(ara_path, ".araconfig")
|
|
119
105
|
os.makedirs(araconfig_path, exist_ok=True)
|
|
120
|
-
|
|
106
|
+
|
|
121
107
|
# Create default ara_config.json using ConfigManager
|
|
122
108
|
from ara_cli.ara_config import ConfigManager, ARAconfig
|
|
123
|
-
|
|
124
|
-
|
|
109
|
+
|
|
110
|
+
config_file_path = os.path.join(araconfig_path, "ara_config.json")
|
|
111
|
+
|
|
125
112
|
# Reset ConfigManager to ensure clean state
|
|
126
113
|
ConfigManager.reset()
|
|
127
|
-
|
|
114
|
+
|
|
128
115
|
# Create default config and save it
|
|
129
116
|
default_config = ARAconfig()
|
|
130
117
|
from ara_cli.ara_config import save_data
|
|
118
|
+
|
|
131
119
|
save_data(config_file_path, default_config)
|
|
132
|
-
|
|
120
|
+
|
|
133
121
|
typer.echo(f"Created ara directory structure at {ara_path}")
|
|
134
122
|
typer.echo(f"Created default configuration at {config_file_path}")
|
|
135
123
|
return True
|
|
136
|
-
|
|
124
|
+
|
|
137
125
|
except OSError as e:
|
|
138
126
|
typer.echo(f"Error creating ara directory: {e}", err=True)
|
|
139
127
|
raise typer.Exit(1)
|
|
@@ -181,15 +169,16 @@ ara artefact handling examples:
|
|
|
181
169
|
> rename artefact and artefact data directory for e.g. a feature: ara rename feature {initial_feature_name} {new_feature_name}
|
|
182
170
|
> create additional templates for a specific aspect (valid aspects are: customer,
|
|
183
171
|
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
|
|
185
|
-
> list artefact data with .md and .json file extensions ara list
|
|
172
|
+
> list artefact data with .md file extension ara list {classifier} {artefact_name} --data --include-extension .md
|
|
173
|
+
> list artefact data with .md and .json file extensions ara list {classifier} {artefact_name} --data --include-extension .md .json
|
|
186
174
|
> list everything but userstories ara list --exclude-extension .userstory
|
|
187
175
|
> list all existing features: ara list --include-extension .feature
|
|
176
|
+
> list all artefacts of a specific classifier: ara list {classifier}
|
|
188
177
|
> 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
178
|
> list tasks which contain 'example content' ara list --include-extension .task --include-content "example content"
|
|
190
|
-
> list children artefacts of a userstory ara list
|
|
191
|
-
> list parent artefacts of a userstory ara list
|
|
192
|
-
> list parent businessgoal artefact of a userstory ara list
|
|
179
|
+
> list children artefacts of a userstory ara list userstory {name_of_userstory} --children
|
|
180
|
+
> list parent artefacts of a userstory ara list userstory {name_of_userstory} --branch
|
|
181
|
+
> list parent businessgoal artefact of a userstory ara list userstory {name_of_userstory} --branch --include-extension .businessgoal
|
|
193
182
|
> print any artefact template for e.g. a feature file template in the terminal: ara template feature
|
|
194
183
|
|
|
195
184
|
ara prompt templates examples:
|
|
@@ -204,25 +193,32 @@ ara chat examples:
|
|
|
204
193
|
> load selected templates in config_prompt_templates.md for the task {task_name}: ara prompt load task {task_name}
|
|
205
194
|
> create and send configured prompt of the task {task_name} to the configured LLM: ara prompt send task {task_name}
|
|
206
195
|
> extract the selected LLM response in task.exploration.md and save to disk: ara prompt extract task {task_name}
|
|
196
|
+
|
|
197
|
+
ara config examples:
|
|
198
|
+
> show current configuration status: ara config show
|
|
199
|
+
> show only LLM configurations: ara config show --llm
|
|
200
|
+
> reset LLM configurations to defaults: ara config reset --llm-config -y
|
|
201
|
+
> preview reset without making changes: ara config reset --all --dry-run
|
|
207
202
|
""",
|
|
208
203
|
no_args_is_help=True,
|
|
209
204
|
add_completion=True,
|
|
210
|
-
rich_markup_mode="rich"
|
|
205
|
+
rich_markup_mode="rich",
|
|
211
206
|
)
|
|
212
207
|
|
|
213
208
|
@app.callback(invoke_without_command=True)
|
|
214
209
|
def main(
|
|
215
210
|
ctx: typer.Context,
|
|
216
211
|
version: Optional[bool] = typer.Option(
|
|
217
|
-
None,
|
|
212
|
+
None,
|
|
213
|
+
"--version",
|
|
214
|
+
"-v",
|
|
218
215
|
callback=version_callback,
|
|
219
216
|
is_eager=True,
|
|
220
|
-
help="Show version and exit"
|
|
217
|
+
help="Show version and exit",
|
|
221
218
|
),
|
|
222
219
|
debug: bool = typer.Option(
|
|
223
|
-
False, "--debug",
|
|
224
|
-
|
|
225
|
-
)
|
|
220
|
+
False, "--debug", help="Enable debug mode for detailed error output"
|
|
221
|
+
),
|
|
226
222
|
):
|
|
227
223
|
"""The ara cli terminal tool is a management tool for classified ara artefacts."""
|
|
228
224
|
debug_mode = is_debug_mode_enabled()
|
|
@@ -232,15 +228,26 @@ ara chat examples:
|
|
|
232
228
|
if ctx.invoked_subcommand is None:
|
|
233
229
|
ctx.get_help()
|
|
234
230
|
ctx.exit()
|
|
235
|
-
|
|
231
|
+
|
|
236
232
|
# Check for ara directory before executing any command
|
|
237
233
|
# Skip check for commands that don't require ara directory
|
|
238
234
|
commands_requiring_ara = {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
235
|
+
"create",
|
|
236
|
+
"delete",
|
|
237
|
+
"rename",
|
|
238
|
+
"list",
|
|
239
|
+
"list-tags",
|
|
240
|
+
"prompt",
|
|
241
|
+
"read",
|
|
242
|
+
"reconnect",
|
|
243
|
+
"read-status",
|
|
244
|
+
"read-user",
|
|
245
|
+
"set-status",
|
|
246
|
+
"set-user",
|
|
247
|
+
"scan",
|
|
248
|
+
"autofix",
|
|
242
249
|
}
|
|
243
|
-
|
|
250
|
+
|
|
244
251
|
if ctx.invoked_subcommand in commands_requiring_ara:
|
|
245
252
|
requires_ara_directory()
|
|
246
253
|
|
|
@@ -254,6 +261,9 @@ ara chat examples:
|
|
|
254
261
|
register_chat_cli(app)
|
|
255
262
|
register_template_cli(app)
|
|
256
263
|
register_fetch_templates_cli(app)
|
|
264
|
+
register_fetch_scripts_cli(app)
|
|
265
|
+
register_fetch_agents_cli(app)
|
|
266
|
+
register_fetch_cli(app)
|
|
257
267
|
register_read_cli(app)
|
|
258
268
|
register_reconnect_cli(app)
|
|
259
269
|
register_read_status_cli(app)
|
|
@@ -265,6 +275,8 @@ ara chat examples:
|
|
|
265
275
|
register_autofix_cli(app)
|
|
266
276
|
register_extract_cli(app)
|
|
267
277
|
register_load_cli(app)
|
|
278
|
+
register_config_cli(app)
|
|
279
|
+
register_convert_cli(app)
|
|
268
280
|
|
|
269
281
|
return app
|
|
270
282
|
|
|
@@ -281,4 +293,4 @@ def cli():
|
|
|
281
293
|
|
|
282
294
|
|
|
283
295
|
if __name__ == "__main__":
|
|
284
|
-
cli()
|
|
296
|
+
cli()
|