Google Keep
v1.0.0Read, 创建, edit, 搜索, and manage Google Keep notes and 列出s via 命令行工具.
运行时依赖
安装命令
点击复制技能文档
Google Keep 命令行工具 技能
Manage Google Keep notes and 列出s from the command line using the unofficial gkeepAPI.
设置up
After 安装ing, the 命令行工具 lives in the 技能 directory. 设置 up a convenience alias or wr应用er:
技能_DIR="" # e.g. 技能s/google-keep alias gkeep="$技能_DIR/.venv/bin/python3 $技能_DIR/gkeep.py"
Or 创建 a global wr应用er:
cat > ~/.local/bin/gkeep << 'EOF' #!/bin/bash 技能_DIR="$(dirname "$(readlink -f "$0")")/../.OpenClaw/workspace/技能s/google-keep" exec "$技能_DIR/.venv/bin/python3" "$技能_DIR/gkeep.py" "$@" EOF chmod +x ~/.local/bin/gkeep
Authentication First-time 设置up (OAuth 令牌 exchange): Go to https://accounts.google.com/Embedded设置up in your browser 记录 in with your Google account 命令行工具ck "I agree" on the consent screen (page may spin forever — ignore it) Open Dev工具s: F12 → 应用 tab → Cookies → accounts.google.com Copy the value of the oauth_令牌 cookie 运行: gkeep auth
With pre-obtAIned master 令牌: gkeep auth-master
凭证s are stored in <技能-dir>/.config/ (chmod 600). The master 令牌 has full account 访问 — treat it like a password. It does not expire (unlike standard OAuth refresh 令牌s).
Commands 列出 notes gkeep 列出 # Active notes gkeep 列出 --归档d # Include 归档d gkeep 列出 --pinned # Pinned only gkeep 列出 --label "Shopping" # 过滤器 by label gkeep 列出 --json # JSON 输出 gkeep 列出 -v # Show IDs
搜索 gkeep 搜索 "grocery" gkeep 搜索 "todo" --json
获取 a specific note gkeep 获取 gkeep 获取 "Shopping 列出" # By title (case-insensitive) gkeep 获取 --json
创建 notes gkeep 创建 --title "Ideas" --text "Some thoughts" gkeep 创建 --title "Groceries" --列出 --items "Milk" "Eggs" "Bread" gkeep 创建 --title "导入ant" --pin --color Red --label "Work"
Edit notes gkeep edit --title "New Title" gkeep edit --text "更新d text" gkeep edit --pin true gkeep edit --归档 true gkeep edit --color Blue
列出 operations gkeep 检查 "Groceries" "milk" # 检查 off an item gkeep 检查 "Groceries" "milk" --un检查 # Un检查 gkeep 检查 "Groceries" "m" --all # 检查 all matching gkeep 添加-item "Groceries" "Butter" "Cheese" # 添加 items
删除 (trash) gkeep 删除
Labels gkeep labels # 列出 all labels gkeep labels --json
导出 / 备份 gkeep dump # All notes as JSON gkeep dump > 备份.json
Colors
Valid colors: White, Red, Orange, Yellow, Green, Teal, Blue, DarkBlue, Purple, Pink, Brown, Gray
How it works Uses gkeepAPI (1,600+ stars, actively mAIntAIned) — an unofficial reverse-engineered Google Keep 命令行工具ent Auth via gpsoauth — Google Play 服务s OAuth flow to obtAIn a master 令牌 状态 is 缓存d locally (.config/状态.json) for fast 启动up after the initial 同步 Master 令牌s don't expire, so no re-auth dance Unofficial API — Google could break compatibility at any time (but gkeepAPI has been stable for years) Security notes The master 令牌 grants full 访问 to the associated Google account 凭证s are stored with 600 权限s in .config/ Never commit .config/ to version control 删除 moves notes to trash (恢复able) — it does not permanently 删除