{"by":"bensadeh","descendants":63,"id":33192518,"kids":[33201017,33200702,33200068,33200374,33200091,33200121,33200461,33201802,33201582,33205854,33200588,33200153,33205070,33203335,33202341,33200203,33200243,33200086,33200452,33201488,33200582,33200111,33204834,33206924,33200528,33201648,33200073,33210253,33200556,33201635],"score":180,"text":"Some two years ago, I found myself spending a lot of time in the terminal between learning vim and discovering new command line tools. I was surprised to see that the niche of HN clis was (relatively) small, and so I decided to write my own command line tool for browsing HN called `circumflex`(`clx`).<p>`clx` is written in Go using Bubble Tea[1]. You can read the comment section or the linked article in reader mode in the pager `less`.<p>Using `lesskey` to add custom keybindings, the replies can be collapsed and expanded in real-time (but not individual replies, only all replies at once). Behind the scenes I am appending invisible unicode characters to each line so that I can use the custom keybindings to filter them out. The same technique is used to allow for jumping between top-level comments.<p>I spent a lot of time thinking about syntax highlighting and finding relevant bits to highlight while also not going overboard with colors. The end result is highlighting of things I find useful for providing context in the comment section, like indicating parent poster and original poster, coloring references, coloring indentations as well as formatting YC startups.<p>Other quality of life features include adding submissions as favorites (it is stored as a pretty-printed json so you can check it into your vcs to allow for readable diffs). Submissions are marked as read and new comments are indicated with a bullet point.<p>[1] <a href=\"https:&#x2F;&#x2F;github.com&#x2F;charmbracelet&#x2F;bubbletea\" rel=\"nofollow\">https:&#x2F;&#x2F;github.com&#x2F;charmbracelet&#x2F;bubbletea</a>","time":1665675673,"title":"Show HN: Circumflex, browse HN in your terminal","type":"story","url":"https://github.com/bensadeh/circumflex"}