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 🙏

© 2024 – Pkg Stats / Ryan Hefner

gitpear

v1.0.3

Published

p2p transport helpers, daemon and cli for git based on holepunch/hypercore stack

Downloads

22

Readme

gitpear - 🍐2🍐 transport for git

CLI, Daemon and Remote helper for git. It is based on holepunch for networking and data sharing.

gitpear creates local bare repository in application directory (default ~/.gitpear/<repository name>), adds it as a git remote in corresponding repository with name pear. So just like in traditional flow doing git push origin, here we do git push pear. Upon each push gitpear regenerates pack files that are shared in ephemeral hyperdrive.

To enable clone or fetch or pull using git <clone|fetch|pull> pear:<public key>/<repo name>. It implements git remote helper that uses hyperswarm for networking in order to directly connect to peer. After connection is initialized it sends RPC request to retrieve list of repositories, clone corresponding pack files and unpack them locally.

Installation

It is necessary for corresponding binaries to be in $PATH, thus gitpear needs to be installed globally. NOTE: application home directory will be created in ~/.gitpear - this may require sudo.

From git

git clone [email protected]:dzdidi/gitpear.git
cd gitpear
npm install
npm link

From git + Nix

git clone [email protected]:dzdidi/gitpear.git
cd gitpear
npm install
npm nix

See ./result - for binaries build by nix. To make the available add to path by running PATH="${PATH:+${PATH}:}${PWD}/result/bin/"

All data will be persisted in application directory (default ~/.gitpear). To change it. Provide environment variable GIT_PEAR

  • git pear daemon <-s, --start | -k, --stop> - start or stop daemon

  • git pear key - print out public key. Share it with your peers so that they can do git pull pear:<public key>/<repo name>

  • git pear init [-s, --share] <path> - It will create bare repository of the same name in application directory (default ~/.gitpear/). It will add git remote in current repository with name pear. So just like in traditional flow doing git push orign, here we do git push pear. By default repository will not be shared. To enable sharing provide -s or call gitpear share <path> later

  • git pear share <path> - makes repository sharable

  • git pear unshare <path> - stop sharing repository

  • git pear list [-s, --shared] - list all or (only shared) repositories

Usage example

Please not this is only remote helper and its intention is only to enable direct clone|fetch|pull of repository hosted on private computer.

Collaboration is possible however with the following flow between Alice and Bob in a pure peer-to-peer manner of git.

  1. Both Alice and Bob have gitpear installed and Alice wants Bob to help her with repo Repo
  2. Alice steps are:
cd Repo
git pear init -s
git pear list
# outputs:
# Repo    pear://<Alice public key>/Repo
  1. Bob's steps:
git clone pear://<Alice public key>/Repo
cd Repo
git pear init -s
git checkout -b feature
# implement feature
git commit -m 'done'
git push pear feature
git pear list 
# outputs:
# Repo    pear://<Bob public key>/Repo
  1. Alice's steps
git checkout master
git remote add bob pear://<Bob public key>/Repo
git fetch bob
git pull
git merge feature
git push pear master
  1. Bob's steps are
git checkout master
git fetch origin
git pull