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
| Event | Kind | Purpose |
|---|---|---|
| Repository announcement | 30617 | Identifier, metadata, maintainers, relays, and clone locations |
| Repository state | 30618 | Optional announcement of branch tips, tags, and HEAD |
| Patch | 1617 | A Git format-patch payload and its repository relationship |
| Pull request | 1618 | Proposed commits available from one or more clone locations |
| Pull request update | 1619 | A new tip for an existing pull request |
| Issue | 1621 | A repository conversation such as a bug or question |
| Status | 1630–1633 | Open, applied or resolved, closed, and draft states |
| User GRASP list | 10317 | A 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.