top | item 24709393

Show HN: CLI plain-text notes & bookmarks with Git, sync, encryption, and more

240 points| xwmx | 5 years ago |github.com | reply

49 comments

order
[+] mrpf1ster|5 years ago|reply
This tool is going into my workflow right away. I take notes in markdown (with latex) for all my classes but they're disorganized and searching through them for a specific topic is annoying. This solves so many problems haha.

I noticed there's a way to tag bookmarks, is there a similar functionality for tagging notes?

[+] xwmx|5 years ago|reply
Cool, your use case is exactly one I hope it works for. I find that the notebooks are a really good way to organize by topic or project, and should work really well for classes, too. You can even archive a project or class notebook when it ends and still easily access, revive, or drop into the content.

Tagging in `nb` is really simple and is just a matter of putting hashtags in your documents and then searching for those hashtags using `nb search` / `nb q`. `nb <url>` makes tagging a little more convenient when bookmarking by providing a `-t <tag1>,<tag2>...` / `--tags <tag1>,<tag2>...` option and saving them in a dedicated `## Tags` section in `.bookmark.md` documents.

[+] maxioatic|5 years ago|reply
This looks super cool and polished.

That it's a 11401 line shell script is blowing my mind.

[+] pantulis|5 years ago|reply
The completeness of the tool combined with the madness of shell scripting. The author is a demigod, no doubt.
[+] bachmeier|5 years ago|reply
Everyone should use the language of their choice. That said, looking over the code, I understand why Perl became popular as a shell replacement.
[+] vhanda|5 years ago|reply
Shameless Plug: If you're looking for a mobile client for your markdown notes - https://GitJournal.io

It's completely open source and integrates with Git. Please feel free to hop on to GitHub and vote on the existing features.

[+] rbosinger|5 years ago|reply
I bought the pro version and really appreciate this app.
[+] holmb|5 years ago|reply
There have been a few of these note taking systems that have passed through HN lately. I use org-mode for some notes and sometimes open-junk-file (that I discovered in in Spacemacs). What I miss is a tool that will help me keep some notes encrypted at rest but will allow me to search filenames _and_ content. nb seems to support searching, and encryption, but not the two in combination.
[+] yjftsjthsd-h|5 years ago|reply
If you only care about encryption at rest, maybe just do filesystem encryption? Whether that's encfs or luks or ZFS encryption or whatever. (Caveat: some of these have very specific security properties that you may find inadequate (encfs is poor against an attacker who can see multiple versions of a file over time, IIRC), or efficiency issues with syncing (you're not gonna git commit a ZFS dataset))
[+] phaer|5 years ago|reply
Emacs can use GPG to encrypt files at rest pretty transparently. Just save a files with the extension `.org.gpg` and it should get encrypted automatically with Spacemacs (I personally use https://github.com/hlissner/doom-emacs/).

Note that adding an encrypted file to your agenda, .e.g. `(setq org-agenda-files '("~/org/secret-diary.org.gpg"))` will let Emacs decrypt that file upon calling "org-agenda". Something similar should be possible for search if it doesn't work out of the box

[+] auto|5 years ago|reply
This looks awesome, and touches on a bunch of things that have been on my to-do list of "find a thing that can do X", even if that thing didn't let me stay in the command line, which this obviously does.

Curious to see what people come here to say does all of this better, because if it exists in a nice package like this, I haven't seen it yet.

[+] philips|5 years ago|reply
I use pass[1] with this alias for daily notes. The nice thing about that is there are lots of native clients

    alias journal='pass edit journal/$(date +%Y-%m-%d)'
[1]: https://www.passwordstore.org/
[+] xwmx|5 years ago|reply
Very cool. `pass` is awesome and I didn't realize it had the `pass edit` feature. I have written scripts that use the 1Password and Keychain command line tools, and I definitely want `nb` to use all three of these, maybe via a plugin.
[+] zorbash|5 years ago|reply
It looks incredible, rich in features and the git syncing capability is neat.

My only wish would be to be able to import my bookmarks somehow. A few months back wrote my one CLI bookmark manager in Elixir (https://github.com/tefter/cli). It's impressive how much nb achieves yet being written in Bash.

[+] xwmx|5 years ago|reply
Thanks! That looks really interesting and very nicely designed (both your CLI and the web app).

It should be pretty easy to create a bookmark import plugin for `nb`, so that's likely to happen.

[+] sixhobbits|5 years ago|reply
Looks similar to jrnl.sh which I have been using for years. Combine with iTerm2 with it's configurable "drop down" terminal with a global shortcut and I can save anything from one word notes to full meeting minutes using the same flow.
[+] engineerX|5 years ago|reply
Wow, looks great. Using git to sync is super convenient -- there's so much infrastructure available to support git so it's basically no effort to start syncing with github etc.

I use dstask to manage my todo list which also uses git, it's excellent.

[+] jhoechtl|5 years ago|reply
Thank you for dstask. I also have to take a deeper look into this submission.

Are you aware of a currated list of git-synched solutions to note taking and todo management? I used to use emacs org which was very good in the beginning yet somehow started to overgrow to the point where I found myself more in organizing than get stuff done.

[+] filmgirlcw|5 years ago|reply
This looks fantastic! I’ve only spent a few minutes with this, but the design is really, really smart and the featureset is top-notch!

Congratulations!

[+] ontouchstart|5 years ago|reply
I am surprised to see there are 3,365 commits of this project with a 5-year gap: https://github.com/xwmx/nb/graphs/contributors

Perhaps there are some interesting stories that the author would like to tell?

[+] xwmx|5 years ago|reply
Yeah, it's a little unusual. No big story. I just did an early version and then didn't update it for a long time, then got hooked on working on it again over the past few months.

I don't know what to say about the number of commits. My working style on this project has involved a lot of smaller commits and little feature iterations, maybe because of the single big script and single big README, or maybe something about the feedback loop of this style of development.

[+] darekkay|5 years ago|reply
That's some impressive documentation - did you write (and update) it all by hand, or is it semi-automatically updated from the CLI help page?

Shameless plug for people who are just interested in the bookmarks part: I've created Static Marks [1], an open-source tool which turns plain-text YAML bookmark collections into a shareable HTML web app.

[1] https://github.com/darekkay/static-marks

[+] vinebase-albert|5 years ago|reply
I love all of this! Just need a similar web-based GUI so my coworkers can use the same back-end technology without having to use the CLI.
[+] etherio|5 years ago|reply
You can check out https://github.com/Uzay-G/archivy/. It's quite similar except uses a web interface. We're building it out and are working on adding a login system so people can host instances publicly with multiple users.
[+] hghghhhjuu|5 years ago|reply
If it’s all just plain text, you could just put it on GitHub / gitlab and edit the files from the built in “raw” editors.
[+] haroldegibbons|5 years ago|reply
I prefer using Vim (or Emacs), git and grep for things like this. They're everywhere and have stood the test of time. Are there any particular advantages I'm missing here? Either way thanks for sharing; it's helpful to see how other people do notes.
[+] xwmx|5 years ago|reply
FWIW, the core idea in `nb` is that it grew out of exactly that toolset and philosophy and develops it into a single, streamlined interface with a bunch of conveniences and features. It embraces that model and is intended to support it.
[+] dengsauve|5 years ago|reply
This looks fantastic, just from a quick download and playing around for 5 minutes I know this is going to come in handy. I don't always have a note taker open, but I almost always have a terminal open.
[+] erling|5 years ago|reply
This looks amazing! Love how simple yet powerful it is. Great job!
[+] nathias|5 years ago|reply
I was searching for something like this and thinking of creating it myself, glad I don't have to now. Can it import evernote notes/notebooks?
[+] w0m|5 years ago|reply
Wow. Is This is the child of Gina Trapani's old notes.sh? I feel like I've watched this grow incredibly over the last 15 years...
[+] pantulis|5 years ago|reply
Did Gina had some "notes.sh" script? I can only remember her "todo.txt" for todos. This can perfectly replace it, yes, and it is very similar in spirit.