### Install and Run AiderDesk Source: https://github.com/hotovo/aider-desk/blob/main/CONTRIBUTING.md Installs project dependencies and starts the Electron app in development mode with hot reload. ```bash npm install npm run dev ``` -------------------------------- ### AiderDesk Integration Example Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/features/browser-api.md Demonstrates a complete integration of the Browser API within a class structure for managing project tasks, prompts, and event listeners. Includes initialization, event setup, prompt execution, and cleanup. ```javascript import { BrowserApi } from './browser-api'; class AiderDeskIntegration { constructor() { this.api = new BrowserApi(); this.currentProject = null; } async initialize(projectPath) { await this.api.initialize(); // Start the project await this.api.startProject(projectPath); this.currentProject = projectPath; // Setup real-time listeners this.setupEventListeners(); } setupEventListeners() { // Response streaming this.api.addResponseChunkListener(this.currentProject, (data) => { this.onResponseChunk(data); }); // Response completion this.api.addResponseCompletedListener(this.currentProject, (data) => { this.onResponseComplete(data); }); // Context updates this.api.addContextFilesUpdatedListener(this.currentProject, (data) => { this.onContextUpdate(data); }); // Error handling this.api.addLogListener(this.currentProject, (data) => { if (data.level === 'error') { this.onError(data); } }); } async runPrompt(prompt, mode = 'code') { try { await this.api.runPrompt(this.currentProject, prompt, mode); } catch (error) { console.error('Failed to run prompt:', error); throw error; } } async addFileToContext(filePath) { await this.api.addFile(this.currentProject, filePath); } async executeCommand(command) { await this.api.runCommand(this.currentProject, command); } // Event handlers onResponseChunk(data) { // Handle streaming response console.log('AI:', data.chunk); } onResponseComplete(data) { // Handle completion console.log('Response complete. Usage:', data.usage); } onContextUpdate(data) { // Handle context changes console.log('Context updated:', data.contextFiles.length, 'files'); } onError(data) { // Handle errors console.error('Error:', data.message); } async cleanup() { if (this.currentProject) { await this.api.stopProject(this.currentProject); } } } // Usage const integration = new AiderDeskIntegration(); await integration.initialize('/path/to/my/project'); await integration.runPrompt('Create a user authentication system'); ``` -------------------------------- ### Install Deno Runtime (includes LSP) Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/lsp/README.md Install the Deno runtime, which includes its language server. Refer to the Deno website for installation instructions. ```bash # Install Deno runtime (includes LSP) # See: https://deno.land ``` -------------------------------- ### Install AiderDesk Extensions via CLI Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/extensions/index.md Use the npx command to install extensions. The interactive installation guides you through the process, or you can specify a particular extension and install it globally. ```bash npx @aiderdesk/extensions install ``` ```bash npx @aiderdesk/extensions install sound-notification --global ``` -------------------------------- ### Docker Compose Setup for Aider Desk Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/advanced/docker.md Configure and run Aider Desk using Docker Compose for a more robust setup. This example defines services, ports, volumes for persistent data and projects, environment variables for auto-opening projects and authentication, and a healthcheck. ```yaml version: '3.8' services: aiderdesk: image: ghcr.io/hotovo/aider-desk:latest container_name: aiderdesk ports: - "24337:24337" volumes: # Persistent data directory - ./aiderdesk-data:/app/data # Global configuration (agent profiles, skills, custom commands, hooks, prompts) - ~/.aider-desk:/root/.aider-desk # Mount your projects - ./projects/frontend:/projects/frontend - ./projects/backend:/projects/backend environment: # Auto-open projects - AIDER_DESK_PROJECTS=/projects/frontend,/projects/backend # Optional: Authentication - AIDER_DESK_USERNAME=admin - AIDER_DESK_PASSWORD=secure-password restart: unless-stopped healthcheck: test: ["CMD", "node", "-e", "require('http').get('http://localhost:24337/', (r) => {process.exit(r.statusCode === 200 || r.statusCode === 404 ? 0 : 1)}).on('error', () => process.exit(1))"] interval: 30s timeout: 10s retries: 3 start_period: 120s ``` -------------------------------- ### Install seek CLI with Go Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/seek/README.md Alternative method to install the seek CLI binary using Go. Requires Go to be installed on the system. ```bash go install github.com/dualeai/seek/cmd/seek@latest ``` -------------------------------- ### Install Dependencies Source: https://github.com/hotovo/aider-desk/blob/main/AGENTS.md Use this command to install all project dependencies before development or building. ```bash npm install ``` -------------------------------- ### Specify Aider Version from Local Path (Windows) Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/advanced/custom-aider-version.md Install aider-chat from a local clone of its repository on Windows. The path must point to a directory with a valid setup file. ```shell AIDER_DESK_AIDER_VERSION=C:\path\to\your\local\aider\clone ``` -------------------------------- ### Install @aiderdesk/tree-sitter-utils Source: https://github.com/hotovo/aider-desk/blob/main/packages/tree-sitter-utils/README.md Install the library using npm. ```bash npm install @aiderdesk/tree-sitter-utils ``` -------------------------------- ### Install Python Language Server (Pyright) Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/lsp/README.md Install Pyright globally for Python LSP support, or use npx for automatic installation. ```bash npm install -g pyright # Or use npx (automatic) ``` -------------------------------- ### Install Extension Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Installs an extension from a given repository URL. Handles project-level installations and cleans up .git directories from cloned repositories. ```typescript async installExtension(extensionId: string, repositoryUrl: string, project?: Project): Promise ``` -------------------------------- ### Handle Install Extension Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Asynchronous function to handle the installation of an available extension. ```typescript const handleInstall = async (extension: AvailableExtension) => // Implementation omitted for brevity ``` -------------------------------- ### Ensure Python Dependencies Installed Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Starts the Python dependency installation process in the background. This method is safe to call multiple times, as it ensures only one installation runs concurrently. ```typescript /** * Start the installation process in the background (fire-and-forget). * Safe to call multiple times — only one install runs at a time. */ ensureInstalled(): void ``` -------------------------------- ### Install Extension Dependencies Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/redact-secrets/README.md Navigate to the extension directory and install its Node.js dependencies. ```bash cd ~/.aider-desk/extensions/redact-secrets npm install ``` -------------------------------- ### Handle Extension Install Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Callback function to initiate the installation process for an available extension. This is used in the ExtensionCard component. ```typescript const handleInstall = () => onInstall?.(extension as AvailableExtension); ``` -------------------------------- ### Install Questions Extension via CLI Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/questions/README.md Use this command to install the Questions Extension using the AiderDesk CLI. This is the recommended installation method. ```bash npx @aiderdesk/extensions install questions ``` -------------------------------- ### Specify Aider Version from Local Path (Linux/macOS) Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/advanced/custom-aider-version.md Install aider-chat from a local clone of its repository. The path must point to a directory with a valid setup file. ```shell AIDER_DESK_AIDER_VERSION=/path/to/your/local/aider/clone ``` -------------------------------- ### Setup Aider Connector Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Internal method to set up the aider-chat connector, including copying necessary files and installing its requirements. It accepts a `cleanInstall` flag to determine if a fresh installation is needed. ```typescript private async setupAiderConnectorInternal(cleanInstall: boolean): Promise ``` -------------------------------- ### Install Extensions via CLI Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/extensions/extensions-gallery.md Use the AiderDesk CLI to interactively select and install extensions, or install a specific extension by its ID. Extensions can be installed project-level or globally. ```bash npx @aiderdesk/extensions install ``` ```bash npx @aiderdesk/extensions install sound-notification ``` ```bash npx @aiderdesk/extensions install pirate --global ``` ```bash npx @aiderdesk/extensions install --global ``` ```bash npx @aiderdesk/extensions list ``` -------------------------------- ### Command with Configuration Access Source: https://github.com/hotovo/aider-desk/blob/main/resources/skills/extension-creator/references/command-definition.md Shows how a command can access and modify extension configuration. This example 'my-setting' gets or sets a configuration value. ```typescript // In extension class private config: MyConfig; async onLoad(context: ExtensionContext): Promise { this.config = await loadConfig(); } getCommands(_context: ExtensionContext): CommandDefinition[] { return [{ name: 'my-setting', description: 'Get or set a value', arguments: [ { description: 'Value to set (optional)', required: false } ], execute: async (args: string[], context: ExtensionContext) => { const taskContext = context.getTaskContext(); const [value] = args; if (!value) { // Show current value taskContext?.addLogMessage('info', `Current: ${this.config.mySetting}`); } else { // Update value this.config.mySetting = value; await saveConfig(this.config); taskContext?.addLogMessage('info', `Updated to: ${value}`); } } }]; } ``` -------------------------------- ### Start Project Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Initiates the process of starting a project located at the specified base directory. ```typescript async startProject(baseDir: string) ``` -------------------------------- ### Install AiderDesk Extensions Source: https://github.com/hotovo/aider-desk/blob/main/README.md Use this command to install extensions for AiderDesk. Ensure you have Node.js and npm/npx installed. ```bash npx @aiderdesk/extensions install ``` -------------------------------- ### Install Extensions Interactively via CLI Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/extensions/installation.md Run the CLI without arguments to interactively select and install extensions. Use the --global flag to install to the global directory or --directory to specify a custom path. ```bash npx @aiderdesk/extensions install ``` ```bash npx @aiderdesk/extensions install --global ``` ```bash npx @aiderdesk/extensions install --directory /path/to/extensions ``` -------------------------------- ### Install Extensions via CLI Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/README.md Use the CLI to install extensions interactively, by ID, globally, or from a URL. Extensions are installed to the current project by default. ```bash npx @aiderdesk/extensions install ``` ```bash npx @aiderdesk/extensions install sound-notification ``` ```bash npx @aiderdesk/extensions install sound-notification --global ``` ```bash npx @aiderdesk/extensions install https://raw.githubusercontent.com/username/my-extension/main/my-extension.ts ``` -------------------------------- ### Install Extension Dependencies Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/extensions/installation.md After manually installing a folder-based extension, navigate to its directory and install its Node.js dependencies using npm. ```bash # Install dependencies for folder extensions cd ~/.aider-desk/extensions/sandbox npm install ``` -------------------------------- ### Initialize and Start Connector Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Initializes and starts a connector instance. Ensure necessary environment variables are set for telemetry. ```python connector = Connector( ⋮---- ``` ```python # Start the connector ⋮---- ``` -------------------------------- ### Install Protected Paths Extension Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/protected-paths/README.md Copy the extension directory to your AiderDesk extensions folder to install it. Restart AiderDesk after installation. ```bash cp -r protected-paths ~/.aider-desk/extensions/ ``` ```bash cp -r protected-paths .aider-desk/extensions/ ``` -------------------------------- ### Install Extension from URL via CLI Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/extensions/installation.md Install extensions directly from a URL, supporting direct file URLs, GitHub repositories, or third-party repositories. Use the --global flag for global installation. ```bash npx @aiderdesk/extensions install https://raw.githubusercontent.com/hotovo/aider-desk/main/packages/extensions/extensions/sound-notification.ts ``` ```bash npx @aiderdesk/extensions install https://github.com/hotovo/aider-desk --global ``` ```bash npx @aiderdesk/extensions install https://raw.githubusercontent.com/username/my-extension/main/my-extension.ts --global ``` -------------------------------- ### Install FFF Extension Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/fff/README.md Install the FFF extension using npx. This command adds the extension to your Aider Desk installation. ```bash npx @aiderdesk/extensions install fff ``` -------------------------------- ### Quick Install RTK Script Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/rtk/README.md This script downloads and installs the latest RTK binary to ~/.local/bin. It supports custom install paths via the RTK_INSTALL_DIR environment variable. ```bash curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/master/install.sh | sh ``` -------------------------------- ### Install C# Language Server (OmniSharp) Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/lsp/README.md Install OmniSharp for C# LSP support. Consult the OmniSharp-Roslyn GitHub repository for installation details. ```bash # Install OmniSharp # See: https://github.com/OmniSharp/omnisharp-roslyn ``` -------------------------------- ### Start Project Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Initiates the start of a project located at the specified base directory. This is an asynchronous operation. ```typescript startProject(baseDir: string): Promise ``` -------------------------------- ### Usage Example Source: https://github.com/hotovo/aider-desk/blob/main/resources/skills/extension-creator/references/extension-interface.md An example demonstrating how to use the MemoryContext to store and retrieve memories within an extension. ```APIDOC ### Usage example ```typescript async onAgentFinished(event: AgentFinishedEvent, context: ExtensionContext) { const memory = context.getMemoryContext(); if (!memory.isMemoryEnabled()) return; const projectId = context.getProjectDir(); const taskContext = context.getTaskContext(); const taskId = taskContext?.data.id ?? ''; await memory.storeMemory( projectId, taskId, 'code-pattern', 'Always use clsx for conditional class names in React components', ); const memories = await memory.retrieveMemories(projectId, 'React class names'); context.log(`Found ${memories.length} relevant memories`, 'info'); } ``` ``` -------------------------------- ### Install Global Extensions Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/extensions/installation.md Use these commands to install extensions that are available to all AiderDesk projects. Ensure the directory exists before copying. ```bash # Create the directory if it doesn't exist mkdir -p ~/.aider-desk/extensions # Copy your extension cp my-extension.ts ~/.aider-desk/extensions/ # For folder-based extensions cp -r my-complex-extension ~/.aider-desk/extensions/ ``` -------------------------------- ### Install AiderDesk Globally Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/advanced/npm-cli.md Installs the AiderDesk backend service globally on your system. This allows you to run the service without needing to install it for each project. ```bash npm install -g @aiderdesk/aiderdesk ``` -------------------------------- ### Install ChunkHound using uv Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/chunkhound-on-semantic-search-tool/README.md Installs the ChunkHound CLI tool using the uv package manager. This command should be run after uv is installed. ```bash uv tool install chunkhound ``` -------------------------------- ### Run Python Installation Process Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Internal asynchronous method that orchestrates the entire Python dependency installation process, including environment creation and package installation. ```typescript private async runInstallation(): Promise ``` -------------------------------- ### Install Extensions via CLI Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/extensions/installation.md Use the AiderDesk CLI to interactively select or install specific extensions. You can install globally or to the default user directory. ```bash npx @aiderdesk/extensions install ``` ```bash npx @aiderdesk/extensions install sound-notification ``` ```bash npx @aiderdesk/extensions install sandbox --global ``` -------------------------------- ### Install jq on Fedora Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/rtk/README.md Installs the jq JSON processor using dnf on Fedora Linux. ```bash sudo dnf install jq ``` -------------------------------- ### Install a New Package Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/advanced/extra-python-packages.md Install a new Python package, like scikit-learn, by specifying its name in the environment variable. ```shell export AIDER_DESK_EXTRA_PYTHON_PACKAGES="scikit-learn" ``` -------------------------------- ### Install Java Language Server (jdtls) Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/lsp/README.md Install the Eclipse JDT Language Server. Refer to the official GitHub repository for detailed installation instructions. ```bash # Install Eclipse JDT Language Server # See: https://github.com/eclipse-jdtls/eclipse.jdt.ls ``` -------------------------------- ### Install Extension Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Installs an extension from a given repository URL into a specified project directory. Returns the result of the extension operation. ```typescript installExtension(extensionId: string, repositoryUrl: string, projectDir?: string): Promise ``` -------------------------------- ### List Available Extensions via CLI Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/extensions/installation.md View all available example extensions by running the list command. ```bash npx @aiderdesk/extensions list ``` -------------------------------- ### Install Browser API Dependencies Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/features/browser-api.md Install the necessary npm packages for using the Browser API. ```bash npm install axios socket.io-client uuid ``` -------------------------------- ### Start Project Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/features/rest-api.md Initiates a new AiderDesk project in the specified directory. ```APIDOC ## POST /api/project/start ### Description Starts a new AiderDesk project. ### Method POST ### Endpoint /api/project/start ### Request Body - **projectDir** (string) - Required - The directory where the project will be created or managed. ### Request Example ```json { "projectDir": "/path/to/your/project" } ``` ### Response #### Success Response (200 OK) - **message** (string) - Confirmation message. ### Response Example ```json { "message": "Project started" } ``` ``` -------------------------------- ### Clone Repository and Install Dependencies Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/intro.md Clone the aider-desk repository and install its Node.js dependencies. ```bash # Clone the repository $ git clone https://github.com/hotovo/aider-desk.git $ cd aider-desk # Install dependencies $ npm install ``` -------------------------------- ### Get Python Installation Status Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Retrieves the current status of the Python dependency installation process. Returns a `PythonInstallStatus` object. ```typescript /** Get the current installation status. */ getStatus(): PythonInstallStatus ``` -------------------------------- ### Install jq on Debian/Ubuntu Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/rtk/README.md Installs the jq JSON processor using apt on Debian or Ubuntu Linux distributions. ```bash sudo apt install jq ``` -------------------------------- ### Install UI Placement Demo Extension Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/extensions/extensions-gallery.md Install the UI placement demo extension to visualize available UI component placements within the AiderDesk interface. ```bash npx @aiderdesk/extensions install ui-placement-demo ``` -------------------------------- ### Start AiderDesk Project Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/features/browser-api.md Initiates a new AiderDesk project in the specified directory. Ensure the path exists. ```javascript await api.startProject('/path/to/project'); ``` -------------------------------- ### Define Python Install Status Types Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Defines the possible states for the Python dependency installation process, including idle, checking, downloading, creating venv, installing packages, setting up connector, starting connector, ready, and failed states. ```typescript export type PythonInstallStatus = | { state: 'idle' } | { state: 'checking-uv' } | { state: 'downloading-uv' } | { state: 'creating-venv' } | { state: 'installing-packages'; package: string; current: number; total: number; } | { state: 'setting-up-connector' } | { state: 'starting-connector' } | { state: 'ready' } | { state: 'failed'; error: string }; ``` -------------------------------- ### PythonDependenciesInstaller Class Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Manages Python dependency installation asynchronously. It handles virtual environment creation, package installation, and connector setup, exposing installation status via an EventManager. Consumers can use `waitForReady()` to ensure the environment is set up before proceeding. ```typescript /** * Manages Python dependency installation in the background. * * Handles: * - Creating the Python virtual environment * - Installing aider-chat and connector dependencies * - Exposing installation status to the UI via EventManager * * The installation runs asynchronously (fire-and-forget). Consumers call * `waitForReady()` to gate on completion before spawning Python processes. */ export class PythonDependenciesInstaller ``` -------------------------------- ### Start Project Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/features/rest-api.md Initializes a new project or resumes an existing one. This is the first step in interacting with Aider for a given project directory. ```APIDOC ## POST /api/project/start ### Description Starts or resumes a project in the specified directory. ### Method POST ### Endpoint /api/project/start ### Parameters #### Request Body - **projectDir** (string) - Required - The absolute path to the project directory. ### Request Example ```json { "projectDir": "/path/to/my/project" } ``` ### Response #### Success Response (200) Returns the status of the project initialization. ### Response Example ```json { "message": "Project started successfully" } ``` ``` -------------------------------- ### Extension Management Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt APIs for managing extensions, including listing installed extensions, getting tool information, fetching available extensions, installing, uninstalling, updating, and configuring extensions. ```APIDOC ## getInstalledExtensions ### Description Retrieves a list of installed extensions for a given project directory. ### Method void ### Parameters - **projectDir** (string) - Optional - The project directory to check for extensions. ### Returns - **InstalledExtension[]** - An array of installed extensions. ## getExtensionToolsInfo ### Description Retrieves information about the tools provided by installed extensions. ### Method void ### Parameters - **projectDir** (string) - Optional - The project directory to check for extension tools. ### Returns - **ExtensionToolInfo[]** - An array of extension tool information. ## getAvailableExtensions ### Description Fetches a list of available extensions from specified repositories. ### Method async ### Parameters - **repositories** (string[]) - Required - An array of repository URLs to search for extensions. - **forceRefresh** (boolean) - Optional - If true, forces a refresh of the extension list. - **fetchOnly** (boolean) - Optional - If true, only fetches extensions without performing other operations. ## installExtension ### Description Installs a specified extension from a repository. ### Method async ### Parameters - **extensionId** (string) - Required - The ID of the extension to install. - **repositoryUrl** (string) - Required - The URL of the repository where the extension is located. - **projectDir** (string) - Optional - The project directory to install the extension into. ### Returns - **Promise** - A promise that resolves with the result of the installation operation. ## uninstallExtension ### Description Uninstalls a specified extension. ### Method async ### Parameters - **extensionId** (string) - Required - The ID of the extension to uninstall. - **projectDir** (string) - Optional - The project directory from which to uninstall the extension. ## updateExtension ### Description Updates a specified extension. ### Method async ### Parameters - **extensionId** (string) - Required - The ID of the extension to update. - **repositoryUrl** (string) - Required - The URL of the repository where the updated extension is located. - **projectDir** (string) - Optional - The project directory where the extension is installed. ### Returns - **Promise** - A promise that resolves with the result of the update operation. ``` -------------------------------- ### Perform Startup Tasks Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Initiates the startup process, which includes background installations. This function is non-blocking and returns immediately, with progress reported separately. ```typescript // performStartUp is now non-blocking — it kicks off background installation // and returns immediately. The progress bar acts as a splash screen. ⋮---- ``` -------------------------------- ### Extension Installation Target Decision Tree Source: https://github.com/hotovo/aider-desk/blob/main/resources/skills/extension-creator/references/install-targets.md This decision tree guides the selection of an installation target for a new AiderDesk extension based on whether the current project is the AiderDesk codebase itself. ```text Is the current project the AiderDesk codebase itself? ├── YES → Offer all 3 options (Project, Global, In-Repo) │ In-Repo means: packages/extensions/ + update extensions.json + update docs │ └── NO → Offer only 2 options (Project, Global) Project = .aider-desk/extensions/ in current project Global = ~/.aider-desk/extensions/ ``` -------------------------------- ### Install and Run Ollama Model Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/chunkhound-on-semantic-search-tool/README.md Commands to pull a specific embedding model and start the Ollama server for local inference. ```bash # Install and start Ollama ollama pull dengcao/Qwen3-Embedding-8B:Q5_K_M ollama serve ``` -------------------------------- ### Basic Browser API Usage Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/features/browser-api.md Initialize the Browser API, connect to AiderDesk, start a project, run a prompt, and listen for response chunks. Remember to clean up by unsubscribing from listeners. ```javascript import { BrowserApi } from './browser-api'; // Initialize the API const api = new BrowserApi(); // Connect to AiderDesk (default port 24337) await api.initialize(); // Start a project await api.startProject('/path/to/your/project'); // Run a prompt await api.runPrompt('/path/to/your/project', 'Create a hello world function'); // Listen to real-time events const unsubscribe = api.addResponseChunkListener('/path/to/your/project', (data) => { console.log('AI Response:', data.chunk); }); // Cleanup unsubscribe(); ``` -------------------------------- ### Install seek CLI Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/seek/README.md Installs the seek CLI binary using a curl script. This is one of the prerequisites for the seek extension. ```bash curl -sSfL https://raw.githubusercontent.com/dualeai/seek/main/install.sh | sh ``` -------------------------------- ### Run Development Server Source: https://github.com/hotovo/aider-desk/blob/main/AGENTS.md Starts the development server with hot module replacement enabled for rapid development. ```bash npm run dev ``` -------------------------------- ### Install Astro Language Server Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/lsp/README.md Install Astro and its language server as development dependencies. This enables LSP features for Astro projects. ```bash npm install -D astro @astrojs/language-server ``` -------------------------------- ### Project Lifecycle Event Order Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/extensions/event-flow.md Events triggered during the project lifecycle, specifically when a project is started or stopped. Use these for project-level setup or cleanup. ```text 1. onProjectStarted ← Project opened 2. [Tasks created/used...] 3. onProjectStopped ← Project closed ``` -------------------------------- ### Setup IPC Handlers Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Sets up all IPC handlers for the application, passing necessary controllers and installers. This function should be called early in the application's lifecycle. ```typescript export const setupIpcHandlers = (eventsHandler: EventsHandler, serverController: ServerController, pythonInstaller: PythonDependenciesInstaller) => ⋮---- ``` -------------------------------- ### Start Aider Process Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Spawns the Aider process, ensuring Python dependencies are installed first. It uses direct process control by spawning without a shell. ```typescript import { ChildProcessWithoutNullStreams, spawn } from 'child_process'; import { createHash } from 'crypto'; import { unlinkSync } from 'fs'; import fs from 'fs/promises'; import path from 'path'; import { EditFormat, ModelsData } from '@common/types'; import { fileExists } from '@common/utils'; import treeKill from 'tree-kill'; import { DEFAULT_AIDER_MAIN_MODEL } from '@common/agent'; import { AIDER_DESK_CONNECTOR_DIR, AIDER_DESK_PROJECT_RULES_DIR, AIDER_DESK_TASKS_DIR, PID_FILES_DIR, PYTHON_COMMAND, SERVER_PORT } from '@/constants'; import { Connector } from '@/connector'; import logger from '@/logger'; import { Store } from '@/store'; import { ModelManager } from '@/models'; import { EventManager } from '@/events'; import { getEnvironmentVariablesForAider } from '@/utils'; import { Task } from '@/task/task'; import { PythonDependenciesInstaller } from '@/python-dependencies-installer'; import { getProxyEnvVars } from '@/proxy-manager'; export class AiderManager { // ... other properties and methods public async start(forceRestart = false): Promise { // Set aiderStarting to true when starting aider // Ensure Python dependencies are installed before spawning // Spawn without shell to have direct process control } // ... other methods } ``` -------------------------------- ### Install uv on Windows Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/chunkhound-on-semantic-search-tool/README.md Installs the uv package manager using a PowerShell script. Ensure PowerShell is configured to run scripts. ```powershell powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" ``` -------------------------------- ### Server Controller Initialization and Middleware Setup Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Demonstrates the initialization process of the ServerController, including setting up essential middleware such as server guards, request timeouts, and basic authentication. It also covers CORS configuration and API route registration. ```typescript import { Server } from 'http'; import path from 'path'; import express, { NextFunction, Request, Response } from 'express'; import cors from 'cors'; import { AgentApi, CommandsApi, ContextApi, McpApi, ProjectApi, PromptApi, ProvidersApi, SettingsApi, SystemApi, TodoApi, UsageApi, MemoryApi, VoiceApi, TerminalApi, ExtensionsApi, SkillsApi, } from '@/server/rest-api'; import { AUTH_PASSWORD, AUTH_USERNAME, SERVER_PORT } from '@/constants'; import logger from '@/logger'; import { ProjectManager } from '@/project'; import { EventsHandler } from '@/events-handler'; import { Store } from '@/store'; import { isDev, isElectron } from '@/app'; import { PythonDependenciesInstaller } from '@/python-dependencies-installer'; import { createCorsOriginValidator } from '@/server/cors'; const REQUEST_TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes export class ServerController { constructor( private readonly server: Server, private readonly projectManager: ProjectManager, private readonly eventsHandler: EventsHandler, private readonly store: Store, private readonly pythonInstaller: PythonDependenciesInstaller, ) { // ... constructor implementation ... } private serverGuardMiddleware(req: Request, res: Response, next: NextFunction): void { // Always allow health check regardless of server.enabled setting // In headless mode, always allow requests regardless of server.enabled setting } private timeoutMiddleware(req: Request, res: Response, next: NextFunction): void { // Skip timeout for SSE responses (Accept: text/event-stream) } private basicAuthMiddleware(req: Request, res: Response, next: NextFunction): void { // Check if environment variables for auth are provided, which overrides settings } private setupApiRoutes(): void { // Create API router // Register all API modules // Mount the API router globally under /api } private setupCors(): void { } private init(): void { // Add server guard middleware as the first middleware // Set timeout for all requests // Add Basic Auth // Serve static renderer files in production (for browser access) // Handle SPA routing: serve index.html for non-API routes } async close(): Promise { // No need to stop server anymore - it's always attached } async startServer(): Promise { } async stopServer(): Promise { } } ``` -------------------------------- ### Subagent System Prompt Example Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/agent-mode/subagents.md Define the subagent's role, capabilities, and approach to problem-solving. This prompt guides the subagent's behavior and review process. ```markdown You are a senior code reviewer ensuring high standards of code quality and security. When invoked: 1. Run git diff to see recent changes 2. Focus on modified files 3. Begin review immediately Review checklist: - Code is simple and readable - Functions and variables are well-named - No duplicated code - Proper error handling - No exposed secrets or API keys - Input validation implemented - Good test coverage - Performance considerations addressed ``` -------------------------------- ### Get current Python library version Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Retrieves the installed version of a Python library within the virtual environment. Returns null if the library is not found or an error occurs. ```typescript /** * Gets the currently installed version of a Python library within the virtual environment. */ export const getCurrentPythonLibVersion = async (library: string): Promise => { // Implementation details... }; ``` -------------------------------- ### Call AiderDesk REST API to Get Context Files Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/advanced/docker.md Example of how to use curl to make a POST request to the AiderDesk REST API to retrieve context files for a given project directory. Ensure AiderDesk is running and accessible. ```bash curl -X POST http://localhost:24337/api/get-context-files \ -H "Content-Type: application/json" \ -d '{"projectDir": "/projects/my-app"}' ``` -------------------------------- ### Install Go Language Server (gopls) Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/lsp/README.md Install the Go language server using the go command. This provides LSP features for Go development. ```bash go install golang.org/x/tools/gopls@latest ``` -------------------------------- ### Example .aider.conf.yml Configuration Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/configuration/aider-configuration.md This example shows how to configure Aider settings using a YAML configuration file. It specifies the AI model, weak model, edit format, and disables auto-commits. ```yaml model: openai/gpt-4.1 weak-model: openai/gpt-4o-mini edit-format: diff auto-commits: false ``` -------------------------------- ### installExtension Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Installs an extension from a specified repository URL. ```APIDOC ## installExtension ### Description Installs an extension identified by its ID from a given repository URL. ### Method `installExtension(extensionId: string, repositoryUrl: string): Promise` ### Parameters #### Path Parameters - **extensionId** (string) - Required - The identifier of the extension to install. - **repositoryUrl** (string) - Required - The URL of the repository where the extension is located. ``` -------------------------------- ### Install uv on macOS and Linux Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/chunkhound-on-semantic-search-tool/README.md Installs the uv package manager using a curl script. Ensure you have curl installed. ```bash curl -LsSf https://astral.sh/uv/install.sh | sh ``` -------------------------------- ### Command with Options Example Source: https://github.com/hotovo/aider-desk/blob/main/resources/skills/extension-creator/references/command-definition.md Demonstrates a command that accepts predefined options for an argument. The 'theme' command uses options for theme names. ```typescript const THEME_COMMAND: CommandDefinition = { name: 'theme', description: 'Switch the AiderDesk theme', arguments: [ { description: 'Name of the theme to apply', required: true, options: ['dark', 'light', 'ocean', 'forest'] } ], async execute(args: string[], context: ExtensionContext): Promise { const taskContext = context.getTaskContext(); const themeName = args[0]; if (!themeName) { taskContext?.addLogMessage('warning', 'Usage: /theme '); return; } await context.updateSettings({ theme: themeName }); taskContext?.addLogMessage('info', `Theme changed to: ${themeName}`); } }; ``` -------------------------------- ### Custom Install Location for RTK Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/rtk/README.md Installs RTK to a specified directory, such as /usr/local/bin, by setting the RTK_INSTALL_DIR environment variable before running the install script. ```bash RTK_INSTALL_DIR=/usr/local/bin curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/master/install.sh | sh ``` -------------------------------- ### RTK Extension Command Examples Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/rtk/README.md Demonstrates the usage of RTK extension commands for managing its status and behavior. ```bash > /rtk status RTK status: Enabled: ✓ yes RTK binary: ✓ installed jq binary: ✓ installed Rewrite script: ✓ found ``` ```bash > /rtk off ✓ RTK command rewriting disabled ``` ```bash > /rtk on ✓ RTK command rewriting enabled ``` -------------------------------- ### Perform Application Startup Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Performs initial startup checks and initiates background Python dependency installation. This function returns quickly, allowing the application to proceed while installation occurs asynchronously via `PythonDependenciesInstaller`. ```typescript /** * Performs a fast startup check and kicks off background Python dependency installation. * * This function no longer blocks on pip installs. It returns quickly after checking * whether setup has been completed previously. The actual installation happens * asynchronously in the PythonDependenciesInstaller singleton. * * @param pythonInstaller The singleton PythonDependenciesInstaller instance * @param updateProgress Optional callback for progress UI (splash screen etc.) * @returns true if the app should proceed (always true now — errors are handled async) */ export const performStartUp = async (pythonInstaller: PythonDependenciesInstaller, updateProgress?: UpdateProgressFunction): Promise => ``` -------------------------------- ### Simple Command Example Source: https://github.com/hotovo/aider-desk/blob/main/resources/skills/extension-creator/references/command-definition.md Example of a basic command definition. This command 'hello' takes one optional argument for a name and logs a greeting. ```typescript const HELLO_COMMAND: CommandDefinition = { name: 'hello', description: 'Say hello', arguments: [ { description: 'Name to greet', required: true } ], async execute(args: string[], context: ExtensionContext): Promise { const taskContext = context.getTaskContext(); if (!taskContext) { context.log('No task context', 'error'); return; } const name = args[0] || 'World'; taskContext.addLogMessage('info', `Hello, ${name}!`); } }; ``` -------------------------------- ### cURL: Start a Project Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/features/rest-api.md Initiates a new Aider project. Requires the project directory path. ```bash # Start a project curl -X POST http://localhost:24337/api/project/start \ -H "Content-Type: application/json" \ -d '{"projectDir": "/path/to/project"}' ``` -------------------------------- ### Multi-Argument Command Example Source: https://github.com/hotovo/aider-desk/blob/main/resources/skills/extension-creator/references/command-definition.md Illustrates a command that accepts multiple arguments. The 'config' command manages extension settings by name and value. ```typescript const CONFIG_COMMAND: CommandDefinition = { name: 'config', description: 'Manage extension settings', arguments: [ { description: 'Setting name', required: true }, { description: 'Setting value', required: false } ], async execute(args: string[], context: ExtensionContext): Promise { const taskContext = context.getTaskContext(); const [setting, value] = args; if (!setting) { // Show all settings const config = await loadConfig(); taskContext?.addLogMessage('info', `Settings:\n${JSON.stringify(config, null, 2)}`); return; } if (!value) { // Show specific setting const config = await loadConfig(); taskContext?.addLogMessage('info', `${setting}: ${config[setting]}`); return; } // Update setting const config = await loadConfig(); config[setting] = value; await saveConfig(config); taskContext?.addLogMessage('info', `${setting} updated to: ${value}`); } }; ``` -------------------------------- ### Set Python Installation Status Source: https://github.com/hotovo/aider-desk/blob/main/llms.txt Internal method to set the current status of the Python dependency installation. This is typically called by internal methods during the installation process. ```typescript private setStatus(status: PythonInstallStatus): void ``` -------------------------------- ### Project-Specific Prompt Customization Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/extensions/events.md Example of adding project-specific guidelines to the 'init-project' prompt. It retrieves the project directory and appends custom instructions. ```typescript async onPromptTemplate(event: PromptTemplateEvent, context: ExtensionContext) { const projectDir = context.getProjectDir(); // Add project-specific context to init-project prompt if (event.name === 'init-project') { const customInstructions = ` ## Project-Specific Guidelines This project uses TypeScript with strict mode enabled. Always prefer type-safe implementations over any types. `; return { prompt: event.prompt + customInstructions, }; } } ``` -------------------------------- ### Install Specific Extension by ID via CLI Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/extensions/installation.md Install a particular extension using its unique ID. Add the --global flag to install it globally. ```bash npx @aiderdesk/extensions install sound-notification ``` ```bash npx @aiderdesk/extensions install sound-notification --global ``` -------------------------------- ### Run Aider-Desk in Development Mode Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/intro.md Start the aider-desk application in development mode using npm. ```bash # Run in development mode $ npm run dev ``` -------------------------------- ### Manually Install Folder-Based Extension Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/extensions/extensions-gallery.md Manually install a folder-based extension by cloning the repository, copying the extension folder, installing its dependencies, and cleaning up temporary files. ```bash git clone --depth 1 https://github.com/hotovo/aider-desk temp-aider cp -r temp-aider/packages/extensions/extensions/sandbox ~/.aider-desk/extensions/ cd ~/.aider-desk/extensions/sandbox npm install rm -rf temp-aider ``` -------------------------------- ### Install Project Extensions Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/extensions/installation.md Use these commands to install extensions that are specific to the current project. The directory is created within the project's root. ```bash # Create the directory in your project mkdir -p .aider-desk/extensions # Copy your extension cp my-extension.ts .aider-desk/extensions/ # For folder-based extensions cp -r my-complex-extension .aider-desk/extensions/ ``` -------------------------------- ### Run Aider Desk with Single Project Setup Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/advanced/docker.md Use this command to run Aider Desk with a single project mounted and automatically opened via an environment variable. Ensure the local project path and Aider Desk data path are correctly specified. ```bash docker run -d \ --name aiderdesk \ -p 24337:24337 \ -v ~/aiderdesk-data:/app/data \ -v ~/.aider-desk:/root/.aider-desk \ -v ~/my-project:/workspace/project \ -e AIDER_DESK_PROJECTS="/workspace/project" \ ghcr.io/hotovo/aider-desk:latest ``` -------------------------------- ### Configure AiderDesk MCP Server with Global Install Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/features/aider-mcp-server.md Use this JSON configuration in your MCP client when AiderDesk MCP server is installed globally. The command is changed to reflect the globally installed executable. ```json { "mcpServers": { "aider-desk": { "command": "aider-desk-mcp-server", "args": ["/path/to/project"], "env": { "AIDER_DESK_API_BASE_URL": "http://localhost:24337/api" } } } } ``` -------------------------------- ### Install Lua Language Server Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/lsp/README.md Install the Lua language server from its GitHub repository or via a package manager. This enables LSP support for Lua. ```bash # Install from https://github.com/LuaLS/lua-language-server # Or via package manager (brew, scoop, etc.) ``` -------------------------------- ### Install jq on macOS Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/rtk/README.md Installs the jq JSON processor using Homebrew on macOS. ```bash brew install jq ``` -------------------------------- ### Install Questions Extension Manually Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/questions/README.md Manually copy the questions extension folder to your AiderDesk extensions directory. Choose either project-level or global installation. ```bash # For project-level installation cp -r questions/ /path/to/your/project/.aider-desk/extensions/ # For global installation cp -r questions/ ~/.aider-desk/extensions/ ``` -------------------------------- ### Verify RTK Installation Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/rtk/README.md Run these commands to confirm that RTK has been installed correctly and is accessible. ```bash rtk --version ``` ```bash rtk gain # Must show token savings stats ``` -------------------------------- ### Example Tool Definition Source: https://github.com/hotovo/aider-desk/blob/main/docs-site/docs/extensions/api-reference.md An example demonstrating how to define a custom tool named 'run-linter' with an input schema for optional 'fix' and 'files' parameters. ```typescript const myTool: ToolDefinition = { name: 'run-linter', description: 'Run the project linter', inputSchema: z.object({ fix: z.boolean().optional().describe('Auto-fix issues'), files: z.array(z.string()).optional().describe('Files to lint'), }), async execute(input, signal, context) { // Your implementation return { results: '...' }; }, }; ``` -------------------------------- ### Submitted Answers Example Source: https://github.com/hotovo/aider-desk/blob/main/packages/extensions/extensions/questions/README.md Example of how questions and their corresponding answers are formatted upon submission. ```plaintext Q1: What is the purpose of this function? A1: The function validates user input before processing. Q2: How does it handle errors? A2: It throws a ValidationError with detailed messages. Q3: What are the input parameters? A3: It accepts a data object and an optional config object. Q4: Is there any documentation? A4: Yes, see the JSDoc comments in the source file. ```