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中的笔记。
grizzly前提要求
- 已安装并运行Bear应用
- 部分操作(add-text、tags、open-note --selected)需要Bear应用token(存储在)
~/.config/grizzly/token
Getting a Bear Token
获取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
对于需要token的操作(add-text、tags、open-note --selected),你需要一个认证token:
- 打开Bear → 帮助 → API Token → 复制Token
- 保存token:
echo "YOUR_TOKEN" > ~/.config/grizzly/token
Common Commands
常用命令
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创建笔记
bash
echo "Note content here" | grizzly create --title "My Note" --tag work
grizzly create --title "Quick Note" --tag inbox < /dev/null通过ID打开/读取笔记
bash
grizzly open-note --id "NOTE_ID" --enable-callback --json向笔记追加文本
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 --jsonOptions
选项
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
通用参数:
- — 仅预览要调用的URL,不实际执行
--dry-run - — 显示x-callback-url
--print-url - — 等待Bear的响应(读取数据时需要该参数)
--enable-callback - — 以JSON格式输出(使用回调时生效)
--json - — Bear API token文件的路径
--token-file PATH
Configuration
配置
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"Grizzly会按以下优先级读取配置:
- CLI参数
- 环境变量(、
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"Notes
注意事项
- 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)
- 命令生效需要Bear处于运行状态
- 笔记ID是Bear的内部标识符(可在笔记信息中查看或通过回调获取)
- 需要从Bear读取返回数据时,请使用参数
--enable-callback - 部分操作需要有效的token(add-text、tags、open-note --selected)