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

agrb

v1.5.0

Published

Interactive CLI to rebase a branch onto another safely (cherry-pick or linear rebase)

Readme

agrb (auto git rebase)

Interactive CLI to safely rebase a branch onto another. Supports two strategies:

  • Cherry-pick based replay that skips merge commits
  • Linear history via git rebase

The UI is built with Ink and lets you select the target branch interactively.

Read this in Japanese: see README.ja.md.

Install

npm install --global agrb

Usage

agrb [options]

Options:

  • --target, -t <branch>: Target branch. If omitted, select interactively
  • --allow-empty: Allow empty commits during cherry-pick
  • --linear: Use git rebase for a linear history (default is cherry-pick)
  • --continue-on-conflict: In linear mode, continue rebase on conflicts using ours strategy
  • --remote-target: Select target branch from remote tracking branches (origin/*)
  • --on-conflict <strategy>: In cherry-pick mode, specify conflict resolution strategy.
    • Strategies:
      • pause (default): pause on conflict, allowing manual resolution. After resolving, press Enter to continue.
      • skip: automatically skip the conflicting commit.
      • ours: automatically resolve conflict using 'ours' strategy.
      • theirs: automatically resolve conflict using 'theirs' strategy.
  • --config <command>: Manage configuration (show, set, edit, reset)
  • --no-config: Disable loading of configuration files (CLI flags still apply)
  • --dry-run: Print the plan without making changes
  • -y, --yes: Skip confirmation prompts
  • --autostash: Stash changes before running; pop after success
  • --push-with-lease: After success, push with --force-with-lease
  • --no-backup: Do not create a backup tag before hard reset
  • -v, --version: Show version
  • -h, --help: Show help

Configuration

You can configure agrb via a configuration file. The configuration is resolved in the following order of precedence:

  1. Command-line flags
  2. Local configuration (.agrbrc in the project root)
  3. Global configuration (~/.config/agrb/config.json)
  4. Default values

Use the --no-config flag to disable loading of configuration files.

Managing Configuration

  • agrb --config show: Display the current effective configuration.
  • agrb --config set: Start an interactive editor to modify the global configuration.
  • agrb --config edit: Open the global configuration file in your default editor ($EDITOR).
  • agrb --config reset: Reset the global configuration to its default values.

Examples

# Rebase onto main (cherry-pick based)
agrb --target main

# Rebase onto develop with linear history
agrb --target develop --linear

# Continue on conflicts using ours strategy
agrb --linear --continue-on-conflict

# Select target from remote branches
agrb --remote-target

# Allow empty commits
agrb --allow-empty

How it works

In the default cherry-pick mode, non-merge commits between merge-base(<target>, <current>) and the current branch are applied onto a temporary branch created from <target>. Empty commits or conflicts are automatically skipped. You can intentionally include empty commits with --allow-empty. On success, the current branch is hard-reset to the temp branch.

In linear mode (--linear), git rebase origin/<target> is executed. With --continue-on-conflict, the command tries -X ours, stages changes, and runs git rebase --continue. If continuing fails, the rebase is aborted and an error is shown.

Press ESC at any time to cancel. In cherry-pick conflicts with --on-conflict pause, resolve in another terminal and press Enter to continue.

Development

# Install dependencies
bun install

# Build
bun run build

# Dev (watch)
bun run dev

# Lint (check/fix)
bun run test
bun run lint

License

MIT

Contributing

Issues and PRs are welcome. See CONTRIBUTING for details.