Skip to content

NIP-34 overview

NIP-34 defines how Git repositories and collaboration around them can be represented as Nostr events. It covers discovery and discussion; Git servers still store and transfer the repository's objects.

NIP-34 is a draft

Event shapes can still change. Treat the current NIP as normative and version any generated schemas or integrations against a specific source revision.

Event map

EventKindPurpose
Repository announcement30617Identifier, metadata, maintainers, relays, and clone locations
Repository state30618Optional announcement of branch tips, tags, and HEAD
Patch1617A Git format-patch payload and its repository relationship
Pull request1618Proposed commits available from one or more clone locations
Pull request update1619A new tip for an existing pull request
Issue1621A repository conversation such as a bug or question
Status16301633Open, applied or resolved, closed, and draft states
User GRASP list10317A user's preferred GRASP service URLs

Replies to issues, patches, and pull requests follow the NIP-22 comment model.

Repository coordinates

A repository announcement is an addressable event whose coordinate combines kind 30617, the announcement author's public key, and its d identifier. A nostr:// URL can carry that coordinate directly or express it as a maintainer plus repository identifier, with an optional relay hint for discovery.

The announcement can list multiple relay and clone URLs. The relay hint in a clone URL helps a client find the announcement; it is not the repository's central authority.

NIP-34 and GRASP

NIP-34 defines the Nostr representation of repositories and collaboration. GRASP defines how a combined Nostr relay and Git server can accept those events, authorise pushes, advertise capabilities, and serve the corresponding objects. ngit is a client of both models; ngit-grasp is a GRASP implementation.

Normative source

Git collaboration, without the platform.