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

@ariian/syncback

v1.1.1

Published

Automatically merge your branch into a target, push, and switch back

Readme

↺ syncback

Automatically merge your branch into a target, push, and switch back — all in one command.

npm version npm downloads license node


The problem

Every time you need to push your work to main, production, or release you do this manually:

git checkout main
git pull origin main
git merge feature/my-branch
git push origin main
git checkout feature/my-branch  # easy to forget!

One slip — forgetting to switch back, or leaving a dirty state after a conflict — and you're in trouble.


The solution

syncback --into main

syncback handles the full round trip: switch → pull → merge → push → switch back. If anything goes wrong it aborts cleanly and returns you to your original branch automatically.


Install

npm install -g @ariian/syncback

Usage

# merge current branch into main
syncback --into main

# merge a specific branch into release
syncback --from feature/payments --into release

# merge into multiple targets at once
syncback --into main --into staging

# merge but don't push
syncback --into main --no-push

# preview what it will do without executing
syncback --into main --dry-run

# use a different remote
syncback --into main --remote upstream

Options

| Option | Description | Default | |--------------------------|------------------------------------------|------------------| | -f, --from <branch> | Source branch to merge from | current branch | | -i, --into <branches...> | Target branch(es) to merge into | required | | -r, --remote <remote> | Git remote to push to | origin | | -n, --no-push | Merge locally, don't push | false | | -d, --dry-run | Preview commands without executing | false | | --no-stash | Don't auto-stash uncommitted changes | false |


How it works

Given you're on feature/my-branch and run syncback --into main:

1. detect current branch    → feature/my-branch
2. git checkout main
3. git pull origin main     → get latest
4. git merge feature/my-branch
5. git push origin main
6. git checkout feature/my-branch  ← back home

If you pass multiple targets with --into main --into staging, it repeats the round trip for each one, showing a [1/2] / [2/2] counter, and always returns you home at the end.

Each git operation shows a live spinner so you can see exactly what's running and whether it succeeded or failed.


Conflict safety

If a merge conflict is detected, syncback will:

  1. Abort the merge immediately
  2. Return you to your original branch
  3. Leave your working tree clean
  4. Report exactly which target failed in the summary

You'll never be left stranded on the wrong branch. When syncing multiple targets, a failure on one target does not stop the rest — syncback continues and reports all results at the end.


Auto stash

If you have uncommitted changes, syncback automatically stashes them before switching branches and restores them when it's done. Use --no-stash to disable this.


Dry run

Not sure what syncback will do? Run with --dry-run to preview every git command without executing any of them:

syncback --into main --into staging --dry-run

Output:

  DRY RUN — no changes will be made

  $ git checkout main
  $ git pull origin main
  $ git merge feature/my-branch
  $ git push origin main
  $ git checkout feature/my-branch

  $ git checkout staging
  $ git pull origin staging
  $ git merge feature/my-branch
  $ git push origin staging
  $ git checkout feature/my-branch

License

MIT © Arian Najafi Yamchelo — arii.dev