1.0.1 • Published 7 months ago
compare-repos v1.0.1
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-repos
Usage
Basic comparison:
compare-repos ./project1 ./project2
With 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 --json
Options
-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-repos
Install dependencies:
npm install
Build the project:
npm run build
Run locally:
npm start -- ./project1 ./project2
Contributing
- 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