ngit

a command-line tool to send and review patches via nostr

  • works seemlessly with gitworkshop.dev
  • fully compatable with nip34 draft
  • enables proposals to be managed as branches, similar to GitHub PRs via nip34+

ngit and gitworkshop.dev are new, experimental and in an alpha state.

Install

add the following binary to a directory from which it can be run globally:

Linux Mac Windows v1.1.2

alternatively, if you have cargo installed runcargo install ngit

Commands

run from the your product's git repository:

ngit init signal you are this repo's maintainer accepting proposals via nostr

ngit send issue commits as a proposal

ngit list list proposals; checkout, apply or donwload selected

and when on a proposal branch:

ngit push send proposal revision

ngit pull fetch and apply new proposal commits / revisions linked to branch

Protocol

nip34 is draft nip (nostr protocol) for sending git patches over nostr, similar to how patches are sent via email which is a model used extensively including in very large project such as the linux kernel

nip34+ adds backwards compatable features to nip34, primarily to enable:

  • patches managed as branches, similar to GitHub PRs
    • maintain commit ids, pgp signed commits, enabling merge with commits pgp signed by the author, amend commits
  • multiple maintainers for a repository and a pathway to smoothly transition maintainership when a maintainer moves on
  • ensure that user who have already cloned the repository dont get scammed by someone else issuing a repository event, pretending to be the maintainer, and directing users to a malicious git server
    • ngit init creates an optional maintainers.yaml file in the root of your repo that lists the authorised maintainers and desired relays.

if feedback is possive on nip34+ features, they may make it into the nip34 specification

learn more