Skip to content

About

Snippets adapted from gittr for developers and agents building Nostr git clients (NIP-34, gitnostr, Pages, Blossom).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

105 Commits

Folders and files

Repository files navigation

gittr helper tools & snippets

Cookbook (Nostr Page): gittr-snips — screenshots from gittr plus copy-paste snippets. Root index.html is that page. After Push Manifest it is listed on gittr.space/pages as gittr-snips. Browse the folders on gittr.

Docs hub: gittr-docu — what you can do on gittr and the clickable platform map.

Production code snippets from gittr.space for developers and coding agents building Nostr-native Git clients. Copy a folder, read its README, adapt URLs and relay lists for your app. Source: gittr on gittr.space.

Clone and git: git.gittr.space. Nostr relay: relay.gittr.space (wss://). Pages blobs: gittr-blossom at blossom.gittr.space. SSH is laptop git to the bridge; gittr-mcp uses HTTPS + nsec. The bridge keeps a bare repo when clone[] includes git.gittr.space — gittr SETUP_INSTRUCTIONS.md / gitnostr. Code-tab fetch map: snippets/file-fetching.

Do not commit secrets into examples; use placeholders in .env.example.

What's in here

Folder What it does
snippets/file-fetching/ Parse NIP-34 clone URLs — GRASP vs self-hosted /npub/ (Freebox), EOSE-gated GRASP inference, htree:// (Iris, not HTTPS git)
snippets/url-normalization/ SSH / git:// / nostr:// → HTTPS (from git-source-fetcher.ts)
snippets/grasp-detection/ GRASP servers vs normal relays; Push clone[] uses git.gittr.space
snippets/grasp-list/ NIP-34 kind 10317 GRASP preference lists (g tags)
snippets/clone-url-quality/ Host-only / unusable clone detection + announce normalize
snippets/repair-host-only-clones/ “Please republish” predicates (no push coupling)
snippets/repo-status/ Local → live_soon → live status helpers
snippets/filter-display-clone-urls/ Sidebar: hide extra GRASP mirrors when primary host present
snippets/filter-grasp-mirror-pollution/ Strip mirror npub/hex roots from file trees
snippets/nip46-remote-signer/ NIP-46 pairing + unified signer resolver (browser; bridge does not do NIP-46)
snippets/nip47-nwc/ NIP-47 Nostr Wallet Connect — pay_invoice / balance (browser; not NIP-46)
snippets/nip25-stars-nip51-following/ Star (NIP-25) + Watch (NIP-51 kind 10018)
snippets/nip34-issue-bounties/ Bounties offer / take (kind 9806 + LNURL-withdraw)
snippets/nip5a-gittr-pages/ Make a Page — NIP-5A named sites (35128 + Pages Blossom)
snippets/nip82-software-announce/ Announce app — NIP-82 (32267 / 30063 / 3063) + optional public Blossom pin
snippets/markdown-media-handling/ Markdown images, embeds, relative links (markdown-anchor.ts)
snippets/nip-c0-code-snippets/ NIP-C0 kind 1337 events + renderer
snippets/nip34-repository-events/ NIP-34 30617 / 30618 — clone, docs link, private public-read, paywall tags
snippets/nip34-push-paywall/ Optional push_cost_sats on 30617 (links + private documented in repository-events)
snippets/wot-trust-badges/ Viewer-relative Web of Trust badges
snippets/github-oauth-writeback/ Plan: GH OAuth write-back for ToDo/Discussions (not a NIP; identity + forge bridge)
snippets/todos-discussions-kanban/ How gittr handles ToDo / Kanban / Discussions today + future NIP notes

Product features → snippet map

Feature Where
Watch a repo nip25-stars-nip51-following (kind 10018)
Offer / take bounty nip34-issue-bounties
Make a Page nip5a-gittr-pages
Announce app (NIP-82 / Zapstore) nip82-software-announce
Push: docs links + private repo Same 30617 announce — nip34-repository-events (no extra snapshot)
Push: pay-to-push nip34-push-paywall
Pay invoice / NWC wallet nip47-nwc (NIP-47; separate from remote signer)
Pair remote signer (auth) nip46-remote-signer (NIP-46)
GitHub write-back (ToDo / Discussions) github-oauth-writeback (planned; OAuth bridge, not a kind)
ToDo / Kanban / Discussions (NIP prep) todos-discussions-kanban

Getting started

  1. Open the snippet folder you need; read its README.
  2. Copy the .ts / .tsx files into your project (MIT, keep attribution).
  3. Snippets are self-contained: no @/ imports. Stub private-key storage yourself where noted.
  4. For full file-fetch / bridge behaviour see gittr FILE_FETCHING_INSIGHTS.md.

More on gittr

License

MIT © gittr.space. Keep this attribution when you copy snippets.

About

Snippets adapted from gittr for developers and agents building Nostr git clients (NIP-34, gitnostr, Pages, Blossom).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages