Rust command line client

Hi all,

I created a simple Supernotes command line client in Rust. It’s mainly a quick way to create new cards from the terminal:

echo "Card body" | sn create "Card title"
sn create "Meeting notes" notes.md

Contributions very welcome, of course. It’s my first Rust project, so I am also interested in code style suggestions.

I disabled GitHub Discussions for now, let’s discuss roadmap ideas in this forum.

@connor: the name of the project might clash with any Rust client that you intend to develop yourself, especially if I release it as a crate. Any guidance on what would be permissible?

4 Likes

Looking great @jcassee! Like what you’ve done so far. We’re actually working on some improvements to the API which should streamline some parts of the client / reduce what you need to do yourself, so keep an eye out for that. And if there are other things you’d like to see that would make building a client lib easier / better, of course let us know.

With regards to naming, feel free to release it as a crate. If and when there is a Supernotes official Rust lib, I’m sure we can figure it out then!

I added some project tooling and released version 0.1.0:

GitHub
Crate

The GitHub release contains binaries for Windows, OS X and Linux. I only run Linux, so I’m not sure the others work. :slight_smile:

As for plans, I don’t intend it to become a TUI that simulates the Supernotes app. It should be useful in shell aliases, functions and scripts.

Concrete ideas:

  • Use a text editor to create notes. First line is the note title, subsequent lines the Markdown body (like git commit).
  • Search notes and either output the single matching note or the list of matching notes.
  • Edit a note by combining the previous two features.
1 Like