@@ -9,9 +9,7 @@ command_exists() {
99#  Inputs
1010ARG_WORKDIR=${ARG_WORKDIR:-/ home/ coder} 
1111ARG_INSTALL_AIDER=${ARG_INSTALL_AIDER:- true} 
12- ARG_REPORT_TASKS=${ARG_REPORT_TASKS:- true} 
1312ARG_AIDER_CONFIG=${ARG_AIDER_CONFIG:- } 
14- ARG_MCP_APP_STATUS_SLUG=${ARG_MCP_APP_STATUS_SLUG:- } 
1513
1614echo  " --------------------------------" 
1715echo  " Install flag: $ARG_INSTALL_AIDER " 
@@ -31,101 +29,21 @@ function install_aider() {
3129    pipx install --force aider-install
3230    aider-install
3331  fi 
34-   echo  " Aider installed: $( aider --version ||  echo  ' check failed the Aider module insatllation failed' ) " 
35- }
36- 
37- function  install_node()  {
38-   if  !  command_exists npm;  then 
39-     printf  " npm not found, checking for Node.js installation...\n" 
40-     if  !  command_exists node;  then 
41-       printf  " Node.js not found, installing Node.js via NVM...\n" 
42-       export  NVM_DIR=" $HOME /.nvm" 
43-       if  [ !  -d  " $NVM_DIR " ;  then 
44-         mkdir -p " $NVM_DIR " 
45-         curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh |  bash
46-         [ -s  " $NVM_DIR /nvm.sh" &&  \.  " $NVM_DIR /nvm.sh" 
47-       else 
48-         [ -s  " $NVM_DIR /nvm.sh" &&  \.  " $NVM_DIR /nvm.sh" 
49-       fi 
50- 
51-       #  Temporarily disable nounset (-u) for nvm to avoid PROVIDED_VERSION error
52-       set  +u
53-       nvm install --lts
54-       nvm use --lts
55-       nvm alias  default node
56-       set  -u
57- 
58-       printf  " Node.js installed: %s\n" " $( node --version) " 
59-       printf  " npm installed: %s\n" " $( npm --version) " 
60-     else 
61-       printf  " Node.js is installed but npm is not available. Please install npm manually.\n" 
62-       exit  1
63-     fi 
64-   fi 
65- }
66- 
67- function  install_UV()  {
68-   if  !  command_exists uv;  then  
69-     printf  " UV not found" 
70-     printf  " Installing UV" 
71-     curl -LsSf https://astral.sh/uv/install.sh |  sh
72-     printf  " UV installed successful %s" " Version : $( uv --version) " 
73-   fi   
74- }
75- 
76- function  install_mcpm-aider()  {
77-   install_node
78-   install_UV
79-   #  If nvm is not used, set up user npm global directory
80-   if  !  command_exists nvm;  then 
81-     mkdir -p " $HOME /.npm-global" 
82-     npm config set  prefix " $HOME /.npm-global" 
83-     export  PATH=" $HOME /.npm-global/bin:$PATH " 
84-     if  !  grep -q " export PATH=$HOME /.npm-global/bin:\$ PATH" ~ /.bashrc;  then 
85-       echo  " export PATH=$HOME /.npm-global/bin:\$ PATH" >>  ~ /.bashrc
86-     fi 
87-   fi 
88-   printf  " %s Installing MCPM-Aider for supporting coder MCP...\n" 
89-   npm install -g @poai/mcpm-aider
90-   printf  " %s Successfully installed MCPM-Aider. Version: %s\n" " $( mcpm-aider -V) " 
32+   echo  " Aider installed: $( aider --version ||  echo  ' check failed the Aider module installation failed' ) " 
9133}
9234
9335function  configure_aider_settings()  {
94-   if  [ " ${ARG_REPORT_TASKS} " =  " true" ;  then 
36+   if  [ -n  " ${ARG_AIDER_CONFIG} " ;  then 
37+     echo  " Aider Envronment Variables AND Model are Configuring" 
38+ 
9539    mkdir -p " $HOME /.config/aider" 
9640
9741    echo  " $ARG_AIDER_CONFIG " >  " $HOME /.config/aider/.aider.conf.yml" 
98-     echo  " Added Coder MCP extension to Aider config.yml" 
99-   else 
100-     printf  " MCP Server not Implemented" 
101-   fi 
102- }
103- 
104- function  report_tasks()  {
105-   if  [ " $ARG_REPORT_TASKS " =  " true" ;  then 
106-     echo  " Configuring Aider to report tasks via Coder MCP..." 
107-     export  CODER_MCP_APP_STATUS_SLUG=" $ARG_MCP_APP_STATUS_SLUG " 
108-     export  CODER_MCP_AI_AGENTAPI_URL=" http://localhost:3284" 
109-     coder exp mcp configure claude-code " $ARG_WORKDIR " 
110-     echo  " claude configured with SLUG successfuly" 
111-     configure_claude_for_mcpm_aider
42+     echo  " Aider config.yml created at $HOME /.config/aider/.aider.conf.yml" 
11243  else 
113-     export  CODER_MCP_APP_STATUS_SLUG=" " 
114-     export  CODER_MCP_AI_AGENTAPI_URL=" " 
115-     echo  " Configuring Aider with Coder MCP..." 
116-     coder exp mcp configure claude-code " $ARG_WORKDIR " 
117-     echo  " claude configured successfuly" 
118-     configure_claude_for_mcpm_aider
44+     printf  " NO Aider Environment Variables and Model Configured\n" 
11945  fi 
12046}
12147
122- function  configure_claude_for_mcpm_aider()  {
123-   echo  " configuring claude for mcpm-adier" 
124-   mkdir -p $HOME /.config/claude
125-   cat $HOME /.claude.json >  $HOME /.config/claude/claude_desktop_config.json
126- }
127- 
12848install_aider
129- install_mcpm-aider
13049configure_aider_settings
131- report_tasks
0 commit comments