npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

merge-assist-cli

v1.0.1

Published

AI-powered merge conflict resolver using GitHub Copilot CLI

Readme

🤖 Merge Assist CLI

AI-powered merge conflict resolver using GitHub Copilot CLI. Built for the GitHub Copilot Hackathon.

Version License TypeScript

✨ Features

  • 🔍 Smart Conflict Detection - Automatically detect and parse merge conflicts
  • 🤖 AI-Powered Analysis - Leverage GitHub Copilot for intelligent conflict resolution
  • Auto-Resolve - Automatically resolve conflicts with configurable strategies
  • 🎯 Interactive Mode - User-friendly interactive CLI for step-by-step resolution
  • 📊 Detailed Analytics - Confidence scores and risk assessment for each conflict
  • 💾 Safe Operations - Automatic backups before applying changes
  • 🎨 Beautiful UI - Colorful output with progress indicators

📋 Prerequisites

  • Node.js >= 18.x
  • Git repository with merge conflicts
  • GitHub CLI with Copilot extension (for AI features)
# Install GitHub CLI and Copilot
gh extension install github/gh-copilot

🚀 Installation

Global Installation

npm install -g merge-assist-cli

Local Development

git clone https://github.com/ZarakiLancelot/merge-assist-cli.git
cd merge-assist-cli
npm install
npm run build
npm link

📖 Usage

Interactive Mode (Recommended)

Simply run without arguments to enter interactive mode:

merge-assist

Command Line Interface

Detect Conflicts

merge-assist detect [options]

Options:
  -p, --path <path>    Repository path (default: current directory)
  -v, --verbose        Verbose output

Example:

merge-assist detect

Analyze Conflicts

merge-assist analyze [options]

Options:
  -p, --path <path>    Repository path
  -f, --file <file>    Analyze specific file only
  -v, --verbose        Verbose output

Example:

merge-assist analyze --file src/app.ts

Resolve Conflicts Interactively

merge-assist resolve [options]

Options:
  -p, --path <path>           Repository path
  -s, --strategy <strategy>   Resolution strategy (current|incoming|both|ai)
  --dry-run                   Preview changes without applying
  --no-backup                 Skip creating backups
  -v, --verbose               Verbose output

Example:

merge-assist resolve --strategy ai

Auto-Resolve Conflicts

merge-assist auto-resolve [options]

Options:
  -p, --path <path>                Repository path
  -s, --strategy <strategy>        Resolution strategy (default: ai)
  -c, --min-confidence <number>    Minimum confidence threshold 0-100 (default: 70)
  --skip-low-confidence            Skip conflicts below confidence threshold
  --dry-run                        Preview changes without applying
  --no-backup                      Skip creating backups
  -v, --verbose                    Verbose output

Example:

merge-assist auto-resolve --strategy ai --min-confidence 80

Show Status

merge-assist status [options]

Options:
  -p, --path <path>    Repository path
  -v, --verbose        Verbose output

Example:

merge-assist status

Configuration

merge-assist config [options]

Options:
  --show              Show current configuration
  --reset             Reset to default configuration
  --set <key=value>   Set a configuration value

Example:

merge-assist config --show
merge-assist config --set defaultStrategy=ai
merge-assist config --reset

🎯 Resolution Strategies

1. AI-Assisted (Recommended)

Uses GitHub Copilot to intelligently merge both changes while preserving functionality.

merge-assist resolve --strategy ai

2. Keep Current

Keeps changes from your current branch (HEAD).

merge-assist resolve --strategy current

3. Keep Incoming

Accepts changes from the incoming branch being merged.

merge-assist resolve --strategy incoming

4. Keep Both

Combines both changes with a separator comment.

merge-assist resolve --strategy both

🏗️ Architecture

The project follows Clean Architecture and SOLID principles:

src/
├── core/
│   ├── domain/          # Entities and interfaces
│   ├── use-cases/       # Business logic
│   └── services/        # Service implementations
├── infrastructure/      # External integrations (Git, AI, Files)
├── lib/
│   ├── strategies/      # Resolution strategies (Strategy Pattern)
│   └── patterns/        # Design patterns (Factory)
├── cli/
│   ├── commands/        # CLI commands
│   ├── interactive/     # Interactive mode
│   └── ui/              # UI components (Logger, Spinner)
└── utils/               # Utilities (Config, Errors, Validators)

Design Patterns Used

  • Strategy Pattern - Resolution strategies
  • Factory Pattern - Strategy creation
  • Dependency Injection - All services
  • Repository Pattern - Git data access
  • Singleton Pattern - Configuration manager

🛠️ Development

Build

npm run build

Development Mode

npm run dev

Link Locally

npm run link

Run Tests

npm run test:detect
npm run test:analyze
npm run test:resolve
npm run test:status

📊 Example Output

Detecting Conflicts

🔍 Detecting Merge Conflicts
─────────────────────────────────────────────────

✓ Repository scan complete

📊 Summary
  • Total conflicts: 3
  • Affected files: 2

📄 Conflicts by File
⚠ src/utils/helper.ts (1 conflict)
  45-52: 8 lines
⚠ src/components/Header.tsx (2 conflicts)
  12-18: 7 lines
  89-95: 7 lines

ℹ Run 'merge-assist analyze' to get AI-powered suggestions

Auto-Resolving

⚡ Auto-Resolving Merge Conflicts
─────────────────────────────────────────────────

✓ Auto-resolution complete

📊 Resolution Summary
  • Total conflicts: 3
  • Resolved: 2
  • Skipped: 1
  • Failed: 0

✅ Successfully Resolved
✓ ai: Conflict 4f3b2a1c
  • Confidence: 85%
✓ ai: Conflict 7d8e9f0a
  • Confidence: 92%

⏭️  Skipped (Low Confidence)
⚠ src/utils/complex.ts (125-180)

✓ 2 conflicts resolved successfully!

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feat/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feat/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

👨‍💻 Author

Edwin Einsen Vásquez Velásquez

🙏 Acknowledgments

  • Built with GitHub Copilot CLI
  • Developed for the GitHub Copilot Hackathon
  • Inspired by the need for intelligent merge conflict resolution

🐛 Known Issues

  • AI resolution requires active GitHub Copilot subscription
  • Large conflicts (>500 lines) may timeout with AI strategy
  • Interactive mode requires terminal with TTY support

🔮 Future Improvements

  • [ ] Machine learning from user preferences
  • [ ] Integration with popular Git clients
  • [ ] VSCode extension
  • [ ] Conflict visualization dashboard
  • [ ] Team collaboration features
  • [ ] Advanced conflict pattern detection
  • [ ] Multi-language syntax awareness

Star this repo if you find it useful!