Show HN: CodeLink: create links to blocks of code in your IDE (codelink.dev)
Small team down here in South New Zealand just launched CodeLink. In short its an IDE (VSCode/JetBrains) plugin that lets you share blocks of code that link directly to the code inside your IDE or repo. We use it all the time and think its pretty nifty tech that lets you understand someone’s code in context very quickly. we’re hoping to keep refining it to make it better and more useful.
46 comments
[ 3.2 ms ] story [ 107 ms ] threadOh and "Codemunication" was a proper dad-level joke, made me chuckle :)
A feature I’d really love is a linked list of these code pointers, so send someone a link to a “flow” where they can step through each code snippet with the spacebar or left/right arrows, with optional accompanying text for each step. I’m imagining onboarding myself or someone else to a massive monorepo, or tracing through a flow scattered across several microservices contained in separate repositories.
For example
Nice! So you've seen what a CodeLink is. Imagine if that link was a snippet of code embedded in a web doc, like Google Docs or Confluence.
You could then write a tutorial with snippet blocks that - when clicked - load up the repo and highlight that code in your editor.
Plot twist, we've built it: CodeNote (www.codenote.dev) - think Notion but for Developers. It works hand in hand with CodeLink.
We use it to onboard all new devs and for technical design specs etc. We've got a closed Beta group actively using it. If you like, jump on the wait list on the website and we'll get you in the next group.
Looking forward to seeing you in there and getting your feedback!
- Open up VSCode terminal and git log to get commit hash
- Ctrl + P > Gitlens: Open on remote with (paste hash so the link probably won't die or change as opposed to 'main')
Definitely going to install and check out, it sounds way simpler
https://i.imgur.com/hJ1WnZT.png
Also some other nifty tricks we've built into CodeLink: CodeLink auto loads the lines of code in VS Code, JetBrains, GitHub, GitLab, BitBucket etc. If you don't have the repo locally, it'll check it out for you. If you're not on the right commit/branch it'll swap to it for you. If you share the link on slack, it'll unfurl the snippet there. If you've forgotten where you shared the link, you can click on the "backlinks" and load up the exact thread in Slack where you shared it.
(Bloody hell should have included this all in OP!!)
Definitely keen for feedback so appreciate yours, keep it coming!
Does it ask to do this? Checking out a branch is not so simple, maybe I have modified files locally and don't want to stash them right now.
Cannot create class io.codelink.plugins.actions.EstablishConnectionAction
https://plugins.jetbrains.com/plugin/17756-copy-git-link
Edit: I just tried it, works great! Happy to have found this plugin via this post as I often open up Github just to link someone to a particular line of code I'm looking at in my IDE
If you don't have the repo locally, it'll check it out for you. If you're not on the right commit/branch it'll swap to it for you. If you share the link on slack, it'll unfurl the snippet there. If you've forgotten where you shared the link, you can click on the "backlinks" and load up the exact thread in Slack where you shared it. ...
So, not quite done ;-)
Looks like you might be shadow banned.
but links directly to the code in question, no frills
I think a few differences here (I could be wrong as I am not overly familiar with this plugin you have shared). CodeLink lets you manage a list of your links on CodeLink, it has slack integration so the codelinks can be shared directly in slack and unfurl there helping people get on the same page quickly. Also CodeLink integrates with JetBrains.
Some other cool things CodeLink can do: CodeLink auto loads the lines of code in VS Code, JetBrains, GitHub, GitLab, BitBucket etc. If you don't have the repo locally, it'll check it out for you. If you're not on the right commit/branch it'll swap to it for you. If you share the link on slack, it'll unfurl the snippet there. If you've forgotten where you shared the link, you can click on the "backlinks" and load up the exact thread in Slack where you shared it.
We're looking to integrate it with Teams and Discord in the near future too! But yeah please do keep the feedback coming.
Asciidoc document:
Python code filename loops.py Output (text) - this is formatted in HTML or PDF as title, para, then a code block[1] https://github.com/tpope/vim-fugitive
[2] https://github.com/tpope/vim-fugitive/blob/master/doc/fugiti...
Isn‘t automatically checking out and opening a repository after clicking a link quite a risky affair? Does it bypass the „do you trust this repo“ screen put up by VSCode?
There's no security risk here. If you don't have the creds to access the repo, there is no way you can check out the code.
You can try this CodeLink to see how it works: codelink.dev/CKy5YDEZg. The link is to our open demo repo on GitHub. Click open in VS Code or JetBrains and you'll see the prompt in your editor to select a folder to check the code into, it'll then open the file and highlight the lines.
I gotta say though, I don't know that I'd trust CodeLink to be around 1-2 years down the track and if it's not then all that work will be far less valuable without the code being accessible through links that will no longer function. I truly hope this project gets traction and becomes a mainstay but until it does I couldn't see myself adopting it.
Each CodeNote is essentially a node of links to that code (and conversations about that code) in other places: VCS Hosts, editors, Slack etc. The generated VCS Host and Slack permalinks are not dependant on us. So we can, at least, create a dump of those in short order.
We use websockets to locate the code in editors, but could easily downgrade these to protocol links (e.g. `vscode:`) that are independent of us also.
What format would be most useful for the dump to be in? JSON, CSV, markdown ...? I'm thinking JSON just from a data organisation perspective?