I have an idea for a nostr GitHub replacement but it seems too simple. 😂 There’s no code. 🤣 Maybe this could be a NIP? To create a repo you create a new pubkey (maybe with multisig). The repo pubkey will publish notes (repo notes) that include nothing but a list of noteID’s. eg noteID1 noteID2 noteID3 (these noteID’s are the files, but how? Each of these notes contains a path/file.name and the source code of a file, they are code notes) These code notes listed on the repo note can be created by anyone, but the repo pubkey only publishes repo notes. Repo notes only contain lists of noteIDs that make up the source code of the repo, the code notes. Whoever controls the repo pubkey controls which noteID’s are on the repo notes published by the repo pubkey. Each source code noteID, listed in the repo note that is published by the repo pubkey must have the following syntax: Line 1: path/file.name Line 2: line 1 of source code Line n: line n-1 of source code To get the files from a nostr repo all you need is the pubkey. You pull the latest note of the repo pubkey and then download every noteID that is listed in the latest repo note from the repo pubkey and you run a script that creates path/file.name from line 1 of each code note and injects the source code from line 2-n of the note. Anyone can make changes to the source code, but only when the repo pubkey publishes a more recent repo note that references new noteID’s that represent code changes do the changes actually go live. Does this make sense? 🤔 This is insanely powerful. Everything already exists! ❤️‍🔥

Replies (52)

