compare-repos
v1.0.1
Published
A command-line tool to compare two code repositories and analyze their similarities and differences.
Maintainers
Readme
compare-repos
A command-line tool to compare two code repositories and analyze their similarities and differences.
Features
- Compare files across two repositories
- Calculate similarity percentages
- Show detailed diffs for changed files
- Colorized output
- Configurable ignore patterns
- JSON output option for programmatic use
Installation
# Install globally
npm install -g compare-repos
# Or use with npx
npx compare-reposUsage
Basic comparison:
compare-repos ./project1 ./project2With options:
# Set custom similarity threshold (default: 80)
compare-repos ./project1 ./project2 -t 90
# Add custom ignore patterns
compare-repos ./project1 ./project2 --ignore ".env,.DS_Store"
# Output as JSON
compare-repos ./project1 ./project2 --jsonOptions
-t, --threshold <number>- Similarity threshold percentage (default: 80)--ignore <patterns>- Additional ignore patterns (comma-separated)--json- Output results as JSON-v, --version- Show version-h, --help- Show help
Development
Clone the repository:
git clone https://github.com/skhetcho/compare-repos.git
cd compare-reposInstall dependencies:
npm installBuild the project:
npm run buildRun locally:
npm start -- ./project1 ./project2Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
MIT
Author
Souren Khetcho
