bear-notes
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBear Notes
Bear笔记
Use to create, read, and manage notes in Bear on macOS.
grizzlyRequirements
- Bear app installed and running
- For some operations (add-text, tags, open-note --selected), a Bear app token (stored in )
~/.config/grizzly/token
在macOS上使用创建、查看和管理Bear中的笔记。
grizzlyGetting a Bear Token
要求
For operations that require a token (add-text, tags, open-note --selected), you need an authentication token:
- Open Bear → Help → API Token → Copy Token
- Save it:
echo "YOUR_TOKEN" > ~/.config/grizzly/token
- 已安装并运行Bear应用
- 部分操作(add-text、tags、open-note --selected)需要Bear应用令牌(存储在中)
~/.config/grizzly/token
Common Commands
获取Bear令牌
Create a note
bash
echo "Note content here" | grizzly create --title "My Note" --tag work
grizzly create --title "Quick Note" --tag inbox < /dev/nullOpen/read a note by ID
bash
grizzly open-note --id "NOTE_ID" --enable-callback --jsonAppend text to a note
bash
echo "Additional content" | grizzly add-text --id "NOTE_ID" --mode append --token-file ~/.config/grizzly/tokenList all tags
bash
grizzly tags --enable-callback --json --token-file ~/.config/grizzly/tokenSearch notes (via open-tag)
bash
grizzly open-tag --name "work" --enable-callback --json对于需要令牌的操作(add-text、tags、open-note --selected),你需要一个认证令牌:
- 打开Bear → 帮助 → API令牌 → 复制令牌
- 保存令牌:
echo "YOUR_TOKEN" > ~/.config/grizzly/token
Options
常用命令
—
创建笔记
Common flags:
- — Preview the URL without executing
--dry-run - — Show the x-callback-url
--print-url - — Wait for Bear's response (needed for reading data)
--enable-callback - — Output as JSON (when using callbacks)
--json - — Path to Bear API token file
--token-file PATH
bash
echo "Note content here" | grizzly create --title "My Note" --tag work
grizzly create --title "Quick Note" --tag inbox < /dev/nullConfiguration
通过ID打开/查看笔记
Grizzly reads config from (in priority order):
- CLI flags
- Environment variables (,
GRIZZLY_TOKEN_FILE,GRIZZLY_CALLBACK_URL)GRIZZLY_TIMEOUT - in current directory
.grizzly.toml ~/.config/grizzly/config.toml
Example :
~/.config/grizzly/config.tomltoml
token_file = "~/.config/grizzly/token"
callback_url = "http://127.0.0.1:42123/success"
timeout = "5s"bash
grizzly open-note --id "NOTE_ID" --enable-callback --jsonNotes
向笔记追加文本
- Bear must be running for commands to work
- Note IDs are Bear's internal identifiers (visible in note info or via callbacks)
- Use when you need to read data back from Bear
--enable-callback - Some operations require a valid token (add-text, tags, open-note --selected)
bash
echo "Additional content" | grizzly add-text --id "NOTE_ID" --mode append --token-file ~/.config/grizzly/token—
列出所有标签
—
bash
grizzly tags --enable-callback --json --token-file ~/.config/grizzly/token—
搜索笔记(通过open-tag)
—
bash
grizzly open-tag --name "work" --enable-callback --json—
可选参数
—
通用参数:
- — 预览URL但不执行
--dry-run - — 显示x-callback-url
--print-url - — 等待Bear的响应(读取数据时需要)
--enable-callback - — 以JSON格式输出(使用回调时)
--json - — Bear API令牌文件的路径
--token-file PATH
—
配置
—
Grizzly会从以下位置读取配置(按优先级排序):
- 命令行参数
- 环境变量(、
GRIZZLY_TOKEN_FILE、GRIZZLY_CALLBACK_URL)GRIZZLY_TIMEOUT - 当前目录下的
.grizzly.toml ~/.config/grizzly/config.toml
示例:
~/.config/grizzly/config.tomltoml
token_file = "~/.config/grizzly/token"
callback_url = "http://127.0.0.1:42123/success"
timeout = "5s"—
注意事项
—
- 执行命令时必须确保Bear正在运行
- 笔记ID是Bear的内部标识符(可在笔记信息或通过回调查看)
- 当需要从Bear读取数据时,请使用参数
--enable-callback - 部分操作需要有效的令牌(add-text、tags、open-note --selected)