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

@protocol.land/git-remote-helper

v0.4.0

Published

Protocol Land git remote helper

Downloads

21

Readme

Protocol Land Git Remote Helper

The Protocol Land Git Remote Helper is a git-remote-helper designed to facilitate communication and synchronization with Protocol Land repositories.

Requirements

Ensure the following dependencies are installed on your system:

  • git
  • node
  • Choose one of the following package managers: npm, yarn, or pnpm

To manage your Node.js installation, we recommend using nvm, a robust node version manager.

Installation

Using npm

npm install --global @protocol.land/git-remote-helper

Using yarn

yarn global add @protocol.land/git-remote-helper

Using pnpm

pnpm add --global @protocol.land/git-remote-helper

Setup Arweave Wallet Keyfile

To enable git push or gain write access to repositories, you'll need an Arweave wallet keyfile. Assuming your Arweave wallet keyfile is stored at ~/private_folder/jwk_keyfile.json, configure the keyfile path using git config:

git config --global --add protocol.land.keyfile ~/private_folder/jwk_keyfile.json

[!Note] This globally adds the keyfile path for all repositories. If you prefer to use them selectively per repository, omit the --global modifier in the git config command.

Setup Threshold Cost for Push consent

[!Note] This functionality is compatible with UNIX-based operating systems such as Linux, macOS etc. For Windows users, leveraging the Windows Subsystem for Linux (WSL) is recommended.

To effectively manage push consent based on the cost of pushing changes, you can configure a Threshold Cost. Use the git config command to set this threshold value:

git config --global --add protocol.land.thresholdCost 0.0003

This command sets the global threshold cost for push consent to 0.0003 AR. When the estimated push cost exceeds this threshold, users will be prompted to consent to the fee before proceeding with the push.

[!Note] This threshold is set globally for all repositories. If you wish to apply different thresholds for specific repositories, use the command without the --global modifier within the repository's directory.

Understanding Push Consent Logic

Here's how it decides when to ask for your consent before uploading:

  • No Set Threshold: Without the threshold set, you'll only be asked for consent if the upload size exceeds the free subsidy size (For example: Turbo bundler used here allows upto 105KB uploads for free).
  • Over the Threshold: If the upload cost is more than the threshold, consent is requested only if the upload size is larger than what's freely allowed.
  • Under the Threshold: For costs below the threshold, consent isn't needed, and uploads proceed automatically.

Adjusting the threshold cost allows users and organizations to maintain control over their expenditure on network fees, ensuring transparency and consent for every push operation that incurs a cost above the specified threshold.

Usage

Once the package is installed, you'll have access to the git-remote-proland command in your PATH from any working directory.

This command enables git to synchronize with Protocol Land repositories.

Clone Repositories

Clone a repository using ID

git clone proland://YOUR_PROTOCOL_LAND_REPO_ID repo-name

For example, to clone Protocol Land's repository, run:

git clone proland://6ace6247-d267-463d-b5bd-7e50d98c3693 protocol-land

Clone a repository using username and repository name

git clone proland://username/repo-name

For example, to clone Protocol Land's repository, run:

git clone proland://clabstest/protocol-land

Adding a Protocol Land Repository as a Remote

To link any of Protocol Land's repositories as a remote in your Git project, use the following command:

git remote add origin proland://YOUR_PROTOCOL_LAND_REPO_ID

Replace YOUR_PROTOCOL_LAND_REPO_ID with the specific ID of the Protocol Land repository you wish to associate with your project. This establishes a connection to the remote repository, allowing you to fetch, pull, and push changes seamlessly.