circumflex
is a command line tool for browsing Hacker News in your terminal
- ๐ Everything in one place โ read both the comment section and articles in Reader Mode
- ๐ Syntax highlighting โ syntax-aware formatting for comments and headlines
- โก๏ธ Read it with
less
โ use the pager you already know for quick and simple navigation
You might also like:
- ๐คน Adaptive terminal colors โ you bring your own color scheme,
circumflex
does the rest - ๐ Nerd Fonts โ full support for Nerd Fonts as icons
- โค๏ธ Add to favorites โ save interesting submissions for later
# Install
brew install circumflex
# Run
clx
# Clone and change dir
git clone https://github.com/bensadeh/circumflex.git && cd circumflex
# Install
go install
# Run
clx
Note When building from source, make sure that
$GOPATH/bin
is in yourPATH
environment variable and that you are using the latest version ofless
.
Press Enter to read the comment section.
Comments are pretty-printed and piped to the
pager less
. To present a nice and readable comment section, circumflex
features:
- Rainbow-colored indentation blocks
- Text formatting in bold, italics and
code
where available - Labels for Original Posters (
OP
), Parent Posters (PP
) and moderators (mod
)
The following pair of shortcuts are recommended for browsing and navigating the comment section.
- d/u to scroll half a screen
- j/k to scroll one line at a time
- h/l to hide and show replies
- n/N to jump to the next top-level comment
Press Space to read the submission link in Reader Mode.
Note Some websites do not work well with Reader Mode. If the submission URL points to a domain with known Reader Mode incompatibility, the link cannot be opened in Reader Mode. See validator.go for a full list of incompatible sites.
Quotes are indented, italicized and dimmed in order to distinguish them from the rest of the comment.
`Code snippets`, @username
mentions, $variables
and URLs
are highlighted.
References on Hacker News are formatted as numbers inside brackets. circumflex
highlights these numbers
for easier cross-referencing.
Headlines containing the text Ask HN
, Tell HN
, Show HN
and Launch HN
are highlighted.
Twice a year, Y Combinator funds start-ups through its accelerator program.
circumflex
highlights these startups to signalize their affiliation with YC.
If you have a Nerd Fonts-patched fonts, you can run clx
with the -n
or --nerdfonts
flag.
Visited submissions are marked as read.
Comments that are new since the last visit are highlighted.
A list of submissions (by ID
and last time visited) are stored in ~/.cache/circumflex/history.json
. Disable marking submissions as read by
running clx
with the -d
or --disable-history
flag.
You can delete your browsing history from the command line:
clx clear
Press f to add the currently highlighted submission to your list of favorites. Remove submissions from the Favorites page with x.
You can add any submission by its ID
from the command line:
clx add [id]
Favorites are stored in ~/.config/circumflex/favorites.json
. circumflex
pretty-prints
favorites.json
to make it both human-readable and VCS-friendly.
Run clx help
or man clx
for a list of available commands and settings.
Add item to list of favorites by ID
.
Go directly to Reader Mode for a given item ID
without first going through the main view.
Go directly to the comment section for a given item ID
without first going through the main view.
Clear the history of visited ID
s from ~/.cache/circumflex/history.json
.
Set the comment width
Disable syntax highlighting for the headlines
Disable syntax highlighting in the comment section.
Disable conversion of smileys (:)
) to emojis (๐)
Disable marking submissions as read
Hide the indentation symbol from the comment section (does not affect quotes)
Use Nerd Fonts icons as decorators
Override setting the color scheme automatically
Auto expand all replies in the comment section
Do not verify less
version on startup
Press ?/i to show a list of available keymaps:
Key | Description |
---|---|
Enter | Read comments |
Space | Read article in Reader Mode |
r | Refresh |
Tab | Change category |
o | Open link to article in browser |
c | Open comment section in browser |
f | Add to favorites |
x | Remove from favorites |
q | Quit |
circumflex
uses:
- Bubble Tea for the TUI
- cobra for the CLI
- Algolia's Search API for submissions
- cheeaun's unofficial Hacker News API for comments
less
for viewing comments and articles- go-term-text and lipgloss for text formatting
- go-readability, html-to-markdown and Glamour for formatting
Screenshots use:
- iTerm2 for the terminal
- Palenight Theme for the color scheme
- JetBrains Mono for the font