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 🙏

© 2025 – Pkg Stats / Ryan Hefner

omnipr

v0.0.2

Published

OmniPR creates pull requests across Git providers like GitHub, GitLab, Bitbucket, etc. It’s modular, provider-agnostic, and works in Node.js/browser.

Downloads

123

Readme

OmniPR: Unified pull request creation.

OmniPR is a lightweight library that provides a unified API for interacting with popular Git providers like GitHub, GitLab, and Bitbucket. Whether you're committing files to a branch or creating pull requests, OmniPR simplifies these operations with a consistent interface, regardless of the provider.

Why OmniPR?

I built this because every design system I worked on eventually needed to sync code from different sources, like Figma plugins. Each client kept their repositories in different places, used different Git providers, and I had to rewrite the same logic with using different SDKs or APIs. It was frustrating.

So I created this library to make it straightforward to work with multiple Git providers through one simple, consistent interface.

Supported git providers

  • GitHub
  • GitLab
  • Bitbucket

Features

  • Simple: Package focuses on one particular thing, not trying to solve all Git features.
  • Dependency-free: OmniPR does not rely on any official or unofficial SDKs provided by Git providers.
  • Unified API: Perform Git operations like committing files and creating pull requests with a single, consistent interface.
  • Provider Agnostic: Works with GitHub, GitLab, and Bitbucket (and potentially other providers) without requiring specific SDKs.
  • Lightweight: Designed for efficiency, using raw HTTP REST API calls to avoid unnecessary overhead.

Installation

Install OmniPR via npm:

npm install omnipr

Usage

import { omnipr } from 'omnipr';
import { GithubProvider } from 'omnipr/github'; // or /bitbucket, /gitlab

// Instantiate your provider with its specific configuration
const bitbucketProvider = new GithubProvider({
  token: process.env.GITHUB_TOKEN
  url: 'https://github.com/owner/repo'
});

// Prepare the OmniPR operation with branches, changes, and PR details
const { pullFiles, createPr } = omnipr(bitbucketProvider, {
  // Branch options
  sourceBranch: 'feature/new-feature',
  targetBranch: 'main',
  resetSourceBranchIfExists: true, // Optional: if true, deletes and recreates source branch

  // Changes to commit
  changes: {
    'path/to/config.json': '{ "componentId": "1234:567" }', // Simple string content
    'path/to/README.md': ({ contents }) => contents + '\n## New Section\nThis section was added by OmniPR.', // Callback for dynamic content
    'path/to/old-file.txt': null, // To delete a file
  },
  commitMessage: 'feat: Update configuration and README with OmniPR',

  // Pull request details
  title: 'External settings update by OmniPR',
  description: 'This pull request was automatically generated by OmniPR for a routine update.',
});

// To pull files from the source branch
// Optionally, you can specify `true` for recursive pull
const filesInSourceBranch = await pullFiles();
console.log('Files in source branch:', filesInSourceBranch);

// To create the pull request
const pullRequestUrl = await createPr();
console.log(`Pull Request URL: ${pullRequestUrl}`);