better bear

better bear

A CLI and MCP server for Bear notes via CloudKit. Use it from the terminal or let Claude read, search, and edit your notes.

curl -sL https://raw.githubusercontent.com/mreider/better-bear-cli/main/install.sh | bash

CLI

Create, search, edit, tag, and attach files from the terminal.

MCP Server

22 tools for Claude Desktop to manage your notes.

CloudKit

Same API as Bear Web. Syncs to all devices.

Open Source

MIT licensed. Universal macOS binary.


Install & Upgrade

Quick install

curl -sL https://raw.githubusercontent.com/mreider/better-bear-cli/main/install.sh | bash bcli auth

Upgrade

bcli upgrade # download latest bcli upgrade --check # check only

Run hash -r after upgrading. Restart Claude Desktop if using MCP.

Build from source

git clone https://github.com/mreider/better-bear-cli.git cd better-bear-cli && swift build -c release cp .build/release/bcli ~/.local/bin/bcli

Notes & Search

bcli lsList notes
bcli ls --tag work --jsonFilter by tag, JSON output
bcli ls --untaggedNotes with no tags
bcli ls --archivedArchived notes
bcli ls --trashedTrashed notes
bcli get <id>View note with metadata
bcli get <id> --rawJust the markdown
bcli get <id> --jsonJSON output (includes parsed front matter)
bcli search "query"Full-text search (title, tags, body)
bcli search "q" --since yesterdayModified after date
bcli search "q" --before 2026-06-01Modified before date

Date filters: today yesterday last-week last-month last-year or YYYY-MM-DD


Create & Edit

bcli create "Title" -b "Body"Create a note
bcli create "T" -t "t1,t2"With tags
bcli create "T" --stdinBody from stdin
bcli create "T" --fm "status=draft"With YAML front matter
bcli edit <id> --append "text"Append to end
bcli edit <id> --append "x" --after "Heading"Insert after a heading
bcli edit <id> --replace-section "H" --section-content "new"Replace section content
bcli edit <id> --editorOpen in $EDITOR
bcli edit <id> --stdinReplace from stdin

Attachments

Uploads to iCloud. Images (jpg, png, gif, webp, heic, svg) render inline. Other files embed.

bcli attach <id> photo.jpgAppend image to note
bcli attach <id> img.png --after "Profile"After a heading
bcli attach <id> img.png --before "Footer"Before text
bcli attach <id> img.png --prependAfter title
bcli attach name.png --base64 <data>From base64 (programmatic)

Tags

bcli tagsTag tree with counts
bcli tag add <id> "work"Add tag to note
bcli tag remove <id> "work"Remove tag from note
bcli tag rename "old" "new"Rename across all notes
bcli tag delete "tag"Remove from all notes

Archive, Trash & TODOs

bcli archive <id>Archive a note
bcli archive <id> --undoUnarchive
bcli trash <id>Move to trash
bcli todoNotes with open TODOs
bcli todo <id>View/toggle interactively
bcli todo <id> --toggle 3Toggle item 3

YAML Front Matter

Bear collapses --- blocks. Use for status, projects, dates, or any metadata.

bcli create "T" --fm "status=draft" "project=alpha"Create with front matter
bcli get <id> --jsonIncludes parsed frontmatter object
bcli edit <id> --set-fm "status=done"Set/update a field
bcli edit <id> --remove-fm "draft"Remove a field

Library Tools

bcli statsNotes, words, tags, dates, top tags
bcli duplicatesFind notes with duplicate titles
bcli healthHealth report: duplicates, empties, orphans, conflicts
bcli syncSync to local cache
bcli sync --fullForce full re-sync
bcli export ./dirExport as markdown
bcli export --frontmatterWith YAML metadata
bcli export --tag workFilter by tag
bcli upgradeSelf-update to latest release
bcli mcp installInstall MCP server for Claude Desktop

MCP Server

22 tools for Claude Desktop. Install: cd mcp-server && npm install && npm run build && cd .. && bcli mcp install

bear_syncSync from iCloud
bear_list_notesList with tag/archive/trash filters
bear_get_noteFull content + parsed front matter
bear_searchFull-text search with date filters
bear_get_tagsTag hierarchy with counts
bear_create_noteCreate with tags and front matter
bear_edit_noteAppend, replace, section edit, front matter
bear_attach_fileUpload image/file to iCloud
bear_archive_noteArchive or unarchive
bear_trash_noteMove to trash
bear_add_tagAdd tag to note
bear_remove_tagRemove tag from note
bear_rename_tagRename across all notes
bear_delete_tagDelete from all notes
bear_find_untaggedList untagged notes
bear_list_todosNotes with incomplete TODOs
bear_get_todosTODO items from a note
bear_toggle_todoToggle TODO completion
bear_note_statsLibrary statistics
bear_find_duplicatesFind duplicate titles
bear_health_checkLibrary health report

Scripts

Shell scripts for common workflows in scripts/:

daily-note.shCreate a daily note from template (skips if exists)
meeting-note.shMeeting note with attendees and action items
backup.shExport all notes + git commit (cron-friendly)
cleanup-empty.shFind and optionally trash empty notes
bulk-tag.shAdd a tag to notes matching a search
stale-notes.shFind notes not modified in N days
weekly-review.shSummary of this week's activity
import-markdown.shImport a folder of .md files as notes

How It Works

Same CloudKit REST API as Bear Web. Notes live in your iCloud private database. Does not touch Bear's local SQLite — safe to use with Bear open on any device.

Buy Me A Coffee