### Clone and Install Automaker (Bash) Source: https://github.com/automaker-org/automaker/blob/main/README.md Clones the Automaker repository from GitHub, navigates into the directory, and installs project dependencies using npm. This is the initial setup step for running the project. ```bash git clone https://github.com/AutoMaker-Org/automaker.git cd automaker npm install ``` -------------------------------- ### Setup Test State with Utilities (TypeScript) Source: https://github.com/automaker-org/automaker/blob/main/apps/ui/tests/e2e-testing-guide.md Demonstrates using provided utility functions to set up localStorage state for Playwright tests. These utilities abstract away store structure and version details for better maintainability. It shows examples for setting up the welcome view with and without recent projects, and for setting up a real project. ```typescript import { setupWelcomeView, setupRealProject } from './utils'; // Show welcome view with workspace directory configured await setupWelcomeView(page, { workspaceDir: TEST_TEMP_DIR }); // Show welcome view with recent projects await setupWelcomeView(page, { workspaceDir: TEST_TEMP_DIR, recentProjects: [ { id: 'project-123', name: 'My Project', path: '/path/to/project', lastOpened: new Date().toISOString(), }, ], }); // Set up a real project on the filesystem await setupRealProject(page, projectPath, projectName, { setAsCurrent: true, // Opens board view (default) }); ``` -------------------------------- ### Feature Development Workflow Example Source: https://github.com/automaker-org/automaker/blob/main/apps/ui/docs/SESSION_MANAGEMENT.md Illustrates the typical steps involved in developing a new feature using Automaker sessions, from creation to completion and archiving. ```text 1. Create: "Feature: User notifications" 2. Agent: Design the notification system 3. Agent: Implement backend 4. Next.js restarts (agent continues) 5. Agent: Implement frontend 6. Agent: Add tests 7. Complete & Archive ``` -------------------------------- ### Start Development Server Source: https://github.com/automaker-org/automaker/blob/main/CONTRIBUTING.md Starts the development server for Automaker. Provides options for running in interactive mode, browser mode, or as a desktop application. ```bash npm run dev # Interactive launcher - choose mode npm run dev:web # Browser mode (web interface) npm run dev:electron # Desktop app mode ``` -------------------------------- ### Refactoring Workflow Example Source: https://github.com/automaker-org/automaker/blob/main/apps/ui/docs/SESSION_MANAGEMENT.md Outlines the steps for refactoring code using Automaker, focusing on analysis, redesign, implementation, and testing. ```text 1. Create: "Refactor: API error handling" 2. Agent: Analyze current implementation 3. Agent: Design new approach 4. Agent: Refactor service layer 5. Next.js restarts (agent continues) 6. Agent: Refactor controller layer 7. Agent: Update tests 8. Complete & Archive ``` -------------------------------- ### Unit Test for Installation Detection (TypeScript) Source: https://github.com/automaker-org/automaker/blob/main/docs/server/providers.md Example unit test for a provider's `detectInstallation` method, verifying that it correctly identifies the installation status and method. ```typescript describe('ClaudeProvider', () => { it('should detect installation', async () => { const provider = new ClaudeProvider(); const status = await provider.detectInstallation(); expect(status.installed).toBe(true); expect(status.method).toBe('sdk'); }); // ... other tests ``` -------------------------------- ### Automaker Package Build and Installation Commands Source: https://github.com/automaker-org/automaker/blob/main/docs/llm-shared-packages.md Provides essential commands for building all Automaker packages and installing dependencies. It covers the workspace-level build command 'npm run build:packages' and the root-level installation command 'npm install', which handles installing and linking workspace packages. ```bash # Build all packages from workspace npm run build:packages # Or from root npm install # Installs and links workspace packages ``` -------------------------------- ### Start Electron Desktop App in Development (Bash) Source: https://github.com/automaker-org/automaker/blob/main/README.md Starts the Electron desktop application for Automaker in development mode. Includes options for debugging with DevTools open and specific configurations for WSL environments. ```bash # Standard development mode npm run dev:electron # With DevTools open automatically npm run dev:electron:debug # For WSL (Windows Subsystem for Linux) npm run dev:electron:wsl # For WSL with GPU acceleration npm run dev:electron:wsl:gpu ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/automaker-org/automaker/blob/main/CONTRIBUTING.md Installs all the necessary Node.js dependencies required for the Automaker project using npm. This command should be run after cloning the repository. ```bash npm install ``` -------------------------------- ### Bug Fixing Workflow Example Source: https://github.com/automaker-org/automaker/blob/main/apps/ui/docs/SESSION_MANAGEMENT.md Demonstrates the process of addressing bugs within Automaker, including investigation, fixing, and adding regression tests. ```text 1. Create: "Bug: Payment processing timeout" 2. Agent: Investigate the issue 3. Agent: Identify root cause 4. Agent: Implement fix 5. Agent: Add regression test 6. Complete & Archive ``` -------------------------------- ### Install @automaker/git-utils Source: https://github.com/automaker-org/automaker/blob/main/libs/git-utils/README.md Installs the @automaker/git-utils package using npm. This is the first step to using the git utilities in your project. ```bash npm install @automaker/git-utils ``` -------------------------------- ### Complete Git Workflow Example Source: https://github.com/automaker-org/automaker/blob/main/docs/checkout-branch-pr.md A consolidated example demonstrating the typical sequence of Git commands for creating a branch, staging, committing, pushing, and creating a pull request. ```bash # 1. Check status git status # 2. Create branch git checkout -b feature/add-new-component # 3. Make your changes (edit files, etc.) # 4. Stage changes git add -A # 5. Commit git commit -m "feat: add new user dashboard component" # 6. Push git push -u origin feature/add-new-component # 7. Create PR gh pr create --title "feat: add new user dashboard component" --body "Implements new dashboard component with user statistics and activity feed." ``` -------------------------------- ### Formatted Prompt Structure Example Source: https://github.com/automaker-org/automaker/blob/main/docs/context-files-pattern.md Provides an example of the markdown structure generated for the agent's system prompt. It includes a header, details for each context file (name, path, purpose, content), and a reminder for the agent to follow the specified rules and conventions. ```markdown # Project Context Files The following context files provide project-specific rules, conventions, and guidelines. Each file serves a specific purpose - use the description to understand when to reference it. If you need more details about a context file, you can read the full file at the path provided. **IMPORTANT**: You MUST follow the rules and conventions specified in these files. - Follow ALL commands exactly as shown (e.g., if the project uses `pnpm`, NEVER use `npm` or `npx`) - Follow ALL coding conventions, commit message formats, and architectural patterns specified - Reference these rules before running ANY shell commands or making commits --- ## CLAUDE.md **Path:** `/path/to/project/.automaker/context/CLAUDE.md` **Purpose:** Project-specific rules including package manager, commit conventions, and architectural patterns [File content here] --- ## CODE_QUALITY.md **Path:** `/path/to/project/.automaker/context/CODE_QUALITY.md` **Purpose:** Code quality standards, testing requirements, and linting rules [File content here] --- **REMINDER**: Before taking any action, verify you are following the conventions specified above. ``` -------------------------------- ### Example Route Migration: Before and After Source: https://github.com/automaker-org/automaker/blob/main/docs/server/route-organization.md Illustrates the transformation of a monolithic route file into a more organized structure. The 'Before' example shows a large, combined route file, while the 'After' example demonstrates the separation into route handlers, business logic, and an index file for route registration. ```typescript // routes.ts - 500+ lines router.post('/create', async (req, res) => { // 200 lines of logic }); router.post('/generate', async (req, res) => { // 200 lines of similar logic }); ``` ```typescript // routes/app-spec/index.ts export function createSpecRegenerationRoutes(events) { const router = Router(); router.post("/create", createCreateHandler(events)); router.post("/generate", createGenerateHandler(events)); return router; } // routes/app-spec/routes/create.ts - 96 lines export function createCreateHandler(events) { return async (req, res) => { // Thin handler, calls generateSpec() }; } // routes/app-spec/generate-spec.ts - 204 lines export async function generateSpec(...) // Business logic extracted here } ``` -------------------------------- ### Build Automaker from Source (Bash) Source: https://github.com/automaker-org/automaker/blob/main/docs/install-fedora.md Outlines the steps to clone the Automaker repository, install dependencies, and build the application packages from source code. It covers cloning, npm installation, and specific build commands for Electron Linux packages. ```bash # Clone repository git clone https://github.com/AutoMaker-Org/automaker.git cd automaker # Install dependencies npm install # Build packages npm run build:packages # Build Linux packages npm run build:electron:linux # Packages in: apps/ui/release/ ls apps/ui/release/*.rpm ``` -------------------------------- ### Install @automaker/dependency-resolver Source: https://github.com/automaker-org/automaker/blob/main/libs/dependency-resolver/README.md Installs the dependency resolver package using npm. ```bash npm install @automaker/dependency-resolver ``` -------------------------------- ### Install Build Prerequisites (Bash) Source: https://github.com/automaker-org/automaker/blob/main/docs/install-fedora.md Installs the necessary build tools and dependencies for compiling Automaker from source on Fedora and RHEL systems. This includes Node.js, npm, and Git. ```bash # Fedora sudo dnf install nodejs npm git # RHEL (enable EPEL first) sudo dnf install epel-release sudo dnf install nodejs npm git ``` -------------------------------- ### Usage Example: Execute Prompt with Images Source: https://github.com/automaker-org/automaker/blob/main/libs/utils/README.md An example demonstrating the integration of logger, error classification, and prompt building with images. It shows a practical scenario of creating a prompt with image references and handling potential errors during the process. ```typescript import { createLogger, classifyError, buildPromptWithImages } from '@automaker/utils'; const logger = createLogger('FeatureExecutor'); async function executeWithImages(prompt: string, images: string[]) { try { logger.info('Building prompt with images'); const result = await buildPromptWithImages({ basePrompt: prompt, imagePaths: images, basePath: process.cwd(), }); logger.debug('Prompt built successfully', { imageCount: result.images.length }); return result; } catch (error) { const errorInfo = classifyError(error); logger.error('Failed to build prompt:', errorInfo.message); throw error; } } ``` -------------------------------- ### Install Automaker RPM Package (Bash) Source: https://github.com/automaker-org/automaker/blob/main/README.md Installs the Automaker RPM package on Fedora, RHEL, or CentOS systems. This involves downloading the RPM file and then using `dnf` or `yum` for installation. ```bash # Download the RPM package wget https://github.com/AutoMaker-Org/automaker/releases/latest/download/Automaker--x86_64.rpm # Install with dnf (Fedora) sudo dnf install ./Automaker--x86_64.rpm # Or with yum (RHEL/CentOS) sudo yum localinstall ./Automaker--x86_64.rpm ``` -------------------------------- ### Codex MCP Server Configuration Example Source: https://github.com/automaker-org/automaker/blob/main/docs/server/providers.md An example TOML configuration file for an MCP server used by the Codex provider. It defines the server command, arguments, and the specific tools it can execute. ```toml [mcp_servers.automaker-tools] command = "node" args = ["/path/to/mcp-server.js"] enabled_tools = ["UpdateFeatureStatus"] ``` -------------------------------- ### Complete Docker Compose Override Example Source: https://github.com/automaker-org/automaker/blob/main/README.md A comprehensive example of a `docker-compose.override.yml` file that includes mounting project directories, Claude CLI configuration, GitHub CLI configuration, and setting the GH_TOKEN environment variable. This configuration enables full functionality within the Dockerized Automaker environment. ```yaml services: server: volumes: # Your projects - /path/to/project1:/projects/project1 - /path/to/project2:/projects/project2 # Authentication configs - ~/.claude:/home/automaker/.claude - ~/.config/gh:/home/automaker/.config/gh - ~/.gitconfig:/home/automaker/.gitconfig:ro environment: - GH_TOKEN=${GH_TOKEN} ``` -------------------------------- ### Retrieve Few-Shot Examples for an Enhancement Mode Source: https://github.com/automaker-org/automaker/blob/main/libs/prompts/README.md Fetches the few-shot examples associated with a specific enhancement mode. The `getExamples` function returns an array of objects, where each object contains an `input` and `output` pair used for few-shot learning. ```typescript import { getExamples } from '@automaker/prompts'; const examples = getExamples('simplify'); // Returns array of { input, output } pairs ``` -------------------------------- ### Git Status Text Examples Source: https://github.com/automaker-org/automaker/blob/main/libs/git-utils/README.md Provides examples of human-readable status texts for files, as derived from git status. These texts offer a more descriptive representation of a file's state. ```text Status Text Examples: - "Modified" - File has changes - "Added" - New file in staging - "Deleted" - File removed - "Renamed" - File renamed - "Untracked" - New file not in git - "Modified (staged), Modified (unstaged)" - Changes in both areas ``` -------------------------------- ### Start Automaker in Development Mode (Bash) Source: https://github.com/automaker-org/automaker/blob/main/README.md Starts the Automaker application in development mode. This command enables live reload and hot module replacement for a fast development experience. It prompts the user to choose between a Web Application or a Desktop Application. ```bash npm run dev ``` -------------------------------- ### Install @automaker/platform Source: https://github.com/automaker-org/automaker/blob/main/libs/platform/README.md Installs the @automaker/platform package using npm. This is the first step to using the platform-specific utilities. ```bash npm install @automaker/platform ``` -------------------------------- ### Build User Prompt with Examples Source: https://github.com/automaker-org/automaker/blob/main/libs/prompts/README.md Constructs the user-facing part of the prompt, incorporating few-shot examples relevant to the specified enhancement mode along with the user's raw description. The `buildUserPrompt` function helps format the input for the AI model. ```typescript import { buildUserPrompt } from '@automaker/prompts'; const userPrompt = buildUserPrompt('add login page', 'improve'); // Includes examples + user's description ``` -------------------------------- ### Install @automaker/prompts Package Source: https://github.com/automaker-org/automaker/blob/main/libs/prompts/README.md Installs the @automaker/prompts package using npm. This is the first step to using the prompt templates and utility functions provided by the library. ```bash npm install @automaker/prompts ``` -------------------------------- ### Usage Example: Prepare Feature Execution - TypeScript Source: https://github.com/automaker-org/automaker/blob/main/libs/model-resolver/README.md Provides a practical example of using `resolveModelString` and `DEFAULT_MODELS` within a function to prepare feature execution. It demonstrates resolving a model from a feature's configuration or falling back to a default, then logging the selected model. ```typescript import { resolveModelString, DEFAULT_MODELS } from '@automaker/model-resolver'; import type { Feature } from '@automaker/types'; function prepareFeatureExecution(feature: Feature) { // Resolve model from feature or use default const model = resolveModelString(feature.model, DEFAULT_MODELS.autoMode); console.log(`Executing feature with model: ${model}`); return { featureId: feature.id, model, // ... other options }; } // Example usage const feature: Feature = { id: 'auth-feature', category: 'backend', description: 'Add authentication', model: 'opus', // User-friendly alias }; prepareFeatureExecution(feature); // Output: Executing feature with model: claude-opus-4-5-20251101 ``` -------------------------------- ### Project Overrides Storage Example (JSON) Source: https://github.com/automaker-org/automaker/blob/main/docs/UNIFIED_API_KEY_PROFILES.md Illustrates how project-specific phase model overrides are stored in the `.automaker/settings.json` file. This JSON structure shows an example of overriding the 'enhancementModel' with a specific provider, model, and thinking level. ```json { "phaseModelOverrides": { "enhancementModel": { "providerId": "provider-uuid", "model": "GLM-4.5-Air", "thinkingLevel": "none" } } } ``` -------------------------------- ### Manage AutoMaker Platform Structure with @automaker/platform Source: https://github.com/automaker-org/automaker/blob/main/docs/llm-shared-packages.md Import functions from the @automaker/platform package to interact with AutoMaker's directory structure and manage subprocesses. Examples include getting feature directories and ensuring the .automaker directory exists. ```typescript import { getFeatureDir, ensureAutomakerDir } from '@automaker/platform'; ``` -------------------------------- ### Generate AI Prompts with @automaker/prompts Source: https://github.com/automaker-org/automaker/blob/main/docs/llm-shared-packages.md Use the @automaker/prompts package to generate AI prompt templates for various enhancement modes. This example shows how to get enhancement prompts and check mode validity before calling an AI model. ```typescript import { getEnhancementPrompt, isValidEnhancementMode } from '@automaker/prompts'; if (isValidEnhancementMode('improve')) { const { systemPrompt, userPrompt } = getEnhancementPrompt('improve', description); const result = await callClaude(systemPrompt, userPrompt); } ``` -------------------------------- ### Create and Checkout Git Branches Source: https://github.com/automaker-org/automaker/blob/main/CONTRIBUTING.md Demonstrates how to create and switch to new Git branches using descriptive names based on the project's conventions. It shows examples for creating a feature branch and a fix branch that includes an issue number. ```bash # Create and checkout a new feature branch git checkout -b feature/add-dark-mode # Create a fix branch with issue reference git checkout -b fix/456-resolve-login-error ``` -------------------------------- ### Example Usage: Get Project Changes Source: https://github.com/automaker-org/automaker/blob/main/libs/git-utils/README.md An example function demonstrating how to use `@automaker/git-utils` to check if a path is a git repository, retrieve repository diffs, and display changes grouped by status. ```typescript import { isGitRepo, getGitRepositoryDiffs, parseGitStatus } from '@automaker/git-utils'; async function getProjectChanges(projectPath: string) { const isRepo = await isGitRepo(projectPath); if (!isRepo) { console.log('Not a git repository, analyzing all files...'); } const result = await getGitRepositoryDiffs(projectPath); if (!result.hasChanges) { console.log('No changes detected'); return; } console.log(`Found ${result.files.length} changed files:\n`); // Group by status const byStatus = result.files.reduce( (acc, file) => { acc[file.statusText] = acc[file.statusText] || []; acc[file.statusText].push(file.path); return acc; }, {} as Record); Object.entries(byStatus).forEach(([status, paths]) => { console.log(`${status}:`); paths.forEach((path) => console.log(` - ${path}`)); }); return result.diff; } // Example call: // getProjectChanges('/path/to/your/project'); ``` -------------------------------- ### Start Web Application in Development (Bash) Source: https://github.com/automaker-org/automaker/blob/main/README.md Runs the Automaker application in a web browser using Vite. Access the application at http://localhost:3007. This mode is suitable for testing the web interface. ```bash npm run dev:web ``` -------------------------------- ### Archive/Unarchive Session (TypeScript) Source: https://github.com/automaker-org/automaker/blob/main/apps/ui/docs/SESSION_MANAGEMENT.md Provides examples for archiving and unarchiving a specific session using its ID. ```typescript await window.electronAPI.sessions.archive(sessionId); await window.electronAPI.sessions.unarchive(sessionId); ``` -------------------------------- ### Example Pull Request Workflow Source: https://github.com/automaker-org/automaker/blob/main/CONTRIBUTING.md Demonstrates a complete workflow for contributing changes: fetching upstream, identifying the latest RC branch, creating a feature branch from it, making commits, and pushing to the fork. ```bash # 1. Fetch latest changes git fetch upstream # 2. Check for RC branches git branch -r | grep rc # Output: upstream/v0.11.0rc # 3. Create your branch from the RC git checkout -b feature/add-dark-mode upstream/v0.11.0rc # 4. Make your changes and commit git commit -m "feat: Add dark mode support" # 5. Push to your fork git push origin feature/add-dark-mode ``` -------------------------------- ### Example: Adding Hypothetical 'cursor-turbo' Model (TypeScript) Source: https://github.com/automaker-org/automaker/blob/main/docs/add-new-cursor-model.md This comprehensive example illustrates the complete process of adding a hypothetical 'cursor-turbo' model. It includes updating the `CursorModelId` type and the `CURSOR_MODEL_MAP` with the new model's configuration in `libs/types/src/cursor-models.ts`. This serves as a practical reference for implementing the steps outlined in the guide. ```typescript // In libs/types/src/cursor-models.ts // Step 1: Add to type export type CursorModelId = | 'auto' | 'claude-sonnet-4' // ... other models ... | 'cursor-turbo'; // New model // Step 2: Add to map export const CURSOR_MODEL_MAP: Record = { // ... existing entries ... 'cursor-turbo': { id: 'cursor-turbo', label: 'Cursor Turbo', description: 'Optimized for speed with good quality balance', hasThinking: false, supportsVision: false, }, }; ``` -------------------------------- ### Prepare and Rebase Branch for PR Source: https://github.com/automaker-org/automaker/blob/main/CONTRIBUTING.md Shows how to fetch the latest changes from the upstream repository and rebase the current branch onto the latest release candidate branch to ensure the PR is up-to-date. ```bash # Fetch latest changes from upstream git fetch upstream # Rebase your branch on the current RC branch (if needed) git rebase upstream/v0.11.0rc # Use the current RC branch name ``` -------------------------------- ### Get Complete Enhancement Prompt (System + User) Source: https://github.com/automaker-org/automaker/blob/main/libs/prompts/README.md Generates a complete AI prompt, including both system instructions and the user's input formatted with few-shot examples, for a specified enhancement mode and user description. It returns an object containing `systemPrompt` and `userPrompt`. ```typescript import { getEnhancementPrompt } from '@automaker/prompts'; const result = getEnhancementPrompt('improve', 'make app faster'); console.log(result.systemPrompt); // System instructions for improve mode console.log(result.userPrompt); // User prompt with examples and input ``` -------------------------------- ### Apply Appropriate Timeouts for Playwright Actions (TypeScript) Source: https://github.com/automaker-org/automaker/blob/main/apps/ui/tests/e2e-testing-guide.md Provides guidance on setting appropriate timeouts for different Playwright actions, categorizing them into quick UI updates, page loads/navigation, and asynchronous operations. Examples show how to apply these timeouts using `expect().toBeVisible()` with the `timeout` option. ```typescript // Fast UI element await expect(button).toBeVisible(); // Page load await expect(page.locator('[data-testid="board-view"]')).toBeVisible({ timeout: 10000 }); // Async operation completion await expect(page.locator('[data-testid="board-view"]')).toBeVisible({ timeout: 15000 }); ``` -------------------------------- ### Adding New Provider: CursorProvider Implementation (TypeScript) Source: https://github.com/automaker-org/automaker/blob/main/docs/server/providers.md This TypeScript code defines a `CursorProvider` class that extends `BaseProvider`. It implements methods for getting the provider name, executing queries, detecting installation status, listing available models, and specifying supported features. This serves as a template for adding new AI providers to the system. ```typescript import { BaseProvider } from './base-provider.js'; import type { ExecuteOptions, ProviderMessage, InstallationStatus, ModelDefinition, } from './types.js'; export class CursorProvider extends BaseProvider { getName(): string { return 'cursor'; } async *executeQuery(options: ExecuteOptions): AsyncGenerator { // Implementation here // 1. Spawn cursor CLI or use SDK // 2. Convert output to ProviderMessage format // 3. Yield messages } async detectInstallation(): Promise { // Check if cursor is installed // Return { installed: boolean, path?: string, version?: string } } getAvailableModels(): ModelDefinition[] { return [ { id: 'cursor-premium', name: 'Cursor Premium', modelString: 'cursor-premium', provider: 'cursor', description: "Cursor's premium model", contextWindow: 200000, maxOutputTokens: 8192, supportsVision: true, supportsTools: true, tier: 'premium', default: true, }, ]; } supportsFeature(feature: string): boolean { const supportedFeatures = ['tools', 'text', 'vision']; return supportedFeatures.includes(feature); } } ``` -------------------------------- ### Run All Tests Locally with npm Source: https://github.com/automaker-org/automaker/blob/main/CONTRIBUTING.md Before submitting a Pull Request, it's essential to run the full test suite locally. This command executes all E2E and unit tests. ```bash npm run test:all ``` -------------------------------- ### Define Base Provider Interface for AI Models Source: https://github.com/automaker-org/automaker/blob/main/docs/server/providers.md The BaseProvider abstract class defines the contract that all AI model providers must adhere to. It includes methods for getting the provider name, executing queries, detecting installation status, and listing available models. Providers extend this class to ensure consistent behavior and facilitate clean abstraction. ```typescript export abstract class BaseProvider { protected config: ProviderConfig; constructor(config: ProviderConfig = {}) { this.config = config; } /** * Get provider name (e.g., "claude", "codex") */ abstract getName(): string; /** * Execute a query and stream responses */ abstract executeQuery(options: ExecuteOptions): AsyncGenerator; /** * Detect provider installation status */ abstract detectInstallation(): Promise; /** * Get available models for this provider */ abstract getAvailableModels(): ModelDefinition[]; /** * Check if provider supports a specific feature (optional) */ supportsFeature(feature: string): boolean { return false; } } ``` -------------------------------- ### Adding New Provider: Update Provider Factory Routing (TypeScript) Source: https://github.com/automaker-org/automaker/blob/main/docs/server/providers.md This TypeScript code snippet shows how to update the `ProviderFactory` to include a new provider, `CursorProvider`. It adds a new condition to the `getProviderForModel` method to route requests for models starting with 'cursor-' to the `CursorProvider`. It also updates the `checkAllProviders` method to include the installation status check for the new provider. ```typescript import { CursorProvider } from "./cursor-provider.js"; static getProviderForModel(modelId: string): BaseProvider { const lowerModel = modelId.toLowerCase(); // Cursor models if (lowerModel.startsWith("cursor-")) { return new CursorProvider(); } // ... existing routing } static async checkAllProviders() { const cursor = new CursorProvider(); return { claude: await claude.detectInstallation(), codex: await codex.detectInstallation(), cursor: await cursor.detectInstallation(), // NEW }; } ``` -------------------------------- ### Install Automaker RPM from URL Source: https://github.com/automaker-org/automaker/blob/main/docs/install-fedora.md Installs the Automaker RPM package directly from a URL on Fedora or RHEL/CentOS systems. This avoids the need to manually download the RPM file. ```bash # Replace v0.11.0 with the actual latest version sudo dnf install https://github.com/AutoMaker-Org/automaker/releases/download/v0.11.0/Automaker-0.11.0-x86_64.rpm ``` ```bash # Replace v0.11.0 with the actual latest version sudo yum install https://github.com/AutoMaker-Org/automaker/releases/download/v0.11.0/Automaker-0.11.0-x86_64.rpm ``` -------------------------------- ### Common Automaker Development Commands Source: https://github.com/automaker-org/automaker/blob/main/CONTRIBUTING.md A list of common npm scripts available for Automaker development, including running the development server, building packages and apps, linting, formatting, and running tests. ```bash # Development Server npm run dev npm run dev:web npm run dev:electron # Building npm run build npm run build:packages # Linting and Formatting npm run lint npm run format npm run format:check # Testing npm run test npm run test:server npm run test:packages npm run test:all ``` -------------------------------- ### Install Missing Dependencies on RHEL/CentOS Source: https://github.com/automaker-org/automaker/blob/main/docs/install-fedora.md Installs common dependencies required by Automaker on RHEL/CentOS systems using the dnf package manager. It includes enabling the EPEL repository if necessary. ```bash sudo dnf install epel-release sudo dnf install gtk3 libnotify nss libXScrnSaver libXtst xdg-utils at-spi2-core libuuid ``` -------------------------------- ### Install Missing Dependencies on Fedora Source: https://github.com/automaker-org/automaker/blob/main/docs/install-fedora.md Installs common dependencies required by Automaker on Fedora systems using the dnf package manager. This command lists the necessary libraries and utilities. ```bash sudo dnf install gtk3 libnotify nss libXScrnSaver libXtst xdg-utils at-spi2-core libuuid ``` -------------------------------- ### Build Prompts with Image References Source: https://github.com/automaker-org/automaker/blob/main/libs/utils/README.md Demonstrates the use of `buildPromptWithImages` to construct prompts that include image data, specifically designed for use with AI models like Claude. It takes a base prompt and image paths, returning the formatted prompt and image data. ```typescript import { buildPromptWithImages } from '@automaker/utils'; const result = await buildPromptWithImages({ basePrompt: 'Analyze this screenshot', imagePaths: ['/path/to/screenshot.png'], basePath: '/project/path', }); console.log(result.prompt); // Prompt with image references console.log(result.images); // Image data for Claude ``` -------------------------------- ### Check Automaker Installation Status Source: https://github.com/automaker-org/automaker/blob/main/docs/install-fedora.md Verifies the installation of the Automaker package using rpm commands. 'rpm -qi' shows package information, and 'rpm -V' verifies package integrity. ```bash rpm -qi automaker ``` ```bash rpm -V automaker ``` -------------------------------- ### Install Automaker RPM using dnf/yum Source: https://github.com/automaker-org/automaker/blob/main/docs/install-fedora.md Installs the Automaker RPM package using the dnf package manager on Fedora or yum on RHEL/CentOS. This method requires downloading the RPM file first. ```bash sudo dnf install ./Automaker--x86_64.rpm ``` ```bash sudo yum localinstall ./Automaker--x86_64.rpm ``` -------------------------------- ### Build Automaker for Web Production (Bash) Source: https://github.com/automaker-org/automaker/blob/main/README.md Builds the Automaker application for web deployment using Vite. This command generates optimized static assets for production. ```bash npm run build ``` -------------------------------- ### Docker Compose for Automaker Deployment (Bash) Source: https://github.com/automaker-org/automaker/blob/main/README.md Deploys Automaker using Docker Compose. This command builds the Docker images, starts the containers in detached mode, and provides commands to view logs and stop the services. It exposes the UI at http://localhost:3007 and the API at http://localhost:3008. ```bash # Build and run with Docker Compose docker-compose up -d # Access UI at http://localhost:3007 # API at http://localhost:3008 # View logs docker-compose logs -f # Stop containers docker-compose down ``` -------------------------------- ### Quick Reference Git Commands Source: https://github.com/automaker-org/automaker/blob/main/docs/checkout-branch-pr.md A concise list of frequently used Git commands for checking status, creating branches, staging, committing, pushing, and creating pull requests via GitHub CLI. ```bash # Status check git status # Create branch git checkout -b # Stage all changes git add -A # Commit git commit -m "type: message" # Push git push -u origin # Create PR (GitHub CLI) gh pr create --title "Title" --body "Description" # View PR gh pr view # List PRs gh pr list ```