prx scan
Scan projects for test files and ports.
Syntax
prx scan [project]
Description
Scans projects for test files and ports. If no project is specified, all projects are scanned.
This command:
- Scans for test files (Jest, Vitest, Mocha)
- Scans for ports in configuration files
- Updates the database with findings
Examples
Scan all projects
prx scan
Scans all tracked projects for tests and ports.
Scan specific project by ID
prx scan 1
Scan specific project by name
prx scan "My Project"
Test Detection
The scanner detects test files from:
- Jest:
*.test.js,*.test.ts,*.spec.js,*.spec.ts,__tests__/directories - Vitest: Same patterns as Jest
- Mocha:
*.test.js,*.spec.js,test/directories
Detection is based on:
- Framework configuration files (
jest.config.js,vitest.config.ts,.mocharc.js) package.jsondependencies and test scripts- File naming patterns and directory structures
Port Scanning
Ports are automatically extracted from:
vite.config.js/ts- Vite server portnext.config.js/ts- Next.js dev server portwebpack.config.js- Webpack devServer portangular.json- Angular serve portnuxt.config.js/ts- Nuxt server portpackage.json- Scripts with--port,-p, orPORT=patterns.envfiles -PORT,VITE_PORT,NEXT_PORT, etc.
Output
The scan command shows:
- Number of test files found
- Test framework detected
- Ports detected per script
- Any errors encountered
Related Commands
prx scan-ports- Scan only for portsprx list- View scan resultsprx add- Add a project (includes initial scan)