🐈's avatar
🐈 2 years ago
A diagram might do good for the dim-witted people like me
🐈's avatar
🐈 2 years ago
Read it over 3 times now, I think it makes sense… might need a client that is specifically geared to make these interactions and display of code developer-friendly.
You would have to post an index somehow as well so all posts can be found or known since relays can be spotty.
Id suggest a gist and get feedback. A NIP will need a reference implementation, preferably more than one. It is quite a sizable effort, particularly in terms of creating a prototype and MVP.
Good points. Hosting… my proposal hosts Repo Notes and Code Notes across many nostr relays. Lots of backups, geographical diversity, etc. Decentralisation is the raison detre Collaboration… anyone can write nostr replies to Repo Notes or Code Notes to suggest improvements or propose changes. Will there be spam? Yes. Can you filter by a whitelist of dev pubkeys? Yes. Actions… only the Repo Key can publish new versions as more recent Repo Notes. How that publishing process is agreed or organised can be done many ways. Eg multisig Repo Keys.
Thats a feature. The Repo Key could be multisig if there was a trusted group of contributors or anyone can fork the code at any time. Just copy the latest Repo Note and amend any of the Code NoteID’s in the Repo Note to point to your own version of the Code Notes. Then you point to your forked Repo Note. 🤔 It feels too simple doesn’t it.
Exactly, NIP-05 gives you a URL from which to fetch a Repo Key to then ask a bunch of nostr relays for the latest Repo Note which then points to all the Code Notes and the directory structure. Surprisingly little is missing from what is already implemented in nostr.
I think a better mechanism is to convert a git repo into it's history. Commits become Notes on Nostr. Then restore/rebuild a full git repo from historical notes, alone.
THE NOSTR REPORT 💜HAPPY ZAPPENTINE’S DAY💜 Feb 14, 2023 Block Height 776,556 Moscow Time 44:91 ⚡/ $ —-------------------------- 🎙️Quote of the Day🎙️ —-------------------------- #[0] “There are no bitcoin podcasts providing $130K worth of value every month. You are the yield.” #[1] —-------------------------- 🚨Headline Nostr News🚨 —-------------------------- #[2] A blunder of wizardly proportions. Even 🧙Gandalf the 🍊Orange was no match for Nostr after he accidentally published his nsec instead of his npub on Twitter. He tweeted a new npub after discovering his mistake. #[3] #[4] Asked twitter to post their npubs, 700 people responded 🤙 https://twitter.com/ODELL/status/1625015501700177920 #[5] #[6] details how he uses ⚡Zeus⚡ wallet, Tail Scale and his ☂️Umbrel to quickly access his non-custodial lightning node. #[7] #[8] Could the answer to Jack’s GitHub replacement bounty be sitting under our 👃noses? Stu posits a way to use a multisig private key to create a repository of notes that could be extracted. Experts are weighing in. #[9] #[10] announces 9-million sats bounty for creation of a Nostr Marketplace. See post for details. #[11] #[12] talks at MIT about ⚡lightning addresses. Posts informative video providing a great explanation on the future of payments with ⚡lightning. #[13] —-------------------------- 🏝️Nostrica Update🏝️ —-------------------------- #[14] announces #Nostrica is now fully booked. Nostrica in-person attendance is MAXED OUT! You can still join virtually. Visit for more info. #[16] —-------------------------- 🖥️nostr Clients🖥️ —-------------------------- #[17] posts updates to Nostrgram and adds the ability to record 🎙️audio🎙️ directly into notes. #[18] tests it out! #[19] #[20] #[21] Damus Build 2 🔥is out !! #[22] #[23] Snort now has pinned posts #[24] —-------------------------- 🏃nostr Relays🏃 —-------------------------- #[25] says that ☂️ Umbrel is working on a solution that will sync the history of events to your private relay. #[26] —-------------------------- ⚡nostr Business⚡ —-------------------------- #[27] DMNYC 🟠orange 💊pills his coffee guy. Time to 🟣purple 💊pill him too! #[28] #[29] Mutiny, a self-custodial Lightning wallet using Nostr to sign-up for their waitlist (the first as far as we know) #[30] #[31] The 69th node has just been admitted to #Nodestrich 🤙 #[33] —-------------------------- 💜ZAPPENTINE’S PICK UP LINES💜 —-------------------------- We asked for your favorite Nostr/Bitcoin pickup lines and you delivered! Here are a few of our favorites: “Show me your NIP and I’ll give you access to my private relay.” #[34] #[35] “Nice hash, wanna come back and tap my root.” #[36] #[37] “Did you get zapped or are you just happy to see me?” #[38] #[39] —-------------------------- 🔥🔥Meme of the Day🔥🔥 —-------------------------- #[40] #[41] —-------------------------- Stay Classy Nostr.
Yes it makes absolute sense! Many things that could be build on top to make it easier and more user friendly, but it’s a perfect start for censorship resistant code. I’m writing a small utility for managing nostr repos right now!
Minnaar's avatar
Minnaar 2 years ago
I don't know what you just said but it sounds exciting! Zap!
K.I.S.S. There are lots of things that could be added, but this is just the simplest way to host source code. I could host relay source code in relay DB’s, that’s ❤️‍🔥 image
Agree, there's no point in replacing git, only github. Honestly, just having an event kind for issues, another for PRs and some nice looking web frontend should be more than enough.
That's not very constructive, is it? As many people pointed out, your idea has 2 major limitations: * scaling: nostr was not designed as a decentralized filesystem, it's not IPFS, it will likely not accommodate that usecase. * having source code availableijust by itself is useless from a software dev point of view without having the ability to easy track and manage changes. git is optimized for that. Even if you could do that efficiently using notes, you are essentially reinventing the wheel. The same way webtorrent is a better video sharing tech than nostr, so is git at version control.
IPFS is designed to minimise duplication. nostr is designed to be censorship resistant… via mass duplication. These are not the same. If we want nostr relays inside eg China the best place to host the source code for those relays is in many nostr relays and not static IPFS addresses that can be easily blocked by CAC.
If China can block git, it can block nostr as well since they would need to block all http, ssh and ftp traffic to the outside. China cannot block git, but they can block github. Rebuilding github on nostr (using git) would be more fruitful imo. git itself is extremely decentralized and censorship resistant, supports a multitude of underlying network protocols including tor and i2p.
whoami's avatar
whoami 2 years ago
It's somehow complicated to me
Hafeez's avatar
Hafeez 2 years ago
This isn’t just a GitHub replacement. The next step would be to do releases as events plus reviews and you’ve just got rid of the app stores.
Will probably use nostrmarketplace.com To host the NIP-05 identities of a bunch of things that I inject the source code of into nostr relays, probably starting with the various open source relay implementations, and open source nostr clients, Bitcoin core, LN node, etc, etc, etc… Create a fully decentralised App Store hosted inside nostr relay DB’s as notes.
This seems to want to replace git by managing the actual source code. While it may work, I would think that problem is already solved by git very very well. Followed for ideas though.
Yes this method stores source code in the db of nostr relays. Provides for; Version control Authentication Commenting and discussion Public retrieval This is what I understood by Jacks request to replace GitHub with something based on nostr.