Bearcli stuck unable to write attachments

  • Bear Version: 2.8.1
  • OS Version: 26.4.1 or 26.5
  • What were you doing:slight_smile: I’m trying to use the CLI to add attachments to some notes.
/Applications/Bear.app/Contents/MacOS/bearcli attachments add --title "asdf" < ~/Desktop/Screenshot\ 2026-03-15\ at\ 9.22.33 PM.png  --filename "file.png"
Error: No note with title: asdf (in notes — use note ID for trash/archive)
  • What feature did you use: bearcli
  • What happened
    • This error, time after time. No matter whether Bear is running or not. Tried across several hour today. Across restarts of the machine. Across a macos version upgrade
  • What did you expect to happen
    • I expect the bearcli attachments add command to be able to add attachments to notes

At the same time, I’ve seen some attachments on some notes apparently disappear. I can see them if I search inside the bear ~/Library/Group Containers/9K33E3U3T4.net.shinyfrog.bear/Application Data/ directory… but they don’t show up, either as previews in the list view nor on the note view.

This is not true for all of my notes, but for a handful of them.

I tried creating new notes with the same attachments and had the same problem. This problem (viewing attachments) is affecting my ios devices as well.

Is there a way to reset sync or the bear db so-to-speak without deleting all my notes?

It seems the note must already exist to add an attachment to it. I got it to work doing this. If you give the attachment a different name, be sure to include the file extension (which you did), else Bear sees it as just data. If you use the fish shell, you’ll need to remove the $. It would be nice to be able to create the note and add an attachment in a single command

cat 'CleanShot 2026-05-12 at 12.52.39@2x.png' | bearcli attachments add $(bearcli create "Brand New Note" --fields id) --filename 'My Screenshot.png'

Thanks so much for the response. This is a good pointer. In my case it didn’t help and my note was pre-existing, but I might’ve guessed it would create the note if it didn’t exist.