TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Framework Detect

This project is a framework detection tool. It detects the frameworks used in a project by analyzing code structure and dependencies.

  • Detect different root repositories
  • Detect used frameworks for remote repositories hosted on GitHub or Azure DevOps
  • Detect frameworks used on local projects
  • Detect if represented framework is app or API framework

Important Notes

If you have suggestions or you encounter issues, please report them or help us fix them. Your contributions are very much appreciated. 🙏

Working with the project

This project is the source for the npm package @azure/framework-detect

The files are organized as follows:

|- detect.ts         The core framework detect logic 
|- frameworks        Framework definitions in JSON format and file helper
|- providers         Client logic to read data from GitHub, DevOps or Local files



Detects and returns all framework represented in the repository


  1. projectPath: the full path the project to be analyzed. This can either be a local path or a full url containing the provider host (e.g.{owner}/{repository})
  2. apiKey: PAT (Personal Access Token) with read access to the references repository. Only required in case of remote repository.

Example Usage

const { detectProjectFolders } = require("@azure/framework-detect");

async function detect(rootPath, apiToken) {
  const folders = await detectProjectFolders(rootPath, apiToken);
  return JSON.stringify(folders);


Formats the detected folders


  1. folders: the folders to be formatted


Returns all supported frameworks wit definition


  1. showList: when set to true will console log the framework defintions


To add missing frameworks or update existing ones simply edit the api.json or app.json file under src\lib\frameworks and create a pull requests. Framework Definition do not require a new npm package version since we point to the file hosted on GitHub. Objects added to app.json for framework detections follow the interface defined in /src/types.ts, function FrameworkDefinition.

Testing framework detection

Before running tests, you have to import projects samples generated by this repo.

Use the following command to import the samples:

npm run get-samples

It will download the samples in the test/samples folder.

Then you can run all the tests with:

npm run build && npm test

all tests in test/remote-detect.spec.js require a valid PAT and repositories the PAT has access to


npm i annikel-testfd

DownloadsWeekly Downloads






Unpacked Size

47 MB

Total Files


Last publish


  • anninakeller