I've used Apple Notes for years because it syncs fast and stays out of the way. But when I'm writing in the terminal, there's always been friction getting Markdown into Apple Notes.
Existing tools were either bloated or read-only. So I built Stash: push a Markdown file to Apple Notes, pull changes back. It uses YAML frontmatter to track which note belongs to which file.
Built with Bash, AppleScript, and Pandoc. No databases, no daemons, no config files. Install via Homebrew.
Happy to take suggestions and answer questions about the quirks I ran into along the way.
I love Apple Notes, but I also love writing in vim; looks like I can finally reconcile those two things thanks to your project. Nice work!
> questions about the quirks
I've used a decent amount of AppleScript to automate things on my Mac, so I know it's a powerful tool but not easy to just jump into, even when you're already familiar with that bizarre syntax. What kinds of quirks did you run into?
It's a mix of the lack of documentation for the response payloads and the integration with the shell commands. My tip would be to wrap everything in shell, handle errors on the AppleScript end, and keeping it incredibly simple.
For example, the errors raised from the AppleScript without printing the error inside a try-catch are incredibly dim. So instead I've opted to wrap them on the AppleScript level, print the error and return an empty string. Kinda reminded me of old-school shitty C code.
>Happy to take suggestions and answer questions about the quirks I ran into along the way.
Got up out of bed from doomscrolling to play with/implement this! My less-technical partner tends to reach for Apple Notes and I have offered/threatened to make something, but they've kept (begrudgingly) relaunching VSCode after a "oof, I know it was just real quick." Thanks for the inspiration/headstart.
Yea, it was a bummer they don't have access to it on the AppleScript side. I considered using an x-callback for it but it's not that stable either which is what I was going for. Maybe in the future
Oooh not yet, I've thought about it, as well as some other ideas of bulk syncing and diffs. I'd love for open issues—or better so PR's—on the repo!
What I tend to do—you can also see in the readme—is that I push it to Notes, then pull if I've made any changes. When you already have the id on the note, you can move your note anywhere you'd like (:
This is awesome! I’ve been looking for a way to batch export my notes out of Apple notes, will this work for that purpose?
I totally agree with you that most notes apps miss the mark. I’m working on one now which I hope satisfies the same requirements as Apple notes(dead simple, iCloud sync, free) but has some things I want (improved search, first class markdown support).
I’ve been using it as my daily driver for a while, but it’s not quite ready for other users yet. I wrote a bit about it in my year in review[1] under the section “Not Another Notes App!”.
Question: is there a way to make this automatic on state changes? I had an issue recently where a child accidentally overwrote my huge Apple notes and I couldn’t undo the change, or restore my history
Damn! I'm so sorry to hear that :((
Happened to me too and I also find it kinda frustrating.
As you can see on the README, my first backlog item is to add a diff mechanism. Would also love for help but either way I'm going to add it.
In the meanwhile all I can offer is to buy you a coffee and apologize <3
Even though: "Forecasts may tell you a great deal about the forecaster; they tell you nothing about the future". But historically speaking, AppleScript is pretty stable.
The big benefit is that you get to use the Apple Notes app. I prefer Apple Notes on my phone, to be honest. I haven't used Obsidian's app on iOS in over a year.
I personally put all my work-related dev notes in Obsidian, and all my life-related quick notes in Apple Notes.
Obsidian still does not support iOS widgets. I use the app, but it's honestly still a major annoyance, since I cannot add to-dos with one swipe as I would be able to do with Apple Notes.
Existing tools were either bloated or read-only. So I built Stash: push a Markdown file to Apple Notes, pull changes back. It uses YAML frontmatter to track which note belongs to which file.
Built with Bash, AppleScript, and Pandoc. No databases, no daemons, no config files. Install via Homebrew. Happy to take suggestions and answer questions about the quirks I ran into along the way.
reply