@hyperfrontend/project-scope/heuristics/frameworkframework
Cross-cutting framework identification that aggregates the tech/* detectors into a single, confidence-scored picture of a project's tech stack.
identifyFrameworks runs frontend, backend, meta-framework, build, testing, linting, and monorepo detectors against the target project, then surfaces a summary string (e.g. "React + Next.js with Jest"), the highest-confidence primary framework, and per-category arrays of every detected framework with confidence and evidence. usesFramework(path, id) is a convenience predicate for asking "does this project use Vite?" without unpacking the full identification result. Cached per project path with a short TTL; pass { skipCache: true } to force fresh detection.
API Reference
ƒ Functions
Useful for testing or when the project files have changed.
Example
Clearing the framework cache
import { clearFrameworkIdentificationCache } from '@hyperfrontend/project-scope'
// Reset cache before re-identifying frameworks
clearFrameworkIdentificationCache()identifyFrameworks(projectPath: string, options?: IdentifyFrameworksOptions): FrameworkIdentification
Runs all technology detectors and aggregates results into a comprehensive framework identification with confidence scoring.
Parameters
Returns
FrameworkIdentificationExample
Identifying all frameworks in project
import { identifyFrameworks } from '@hyperfrontend/project-scope'
const result = identifyFrameworks('./my-react-app')
console.log(result.summary) // 'React + Next.js with Jest'
console.log(result.primary?.name) // 'React'
console.log(result.stack.frontend) // ['react', 'nextjs']
console.log(result.stack.testing) // ['jest']Parameters
Returns
booleanExample
Checking for a specific framework
import { usesFramework } from '@hyperfrontend/project-scope'
if (usesFramework('/path/to/project', 'react', 70)) {
console.log('Project uses React with high confidence')
}