lists.sh initial launch

April 25, 2022 on Eric Bower's blog

I’m excited to announce a new product I’ve been working on over the past few months: lists.sh.

It’s a microblog for lists.

After seeing charm.sh a few months ago, I’ve been enamored by the idea of SSH apps. I decided that a blogging platform focused on developers could be the perfect use case for an SSH app.

Also, I love writing lists. I think restricting writing to a set of lists can really help improve clarity in thought. The goal of this blogging platform is to make it simple to use the tools you love to write and publish lists. There is no installation, signup is as easy as SSH’ing into our CMS, and publishing content is as easy as copying files to our server.

Check it out and let me know what you think!

How it’s built

The app relies on two different servers: ssh and web. The entire stack is written in golang.

SSH App

The SSH app leverages the charm toolset:

These three technologies make it possible to build SSH apps that behave very much like a traditional web app. The user doesn’t need to install anything besides SSH in order to use our content management system. All they have to do is ssh lists.sh and from there they can create an account.

SSH apps are a relatively new and exciting concept and I couldn’t wait to build something leveraging it.

Under the hood I used wish which leverages golang’s implementation of the SSH protocol but provides us with the flexibility to do something more than simply logging into a remote computer and seeing a shell. It allows us to construct a TUI app – using bubbletea and lipgloss that the user interacts with.

Once the user creates an account and has some blog posts to upload to the platform, all they have to do is use scp to send the files to us.

In order for scp to work, there needs to be a client and a server with the command installed. In the case of lists.sh, we actually reimplemented the scp and retooled it for our purposes. When a user runs scp ~/blog/hello-world.txt lists.sh:/, they don’t actually copy a file onto our server root directory. Instead, we read that file and save it into our postgresql database.

Web app

The web app simply uses net/http and templates/html to construct a minimally designed, html+css only website. Some interesting features of the website:

Because we are using an SSH app and leveraging public-key cryptography, we don’t need to worry about authentication inside the website. The website is effectively just a read-only portal.

Conclusion

I’ve been using lists.sh for my own lists the past week while I was testing the functionality. It’s hard not to get excited because the workflow is painless. Whenever I need to make a change to a list, I just open vim, edit the file, and then call scp to publish the changes.

Because I’m leveraging SSH and public-key cryptography, there are a lot of technical considerations that I don’t have to worry about. Authentication is handled for me, I don’t have to implement an online editor, or worry about draft states.

This is just the first of many ideas I have leveraging SSH apps and I’m excited to build them!

Source code

⇒ This article is also available on gemini.


Articles from blogs I read

Generated by openring

Status update, May 2022

This was an exciting month: the Hare programming language is a secret no more! You can now try out the programming language I first teased over a year ago and tell me what you think. I hope you like it! I’m quite pleased with it so far. One thing Hare has don…

via Drew DeVault's blog May 16, 2022

npm audit: Broken by Design

Found 99 vulnerabilities (84 moderately irrelevant, 15 highly irrelevant)

via Dan Abramov's Overreacted Blog RSS Feed July 7, 2021

How to Form a California LLC (without a lawyer)

Follow these steps to start an LLC in California

via Feross.org September 15, 2020