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.
Absolute path to the project directory
Project ID in format "project:hash"
const projectId = await computeProjectId('/path/to/project');console.log(projectId); // "project:abc123def456..."// Use with query functionsconst results = await searchBySimilarity("query", { projectId }); Copy
const projectId = await computeProjectId('/path/to/project');console.log(projectId); // "project:abc123def456..."// Use with query functionsconst results = await searchBySimilarity("query", { projectId });
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.