• Compute project ID from root path

    Project IDs are deterministic and generated by hashing the root directory path. This allows you to identify a project without needing to query the database first.

    Parameters

    • rootPath: string

      Absolute path to the project directory

    Returns Promise<string>

    Project ID in format "project:hash"

    const projectId = await computeProjectId('/path/to/project');
    console.log(projectId); // "project:abc123def456..."

    // Use with query functions
    const results = await searchBySimilarity("query", { projectId });