================================================================================
  SindByte MCP Server -- Aider Setup Guide
  Connecting Aider to Your Local Endpoint
================================================================================
Date: 2026-04-17
For: SindByte Server v1.9.09

--------------------------------------------------------------------------------
 1. WHAT IS AIDER?
--------------------------------------------------------------------------------
Aider is a popular open-source terminal-based AI pair programmer.
It is NOT the same as Codex, Claude Code, or OpenCode.

  Official source:   https://aider.chat
  Install command:   python -m pip install aider-install
                     aider-install
  Config file:       .aider.conf.yml  (project-level)
                     ~/.aider.conf.yml (global)

--------------------------------------------------------------------------------
 2. REQUIRED INFORMATION
--------------------------------------------------------------------------------
  SindByte Base URL:   http://127.0.0.1:8091/v1
  API Key:             sk-sindbyte-local   (or any text -- not checked)

  IMPORTANT: SindByte must be running before you start Aider.

--------------------------------------------------------------------------------
 3. INSTALL AIDER
--------------------------------------------------------------------------------
  STEP 1 -- Open PowerShell and install:

    python -m pip install aider-install
    aider-install

    Or install directly:
    python -m pip install aider-chat

  STEP 2 -- Verify installation:

    aider --version

--------------------------------------------------------------------------------
 4. CONFIGURE AIDER FOR SINDBYTE
--------------------------------------------------------------------------------
Aider uses standard OPENAI_API_BASE and OPENAI_API_KEY environment variables.

  STEP 1 -- Set these environment variables in your terminal:

    set OPENAI_API_BASE=http://127.0.0.1:8091/v1
    set OPENAI_API_KEY=sk-sindbyte-local

  STEP 2 -- Make permanent (Windows):
    Win+R -> sysdm.cpl -> Advanced -> Environment Variables
    Add:
      OPENAI_API_BASE = http://127.0.0.1:8091/v1
      OPENAI_API_KEY  = sk-sindbyte-local

  STEP 3 -- Start Aider in your project folder:

    cd "[your-project-path]"
    aider --model openai/LMDirect

--------------------------------------------------------------------------------
 5. ALTERNATIVE: CONFIG FILE SETUP
--------------------------------------------------------------------------------
You can create a project-level config file so you don't need env vars:

  STEP 1 -- Create a config file in your project root:

    notepad ".aider.conf.yml"

  STEP 2 -- Paste this config:

    model: openai/LMDirect
    openai-api-base: http://127.0.0.1:8091/v1
    openai-api-key: sk-sindbyte-local

  STEP 3 -- Save and start Aider:

    aider

--------------------------------------------------------------------------------
 6. USING IQ TOOLS WITH AIDER
--------------------------------------------------------------------------------
Aider does not have built-in IQ profile selection.
To use IQ Tools, either:

  OPTION A -- Set the default IQ profile in SindByte Config
    1. Open SindByte tray icon -> Config
    2. Find API Provider -> Default IQ Profile
    3. Set to "default", "research", or "trading"
    4. Save and restart SindByte

  OPTION B -- Use an IQ model alias on the command line:

    aider --model openai/iq/full
    aider --model openai/iq/research
    aider --model openai/iq/trading
    aider --model openai/iq/minimal
    aider --model openai/iq/off

--------------------------------------------------------------------------------
 7. TROUBLESHOOTING
--------------------------------------------------------------------------------

  PROBLEM: "aider command not found"
  FIX:     Make sure Python Scripts folder is in your PATH.
           Run: python -m site --user-site
           Add the Scripts subfolder to PATH.

  PROBLEM: "Cannot connect" or "Connection refused"
  FIX:     Verify SindByte is running on port 8091.

  PROBLEM: "Model not supported" warning
  FIX:     This is just a warning. Aider works with any OpenAI-compatible
           endpoint. You can ignore the warning or add:
             --no-show-model-warnings

  PROBLEM: Aider does not edit files
  FIX:     Make sure you are using a capable model. If using IQ Tools,
           the final output may need to be direct LM (set iq/off).

--------------------------------------------------------------------------------
 8. QUICK REFERENCE
--------------------------------------------------------------------------------
  | Setting          | Value                                  |
  |------------------|----------------------------------------|
  | Tool             | Aider (pip: aider-chat)                |
  | Base URL         | http://127.0.0.1:8091/v1               |
  | API Key          | sk-sindbyte-local                      |
  | Env var (URL)    | OPENAI_API_BASE                        |
  | Env var (Key)    | OPENAI_API_KEY                         |
  | Config file      | .aider.conf.yml                        |
  | Model prefix     | openai/                                |
  | IQ Timeout       | 3600 sec (1 hour)                      |

================================================================================
  END OF GUIDE
================================================================================
