bear-cli
bear-cli is a native Rust CLI for Bear.app on macOS.
It reads Bear's local SQLite database in read-only mode. It sends write and UI actions through Bear's bear://x-callback-url/... scheme.
Usage
Requirements
- macOS
- Bear.app installed
- local access to Bear's database under a Bear group container such as:
~/Library/Group Containers/<TEAM_ID>.net.shinyfrog.bear/Application Data/database.sqlite
By default bear-cli discovers this dynamically. You only need --database or BEAR_DATABASE if you want to override it.
Installation
From crates.io
From source
The installed binary name is bear.
Read commands
These commands read Bear's local SQLite database directly:
open-notetagsopen-tagsearchuntaggedtodotodaylocked
Examples:
Write and action commands
These commands ask Bear.app itself to perform the action through its URL scheme:
createadd-textadd-filegrab-urltrasharchiverename-tagdelete-tagraw
Examples:
Authentication
Some Bear x-callback actions support an API token. Save it once with:
The saved token currently matters most for raw:
You can also pass a token explicitly:
Notes
- macOS only
- Bear must be installed for write/action commands
- write commands currently launch Bear successfully but do not capture x-callback return payloads back into the terminal
- read commands reflect Bear's local database state, not remote sync state
- encrypted and locked notes are intentionally filtered from several list/search commands
Development