### Build Prowl from Source Source: https://github.com/neur0map/prowl/blob/main/README.md Instructions for building the Prowl project from its source code. It requires Node.js 18+, Python 3.x with setuptools, and Git. The process involves cloning the repository, installing dependencies using npm, and starting the development server. ```bash git clone https://github.com/neur0map/prowl.git cd prowl npm install npm run dev ``` -------------------------------- ### Install Setuptools for Python 3.12+ Source: https://github.com/neur0map/prowl/blob/main/README.md A command to install the 'setuptools' package using pip3. This is a workaround for potential 'distutils' errors that may occur on Python versions 3.12 and later. It ensures that the necessary build tools are available. ```bash pip3 install setuptools ``` -------------------------------- ### Prowl Impact Analysis Example (Conceptual) Source: https://github.com/neur0map/prowl/blob/main/README.md This conceptual example demonstrates how Prowl can be used to determine the potential impact of refactoring a specific component, like 'UserService'. It contrasts the traditional, token-intensive approach with Prowl's efficient method. ```text "What breaks if I refactor UserService?" Without Prowl: grep → read 30 files → trace imports → read more files Result: ~100,000 tokens, 30+ tool calls, maybe misses things With Prowl: prowl_impact("UserService", "upstream") Result: ~1,000 tokens, 1 tool call, complete answer ``` -------------------------------- ### Package Prowl for Different Platforms Source: https://github.com/neur0map/prowl/blob/main/README.md Commands to package the Prowl application for various operating systems using npm scripts. This includes creating DMG files for macOS, installers for Windows, and AppImage/deb packages for Linux. The `dist` command packages for all platforms. ```bash npm run dist:mac # macOS DMG npm run dist:win # Windows installer npm run dist:linux # Linux AppImage/deb npm run dist # All platforms ``` -------------------------------- ### Setup Embedding Pipeline for Vector Search (TypeScript) Source: https://context7.com/neur0map/prowl/llms.txt Sets up and runs an embedding pipeline using Snowflake Arctic Embed XS for semantic search. It handles model loading, node processing, and index building, providing progress updates. After setup, it performs semantic searches based on a query, k-nearest neighbors, and a distance threshold. ```typescript import { runEmbeddingPipeline, semanticSearch } from './core/embeddings/embedding-pipeline'; // Run the embedding pipeline await runEmbeddingPipeline( executeQuery, executeWithReusedStatement, (progress) => { switch (progress.phase) { case 'loading-model': console.log(`Loading model: ${progress.modelDownloadPercent}%`); break; case 'embedding': console.log(`Embedding: ${progress.nodesProcessed}/${progress.totalNodes}`); break; case 'indexing': console.log('Building HNSW index...'); break; case 'ready': console.log('Vector search ready!'); break; } } ); // Perform semantic search const results = await semanticSearch( executeQuery, "database connection pooling", 10, // k nearest neighbors 0.5 // max distance threshold ); // Results include nodeId, name, label, filePath, distance ``` -------------------------------- ### Prowl MCP Server Configuration (JSON) Source: https://github.com/neur0map/prowl/blob/main/README.md This JSON configuration snippet shows how to manually set up the Prowl MCP server within the Claude Code environment. It specifies the server type, command to execute, and arguments required to start the Prowl server. ```json { "mcpServers": { "prowl": { "type": "stdio", "command": "node", "args": ["/path/to/Prowl/dist/mcp-server.js"] } } } ``` -------------------------------- ### Prowl MCP Server Setup Source: https://context7.com/neur0map/prowl/llms.txt Configuration for connecting AI tools like Claude Code to the Prowl MCP server using stdio. ```APIDOC ## Prowl MCP Server Setup Configure Claude Code or other MCP-compatible tools to connect to Prowl's knowledge graph server. ```json // Add to ~/.claude.json { "mcpServers": { "prowl": { "type": "stdio", "command": "node", "args": ["/path/to/Prowl/dist/mcp-server.js"] } } } ``` ``` -------------------------------- ### GET /prowl/overview Source: https://context7.com/neur0map/prowl/llms.txt Retrieves a high-level map of the entire codebase, including clusters, processes, and dependencies. ```APIDOC ## GET /prowl/overview ### Description Get a high-level map of the entire codebase showing clusters (module groupings), processes (execution flows), and cross-cluster dependencies. ### Method GET ### Endpoint /prowl/overview ### Parameters #### Query Parameters - **none** ### Request Example ```typescript const overview = await callProwlApi('overview', {}); ``` ### Response #### Success Response (200) - **clusters** (array) - An array of cluster objects, each containing id, label, cohesion, symbolCount, and description. - **processes** (array) - An array of process objects, each containing id, label, type, stepCount, and communities. - **dependencies** (array) - An array of dependency objects, each containing from, to, and calls. #### Response Example ```json { "clusters": [ { "id": "comm_0", "label": "Authentication", "cohesion": 0.87, "symbolCount": 23, "description": "User authentication and session management" }, { "id": "comm_1", "label": "Database", "cohesion": 0.92, "symbolCount": 18, "description": "Database connection and query handling" } ], "processes": [ { "id": "proc_0", "label": "login → dashboard", "type": "user-flow", "stepCount": 7, "communities": ["comm_0", "comm_2"] } ], "dependencies": [ { "from": "Authentication", "to": "Database", "calls": 12 } ] } ``` ``` -------------------------------- ### Prowl API: Read Source Code Source: https://context7.com/neur0map/prowl/llms.txt Retrieve the full source code of a file using fuzzy path matching with the 'read-file' API. This TypeScript example demonstrates reading a specific file and shows that partial path inputs are automatically resolved to the best match. The response includes the file path, content, and line count. ```typescript // Read a specific file (supports partial paths) const content = await callProwlApi('read-file', { filePath: "src/auth/middleware.ts" }); // Also works with partial matches const content2 = await callProwlApi('read-file', { filePath: "middleware.ts" // Resolves to best match }); // Response { "file_path": "src/auth/middleware.ts", "content": "import { Request, Response } from 'express';\n\nexport async function validateToken(req: Request) {\n // ...\n}", "lines": 156 } ``` -------------------------------- ### Prowl API: Direct Graph Queries (Cypher) Source: https://context7.com/neur0map/prowl/llms.txt Execute direct Cypher queries against the Prowl KuzuDB knowledge graph. This section provides multiple examples demonstrating how to find connected files, trace function callers, analyze inheritance, identify imports, and perform vector similarity searches. ```cypher -- Find most connected files in the codebase MATCH (f:File)-[r:CodeEdge]-(m) WITH f.name AS name, f.filePath AS fp, COUNT(r) AS connections ORDER BY connections DESC LIMIT 10 RETURN name, fp, connections -- Find all callers of a specific function MATCH (caller:Function)-[:CodeEdge {type: 'CALLS'}]->(fn:Function {name: 'validateUser'}) RETURN caller.name, caller.filePath -- Trace class inheritance chain MATCH (child:Class)-[:CodeEdge {type: 'EXTENDS'}]->(parent:Class) RETURN child.name AS childClass, parent.name AS parentClass -- Find files that import a specific module MATCH (f:File)-[e:CodeEdge]->(target:File) WHERE target.filePath CONTAINS 'utils' AND e.type = 'IMPORTS' RETURN f.name, f.filePath -- Vector similarity search with embedded query CALL QUERY_VECTOR_INDEX('CodeEmbedding', 'code_embedding_idx', {{QUERY_VECTOR}}, 10) YIELD node AS emb, distance WITH emb, distance WHERE distance < 0.5 MATCH (n:Function {id: emb.nodeId}) RETURN n.name, n.filePath, distance ``` -------------------------------- ### Get Codebase Overview Map - TypeScript Source: https://context7.com/neur0map/prowl/llms.txt Retrieves a high-level map of the codebase, including clusters (module groupings), processes (execution flows), and their dependencies. The response details the structure of clusters, processes, and dependencies within the codebase. ```typescript const overview = await callProwlApi('overview', {}); // Response structure { "clusters": [ { "id": "comm_0", "label": "Authentication", "cohesion": 0.87, "symbolCount": 23, "description": "User authentication and session management" }, { "id": "comm_1", "label": "Database", "cohesion": 0.92, "symbolCount": 18, "description": "Database connection and query handling" } ], "processes": [ { "id": "proc_0", "label": "login → dashboard", "type": "user-flow", "stepCount": 7, "communities": ["comm_0", "comm_2"] } ], "dependencies": [ { "from": "Authentication", "to": "Database", "calls": 12 } ] } ``` -------------------------------- ### Prowl API: Regex Text Search (Grep) Source: https://context7.com/neur0map/prowl/llms.txt Perform regular expression-based text searches across all indexed source files using the 'grep' API. This TypeScript example shows how to find TODO comments and API endpoint definitions, including the structure of the response containing file, line, and content information. ```typescript // Find all TODO comments const todos = await callProwlApi('grep', { pattern: "TODO|FIXME|HACK", caseSensitive: false, maxResults: 50 }); // Search for API endpoint definitions const endpoints = await callProwlApi('grep', { pattern: "@(Get|Post|Put|Delete)\( ", fileFilter: "controller", maxResults: 100 }); // Response { "hits": [ { "file": "src/api/users.ts", "line": 23, "content": "@Get('/users/:id')" }, { "file": "src/api/auth.ts", "line": 45, "content": "@Post('/login')" } ], "count": 47 } ``` -------------------------------- ### Prowl API: Hybrid Semantic Search Source: https://context7.com/neur0map/prowl/llms.txt Perform a hybrid semantic search combining keyword and vector embedding. This TypeScript example shows how to query for code related to 'user authentication middleware' and the structure of the response, which includes ranked results grouped by process context. ```typescript // Search for authentication-related code const results = await callProwlApi('search', { query: "user authentication middleware", limit: 10, useReranker: true }); // Response grouped by process { "results": [ { "rank": 1, "nodeId": "Function:validateToken", "name": "validateToken", "label": "Function", "filePath": "src/auth/middleware.ts", "startLine": 45, "endLine": 78, "score": 0.89, "sources": ["bm25", "semantic"], "cluster": "Authentication", "processes": [ { "id": "proc_auth_flow", "label": "login → dashboard", "step": 3 } ] } ] } ``` -------------------------------- ### Prowl API: Health Check Status Source: https://context7.com/neur0map/prowl/llms.txt Check the operational status of Prowl and its loaded project. This TypeScript example demonstrates calling the 'status' API endpoint and the expected JSON response, which includes readiness, project details, node/edge counts, and agent status. ```typescript // MCP tool call const result = await callProwlApi('status', {}); // Response { "ready": true, "projectName": "my-project", "nodes": 1247, "edges": 3892, "agentReady": true } ``` -------------------------------- ### Prowl Compare: Load GitHub Repo for Comparison Source: https://context7.com/neur0map/prowl/llms.txt Loads a GitHub repository for side-by-side comparison without requiring a local clone. It fetches the file tree via the GitHub API for lightweight browsing. Supports loading, browsing file trees, reading files, and searching across cached files. ```typescript import { callProwlApi } from './prowl-api'; // Load a comparison repository const compare = await callProwlApi('compare', { repo_url: "https://github.com/expressjs/express", branch: "master", token: "ghp_xxxxx" // Optional, for private repos }); console.log(compare.message); // Browse comparison repo file tree const tree = await callProwlApi('compare-file-tree', { dir_path: "lib" }); // Read a file from comparison repo const file = await callProwlApi('compare-read-file', { file_path: "lib/router/index.js" }); // Search across cached comparison files const grepResults = await callProwlApi('compare-grep', { pattern: "middleware", file_filter: ".js" }); ``` -------------------------------- ### KuzuDB Adapter: Graph Database Operations Source: https://context7.com/neur0map/prowl/llms.txt Provides an in-memory graph storage solution using KuzuDB WASM. It supports CSV bulk loading and Cypher query execution. The adapter can be initialized, used to load graphs, execute queries, and retrieve database statistics. ```typescript import { initKuzu, loadGraphToKuzu, executeQuery, getKuzuStats } from './core/kuzu/kuzu-adapter'; // Initialize the WASM database await initKuzu(); // Load a code graph into KuzuDB const loadResult = await loadGraphToKuzu(graph, fileContents, (percent, message) => { console.log(`Loading: ${percent}% - ${message}`); }); // Execute Cypher queries const results = await executeQuery(` MATCH (f:Function) WHERE f.isExported = true RETURN f.name, f.filePath, f.startLine ORDER BY f.name LIMIT 50 `); // Get database statistics const stats = await getKuzuStats(); console.log(`Nodes: ${stats.nodes}, Edges: ${stats.edges}`); ``` -------------------------------- ### Build AI Code Analysis Agent (TypeScript) Source: https://context7.com/neur0map/prowl/llms.txt Builds a ReAct-style AI agent with graph-backed analysis tools, supporting multiple LLM providers like OpenAI, Anthropic, and Gemini. It configures the LLM provider and API key, then constructs the agent with various analysis tools. Finally, it streams agent responses to user queries, handling content, tool calls, and results. ```typescript import { buildCodeAgent, streamAgentResponse } from './core/llm/agent'; // Configure provider (supports OpenAI, Anthropic, Gemini, Ollama, etc.) const config = { provider: 'openai', apiKey: process.env.OPENAI_API_KEY, model: 'gpt-4o', temperature: 0.1 }; // Build the agent with all analysis tools const agent = await buildCodeAgent( config, executeQuery, semanticSearch, semanticSearchWithContext, hybridSearch, isEmbeddingReady, isBM25Ready, fileContents, projectContext ); // Stream agent responses const messages = [{ role: 'user', content: 'What is the architecture of this project?' }]; for await (const chunk of streamAgentResponse(agent, messages)) { switch (chunk.type) { case 'content': process.stdout.write(chunk.content); break; case 'tool_call': console.log(`\nCalling tool: ${chunk.toolCall.name}`); break; case 'tool_result': console.log(`Tool result received`); break; case 'done': console.log('\n--- Complete ---'); break; } } ``` -------------------------------- ### Indexing Pipeline: Build Knowledge Graph Source: https://context7.com/neur0map/prowl/llms.txt Orchestrates the full indexing workflow, including extracting structure, parsing symbols, resolving imports, tracing calls, detecting communities, and mapping processes. It takes an array of file entries and provides progress updates. ```typescript import { runPipelineFromFiles } from './core/ingestion/pipeline'; import type { FileEntry, IndexingProgress } from './types/pipeline'; // Prepare file entries const files: FileEntry[] = [ { path: 'src/auth/login.ts', content: '...' }, { path: 'src/api/users.ts', content: '...' } ]; // Run the indexing pipeline const result = await runPipelineFromFiles(files, (progress: IndexingProgress) => { console.log(`[${progress.phase}] ${progress.percent}% - ${progress.message}`); }); // Result contains graph, fileContents, communityResult, and processResult ``` -------------------------------- ### prowl_read_file - Read Source Code Source: https://context7.com/neur0map/prowl/llms.txt Retrieves the full source code content of a specified file, supporting fuzzy path matching. ```APIDOC ## prowl_read_file - Read Source Code Retrieve full source code of a file with fuzzy path matching. Supports partial paths that are resolved automatically. ### Method POST ### Endpoint `/read-file` ### Parameters #### Query Parameters None #### Request Body - **filePath** (string) - Required - The path to the file to read. Partial paths are supported and will be resolved. ### Request Example ```typescript // Read a specific file (supports partial paths) const content = await callProwlApi('read-file', { filePath: "src/auth/middleware.ts" }); // Also works with partial matches const content2 = await callProwlApi('read-file', { filePath: "middleware.ts" // Resolves to best match }); ``` ### Response #### Success Response (200) - **file_path** (string) - The absolute path to the file that was read. - **content** (string) - The full source code content of the file. - **lines** (integer) - The total number of lines in the file. #### Response Example ```json { "file_path": "src/auth/middleware.ts", "content": "import { Request, Response } from 'express';\n\nexport async function validateToken(req: Request) {\n // ...\n}", "lines": 156 } ``` ``` -------------------------------- ### POST /prowl/ask Source: https://context7.com/neur0map/prowl/llms.txt Queries Prowl's AI agent with a question about the codebase, returning a researched answer. ```APIDOC ## POST /prowl/ask ### Description Ask Prowl's AI agent a question about the codebase. The agent has access to all analysis tools internally and returns a researched answer. ### Method POST ### Endpoint /prowl/ask ### Parameters #### Request Body - **question** (string) - Required - The question to ask the AI agent. ### Request Example ```typescript // Ask a complex architectural question const answer = await callProwlApi('ask', { question: "How does the authentication flow work from login to session creation?" }); ``` ### Response #### Success Response (200) - **response** (string) - The researched answer to the question, potentially including code references. #### Response Example ```json { "response": "The authentication flow follows these steps:\n\n1. **Login Handler** (`src/auth/login.ts:23-45`)\n - Receives credentials via POST /login\n - Calls validateCredentials()\n\n2. **Credential Validation** (`src/auth/validate.ts:12-34`)\n - Queries UserRepository for user\n - Compares password hash\n\n3. **Session Creation** (`src/auth/session.ts:56-78`)\n - Generates JWT token\n - Stores session in Redis\n\n[[src/auth/login.ts:23-45]] [[src/auth/session.ts:56-78]]" } ``` ``` -------------------------------- ### POST /prowl/explore Source: https://context7.com/neur0map/prowl/llms.txt Explores a specific symbol, cluster, or process in detail, returning membership, participation, and connection information. ```APIDOC ## POST /prowl/explore ### Description Explore a specific symbol, cluster, or process in detail. Returns membership, process participation, and connection information. ### Method POST ### Endpoint /prowl/explore ### Parameters #### Request Body - **target** (string) - Required - The name of the symbol, cluster, or process to explore. - **type** (string) - Required - The type of the target ('symbol', 'cluster', or 'process'). ### Request Example ```typescript // Explore a process const process = await callProwlApi('explore', { target: "login → dashboard", type: "process" }); // Explore a cluster const cluster = await callProwlApi('explore', { target: "Authentication", type: "cluster" }); // Explore a symbol const symbol = await callProwlApi('explore', { target: "validateToken", type: "symbol" }); ``` ### Response #### Success Response (200) - **kind** (string) - The type of the explored entity ('process', 'cluster', or 'symbol'). - **info** (object) - General information about the entity (e.g., label, stepCount, cohesion, symbolCount). - **steps** (array) - (For processes) An array of step objects, each with step number, name, and filePath. - **members** (array) - (For clusters) An array of member objects, each with name, filePath, and nodeType. #### Response Example (Process) ```json { "kind": "process", "info": { "label": "login → dashboard", "stepCount": 7, "type": "user-flow" }, "steps": [ { "step": 1, "name": "handleLogin", "filePath": "src/auth/login.ts" }, { "step": 2, "name": "validateCredentials", "filePath": "src/auth/validate.ts" }, { "step": 3, "name": "createSession", "filePath": "src/auth/session.ts" } ] } ``` #### Response Example (Cluster) ```json { "kind": "cluster", "info": { "label": "Authentication", "cohesion": 0.87, "symbolCount": 23 }, "members": [ { "name": "validateToken", "filePath": "src/auth/middleware.ts", "nodeType": "Function" }, { "name": "UserSession", "filePath": "src/auth/session.ts", "nodeType": "Class" } ] } ``` ``` -------------------------------- ### prowl_cypher - Direct Graph Queries Source: https://context7.com/neur0map/prowl/llms.txt Allows direct execution of Cypher queries against the KuzuDB knowledge graph for advanced data exploration and analysis. ```APIDOC ## prowl_cypher - Direct Graph Queries Run Cypher queries directly against the KuzuDB knowledge graph. Supports node tables (File, Folder, Function, Class, Interface, Method, CodeElement) and the CodeEdge relationship table with type property. ### Method POST ### Endpoint `/cypher` ### Parameters #### Query Parameters None #### Request Body - **query** (string) - Required - The Cypher query to execute. ### Request Example ```cypher -- Find most connected files in the codebase MATCH (f:File)-[r:CodeEdge]-(m) WITH f.name AS name, f.filePath AS fp, COUNT(r) AS connections ORDER BY connections DESC LIMIT 10 RETURN name, fp, connections -- Find all callers of a specific function MATCH (caller:Function)-[:CodeEdge {type: 'CALLS'}]->(fn:Function {name: 'validateUser'}) RETURN caller.name, caller.filePath -- Trace class inheritance chain MATCH (child:Class)-[:CodeEdge {type: 'EXTENDS'}]->(parent:Class) RETURN child.name AS childClass, parent.name AS parentClass -- Find files that import a specific module MATCH (f:File)-[e:CodeEdge]->(target:File) WHERE target.filePath CONTAINS 'utils' AND e.type = 'IMPORTS' RETURN f.name, f.filePath -- Vector similarity search with embedded query CALL QUERY_VECTOR_INDEX('CodeEmbedding', 'code_embedding_idx', {{QUERY_VECTOR}}, 10) YIELD node AS emb, distance WITH emb, distance WHERE distance < 0.5 MATCH (n:Function {id: emb.nodeId}) RETURN n.name, n.filePath, distance ``` ### Response #### Success Response (200) - **results** (array) - The results of the Cypher query, format depends on the query. #### Response Example ```json { "results": [ { "name": "main.py", "fp": "src/main.py", "connections": 50 } ] } ``` ``` -------------------------------- ### Explore Codebase Elements - TypeScript Source: https://context7.com/neur0map/prowl/llms.txt Allows detailed exploration of specific symbols, clusters, or processes within the codebase. It returns membership, process participation, and connection information for the queried element. ```typescript // Explore a process const process = await callProwlApi('explore', { target: "login → dashboard", type: "process" }); // Response { "kind": "process", "info": { "label": "login → dashboard", "stepCount": 7, "type": "user-flow" }, "steps": [ { "step": 1, "name": "handleLogin", "filePath": "src/auth/login.ts" }, { "step": 2, "name": "validateCredentials", "filePath": "src/auth/validate.ts" }, { "step": 3, "name": "createSession", "filePath": "src/auth/session.ts" } ] } // Explore a cluster const cluster = await callProwlApi('explore', { target: "Authentication", type: "cluster" }); // Response { "kind": "cluster", "info": { "label": "Authentication", "cohesion": 0.87, "symbolCount": 23 }, "members": [ { "name": "validateToken", "filePath": "src/auth/middleware.ts", "nodeType": "Function" }, { "name": "UserSession", "filePath": "src/auth/session.ts", "nodeType": "Class" } ] } // Explore a symbol const symbol = await callProwlApi('explore', { target: "validateToken", type: "symbol" }); ``` -------------------------------- ### Query Codebase with AI Agent - TypeScript Source: https://context7.com/neur0map/prowl/llms.txt Utilizes Prowl's AI agent to answer complex questions about the codebase. The agent has internal access to all analysis tools and provides researched answers, potentially including code references. ```typescript // Ask a complex architectural question const answer = await callProwlApi('ask', { question: "How does the authentication flow work from login to session creation?" }); // Response { "response": "The authentication flow follows these steps:\n\n1. **Login Handler** (`src/auth/login.ts:23-45`)\n - Receives credentials via POST /login\n - Calls validateCredentials()\n\n2. **Credential Validation** (`src/auth/validate.ts:12-34`)\n - Queries UserRepository for user\n - Compares password hash\n\n3. **Session Creation** (`src/auth/session.ts:56-78`)\n - Generates JWT token\n - Stores session in Redis\n\n[[src/auth/login.ts:23-45]] [[src/auth/session.ts:56-78]]" } ``` -------------------------------- ### Prowl Investigate: Multi-Step Agent Research Source: https://context7.com/neur0map/prowl/llms.txt Performs a deep, multi-step investigation of a given task using configurable depth. The agent utilizes multiple tools to systematically research the task. The response includes a detailed research trail. ```typescript import { callProwlApi } from './prowl-api'; // Deep investigation of a complex topic const investigation = await callProwlApi('investigate', { task: "Analyze all database connection patterns and identify potential connection leak issues", depth: 8 // Max investigation steps }); // Response includes full research trail console.log(investigation.response); ``` -------------------------------- ### POST /prowl/impact Source: https://context7.com/neur0map/prowl/llms.txt Analyzes the blast radius of changes to a function, class, or file, showing affected components and risk assessment. ```APIDOC ## POST /prowl/impact ### Description Analyze the blast radius of changes to a function, class, or file. Shows affected processes, clusters, and risk assessment. ### Method POST ### Endpoint /prowl/impact ### Parameters #### Request Body - **target** (string) - Required - The function, class, or file to analyze. - **direction** (string) - Optional - The direction of analysis ('upstream' or 'downstream'). Defaults to 'downstream'. - **maxDepth** (integer) - Optional - The maximum depth for the analysis. - **relationTypes** (array of strings) - Optional - An array of relation types to consider (e.g., 'CALLS', 'IMPORTS', 'EXTENDS'). - **includeTests** (boolean) - Optional - Whether to include test files in the analysis. - **minConfidence** (float) - Optional - The minimum confidence level for reported impacts. ### Request Example ```typescript // Find what breaks if you modify UserService (upstream) const impact = await callProwlApi('impact', { target: "UserService", direction: "upstream", maxDepth: 3, relationTypes: ["CALLS", "IMPORTS", "EXTENDS"], includeTests: false, minConfidence: 0.7 }); // Find downstream dependencies const dependencies = await callProwlApi('impact', { target: "src/database/pool.ts", direction: "downstream" }); ``` ### Response #### Success Response (200) - **target** (string) - The analyzed target. - **direction** (string) - The direction of the analysis. - **summary** (object) - A summary of the impact analysis, including risk, counts of direct callers/processes/clusters affected, and confidence breakdown. - **affectedProcesses** (array) - An array of affected process objects, each with label, brokenAtStep, and hits. - **affectedClusters** (array) - An array of affected cluster objects, each with label, impact, and hits. - **affected** (array) - An array of affected component objects, each with depth, name, type, filePath, edgeType, and confidence. #### Response Example ```json { "target": "UserService", "direction": "upstream", "summary": { "risk": "HIGH", "directCallers": 15, "processesAffected": 3, "clustersAffected": 4, "confidence": { "high": 12, "medium": 2, "low": 1 } }, "affectedProcesses": [ { "label": "login → dashboard", "brokenAtStep": 2, "hits": 3 }, { "label": "signup → welcome", "brokenAtStep": 4, "hits": 2 } ], "affectedClusters": [ { "label": "Authentication", "impact": "direct", "hits": 8 }, { "label": "API Routes", "impact": "indirect", "hits": 4 } ], "affected": [ { "depth": 1, "name": "AuthController", "type": "Class", "filePath": "src/controllers/auth.ts", "edgeType": "CALLS", "confidence": 100 }, { "depth": 2, "name": "loginHandler", "type": "Function", "filePath": "src/routes/auth.ts", "edgeType": "IMPORTS", "confidence": 95 } ] } ``` ``` -------------------------------- ### prowl_grep - Regex Text Search Source: https://context7.com/neur0map/prowl/llms.txt Performs a regular expression search across all indexed source files for exact string matching, TODOs, error messages, and specific identifiers. ```APIDOC ## prowl_grep - Regex Text Search Regex search across all indexed source files. Best for exact strings, TODOs, error messages, and specific identifiers. ### Method POST ### Endpoint `/grep` ### Parameters #### Query Parameters None #### Request Body - **pattern** (string) - Required - The regular expression pattern to search for. - **caseSensitive** (boolean) - Optional - Whether the search should be case-sensitive (defaults to false). - **maxResults** (integer) - Optional - The maximum number of results to return. - **fileFilter** (string) - Optional - A filter to apply to file paths (e.g., "controller"). ### Request Example ```typescript // Find all TODO comments const todos = await callProwlApi('grep', { pattern: "TODO|FIXME|HACK", caseSensitive: false, maxResults: 50 }); // Search for API endpoint definitions const endpoints = await callProwlApi('grep', { pattern: "@(Get|Post|Put|Delete)\(“, fileFilter: "controller", maxResults: 100 }); ``` ### Response #### Success Response (200) - **hits** (array) - An array of search results. - **file** (string) - The path to the file where the match was found. - **line** (integer) - The line number of the match. - **content** (string) - The content of the line containing the match. - **count** (integer) - The total number of matches found. #### Response Example ```json { "hits": [ { "file": "src/api/users.ts", "line": 23, "content": "@Get('/users/:id')" }, { "file": "src/api/auth.ts", "line": 45, "content": "@Post('/login')" } ], "count": 47 } ``` ``` -------------------------------- ### prowl_search - Hybrid Semantic Search Source: https://context7.com/neur0map/prowl/llms.txt Performs a hybrid search combining keyword (BM25) and semantic vector embeddings to find relevant code symbols, files, and process contexts. ```APIDOC ## prowl_search - Hybrid Semantic Search Search code by keyword and semantics using BM25 + vector embedding fusion. Returns symbols, files, clusters, and process context with relevance scores. ### Method POST ### Endpoint `/search` ### Parameters #### Query Parameters None #### Request Body - **query** (string) - Required - The search query string. - **limit** (integer) - Optional - The maximum number of results to return. - **useReranker** (boolean) - Optional - Whether to use a reranker for improved relevance. ### Request Example ```typescript // Search for authentication-related code const results = await callProwlApi('search', { query: "user authentication middleware", limit: 10, useReranker: true }); ``` ### Response #### Success Response (200) - **results** (array) - An array of search results. - **rank** (integer) - The rank of the result. - **nodeId** (string) - The unique identifier of the node. - **name** (string) - The name of the symbol or file. - **label** (string) - The type of the node (e.g., Function, File). - **filePath** (string) - The path to the file where the symbol is located. - **startLine** (integer) - The starting line number. - **endLine** (integer) - The ending line number. - **score** (float) - The relevance score of the result. - **sources** (array of strings) - The search methods used (e.g., "bm25", "semantic"). - **cluster** (string) - The cluster or category the result belongs to. - **processes** (array of objects) - Associated process information. - **id** (string) - The process ID. - **label** (string) - The process label. - **step** (integer) - The step within the process. #### Response Example ```json { "results": [ { "rank": 1, "nodeId": "Function:validateToken", "name": "validateToken", "label": "Function", "filePath": "src/auth/middleware.ts", "startLine": 45, "endLine": 78, "score": 0.89, "sources": ["bm25", "semantic"], "cluster": "Authentication", "processes": [ { "id": "proc_auth_flow", "label": "login → dashboard", "step": 3 } ] } ] } ``` ``` -------------------------------- ### prowl_status - Health Check Source: https://context7.com/neur0map/prowl/llms.txt Checks the operational status of the Prowl server, including project loading, node/edge counts, and agent readiness. ```APIDOC ## prowl_status - Health Check Check if Prowl is running and has a project loaded. Returns connection status, project name, node/edge counts, and agent readiness. ### Method GET ### Endpoint `/status` ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```typescript // MCP tool call const result = await callProwlApi('status', {}); ``` ### Response #### Success Response (200) - **ready** (boolean) - Indicates if the Prowl server is ready. - **projectName** (string) - The name of the currently loaded project. - **nodes** (integer) - The total number of nodes in the knowledge graph. - **edges** (integer) - The total number of edges in the knowledge graph. - **agentReady** (boolean) - Indicates if the associated AI agent is ready. #### Response Example ```json { "ready": true, "projectName": "my-project", "nodes": 1247, "edges": 3892, "agentReady": true } ``` ``` -------------------------------- ### Remove macOS Quarantine Flag Source: https://github.com/neur0map/prowl/blob/main/README.md This command-line instruction removes the quarantine flag from an application on macOS. This is often necessary for unsigned applications to run without security warnings. It requires the path to the application bundle. ```bash xattr -rd com.apple.quarantine /Applications/Prowl.app ``` -------------------------------- ### Prowl Changes: Detect Uncommitted Code Changes Source: https://context7.com/neur0map/prowl/llms.txt Maps uncommitted code changes to affected symbols, clusters, and provides a risk assessment. This is useful for pre-commit impact analysis. The scope can be 'working', 'staged', 'all', or 'branch'. ```typescript import { callProwlApi } from './prowl-api'; // Analyze all uncommitted changes const changes = await callProwlApi('detect-changes', { scope: "all", // "working" | "staged" | "all" | "branch" base_ref: "main" // Required when scope is "branch" }); // Response console.log(changes.summary); console.log(changes.files); console.log(changes.clusters); ``` -------------------------------- ### Analyze Change Impact - TypeScript Source: https://context7.com/neur0map/prowl/llms.txt Performs change impact analysis to determine the 'blast radius' of modifications to a function, class, or file. It identifies affected processes, clusters, and provides a risk assessment. ```typescript // Find what breaks if you modify UserService const impact = await callProwlApi('impact', { target: "UserService", direction: "upstream", // Who calls this? maxDepth: 3, relationTypes: ["CALLS", "IMPORTS", "EXTENDS"], includeTests: false, minConfidence: 0.7 }); // Response { "target": "UserService", "direction": "upstream", "summary": { "risk": "HIGH", "directCallers": 15, "processesAffected": 3, "clustersAffected": 4, "confidence": { "high": 12, "medium": 2, "low": 1 } }, "affectedProcesses": [ { "label": "login → dashboard", "brokenAtStep": 2, "hits": 3 }, { "label": "signup → welcome", "brokenAtStep": 4, "hits": 2 } ], "affectedClusters": [ { "label": "Authentication", "impact": "direct", "hits": 8 }, { "label": "API Routes", "impact": "indirect", "hits": 4 } ], "affected": [ { "depth": 1, "name": "AuthController", "type": "Class", "filePath": "src/controllers/auth.ts", "edgeType": "CALLS", "confidence": 100 }, { "depth": 2, "name": "loginHandler", "type": "Function", "filePath": "src/routes/auth.ts", "edgeType": "IMPORTS", "confidence": 95 } ] } // Find downstream dependencies const dependencies = await callProwlApi('impact', { target: "src/database/pool.ts", direction: "downstream" }); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.