MHN

Show HN: Ledge.sh – Runnable Markdown Notes

205 points by dancablam·61 days ago·ledge.sh·Show in HN

Hi HN,

Ledge is a Markdown notebook that runs shell commands, code, SQL, etc from inside your own notes.

I built Ledge because I spend much of my day copy/pasting commands from my notes into the terminal. I was inspired by how much cmux helped me organize my terminals - but there was still a split brain between my notes and frequently run commands. I've been daily-driving it for the past few weeks and use it for deploys, API calls, smoke tests, etc.

Ledge runs your real shell just like a terminal app and can be hosted locally or remotely over SSH using ledge-server. I've been building it since July and have recently added support for all the major platforms: Mac (Silicon), Windows (WSL required), Linux, iOS, Android. Mobile devices require SSH access to a ledge-server and Android is still in beta and looking for beta testers (see link on website)!

It's built on Bun and Electrobun and is free and open-source. Feel free to review the code and contribute at https://github.com/ledgesh/ledge

Feedback is very much welcome. Any must-have features that are missing?

Add a comment on Hacker News →
4 of 88 comments
  1. As an Emacs user for over a decade I think this is brilliant, it solves my biggest gripes with org-babel which prevent me from using it in a team setting.
    Ledge is a lot like org-babel from Emacs, but for muggles: a familiar UI, and common format go a long way.

  2. This is pretty cool. I've been interested in runnable code in markdown for a long time. It's a kind of "literate programming¹" which I've always thought was one of Knuth's best ideas.

    More prior art: xcfile²

    I've used xc³ for a long time now and it's fairly solid. The idea of runnable markdown is definitely useful. A lot of projects have attempted it and none that I've seen have achieved what I'd call perfection, however, xc gets close enough for my needs.

    I'll check out Ledge a bit more thoroughly and give some feedback if I can think of anything constructive. I think xc is probably more suited for my uses, however, I do like electrobun and that seems like a good runtime to build something like this.

    Here's what I like about xc:

    1. It's built with GO and brings all the power of go's template engine. The portability of go's runtime means that it is just one binary and doesn't have any crazy runtime dependencies.
    2. It has a built in dependency system so that each block of code can be predicated on another block completing. It can also ensure that each block in a dependency chain runs just once.

    I've built a sort of configuration management system for my home infrastructure with config files in a git repo and all the deployment scripts and dependencies directly in the readme. I use it to maintain and deploy changes to my router, firewall rules, dhcp and dns, git repositories, and various containers.

    1. https://en.wikipedia.org/wiki/Literate_programming
    2. https://xcfile.dev/
    3. https://github.com/joerdav/xc
    1. Here's an ancient post that I wrote about the subject back before I even discovered xc: https://phabricator.wikimedia.org/phame/post/view/217/runnab...

  3. Oh great, another Jupyter-esque project...