微算力 · API 导航与自营网关
API 接入 EN
未登录登录
📚

Kindle读书笔记智能管理专家

Kindle Clip CLI · v1.1.0
入口已确认,内容待校验 文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
效率 安全 B 级 作者 emersonding 公开目录收录
689 下载 0 安装 3.4k 收藏 2 浏览

简介

开源CLI工具,专为AI Agent设计,可高效解析、搜索、过滤并导出Kindle标注笔记至Markdown,助力知识整理与二次创作。

原始描述

Parse, search, filter, and export Kindle highlights and notes from "My Clippings.txt" via a command-line tool with Markdown output.

通过你的 Agent 添加

安装目录:kindle-clip-cli/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/kindle-clip-cli/
Codex CLI~/.codex/skills/kindle-clip-cli/
DeepSeek Harness~/.agents/skills/kindle-clip-cli/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

Kindle-Clip-CLI 是一款专为AI Agent优化的命令行工具,用于处理Kindle设备生成的"My Clippings.txt"标注文件。其核心工作流程包含三个层面:初始化配置(通过kindle-clip set设定默认文件路径)、数据检索(支持list列举书籍、print导出标注、search关键词搜索)以及结果输出(Markdown格式导出或终端直显)。工具采用分层路径解析策略,优先读取显式参数,其次检查KINDLE_CLIP_PATH环境变量,最后回退至配置文件~/.config/kindle-clip/config.json,确保灵活适配多场景调用。

过滤系统支持多维度交叉筛选:日期范围(--from/--to)、书名(--book)、作者(--author)及关键词(--query),所有匹配均为不区分大小写的部分匹配。输出采用结构化Markdown格式,标注以块引用呈现,笔记以> **Note**:前缀标识,便于后续知识库集成或文档生成。

显著优点

AI原生设计:工具专为Agent交互优化,支持自动化脚本集成,--export-md参数可直接生成可供下游流程处理的Markdown文件。零依赖运行时:基于Go编译为单一二进制文件,无外部运行时依赖,部署极简。多平台覆盖:提供macOS、Linux、Windows的amd64/arm64预编译二进制。智能路径解析:自动识别Kindle设备标准目录结构,降低配置门槛。灵活过滤组合:支持多条件叠加过滤,满足精准检索需求。开源可审计:代码托管于GitHub,构建流程透明,安全可控。

潜在缺点与局限性

硬件绑定限制:仅支持物理Kindle设备的"My Clippings.txt"格式,无法直接读取Kindle App(iOS/Android/macOS/Windows版)的标注数据,跨平台用户需手动导出。格式解析脆弱性:依赖Kindle固件生成的特定文本格式,亚马逊若更新导出格式可能导致解析失败。功能边界清晰:专注于标注文本处理,不提供OCR、PDF批注提取或跨阅读器(如Kobo、微信读书)数据整合。无云端同步:纯本地工具,不内置云存储或跨设备同步机制。中文分词局限:搜索功能基于简单字符串匹配,未集成中文分词或语义搜索能力。

适合的目标群体

深度阅读者:长期积累Kindle标注、需要系统性整理个人知识库的用户。学术研究者:需按主题、时间、书目交叉检索文献摘录的科研人员。AI工作流构建者:希望将Kindle笔记自动导入Obsidian/Notion/Logseq等笔记系统的自动化爱好者。内容创作者:需要基于阅读素材进行二次创作(书评、文章、课程)的写作者。开发者与极客:偏好命令行工具、追求数据本地化和可编程性的技术用户。

使用风险

数据丢失风险:工具为只读设计,但用户若手动编辑原始"My Clippings.txt"文件可能导致Kindle端数据损坏。路径配置漂移:多设备用户若未统一KINDLE_CLIP_PATH环境变量,可能出现Agent调用路径错误。性能瓶颈:极端情况下(数万条标注、多年积累),未索引的全文搜索可能存在秒级延迟。安全更新滞后:作为个人开源项目,安全补丁依赖维护者响应速度,建议生产环境锁定特定版本。二进制来源信任:从GitHub Releases下载的二进制需验证SHA256校验值,防范供应链攻击。

技能正文

Kindle-Clip-CLI

Parse, print, search, filter and export Kindle highlights and notes from the command line.

What this skill does

This skill provides the kindle-clip CLI tool for processing Kindle's "My Clippings.txt" file. It's designed to be AI agent-friendly, with clean Markdown output and intuitive filtering options.

Key capabilities:

  • Parse and list all books from Kindle clippings
  • Print highlights and notes for specific books or all books
  • Search across all notes by keyword, date range, author, or book title
  • Export results to Markdown files
  • Filter by date ranges, book titles, authors, or keywords

Installation

Recommended: Manual Install (macOS/Linux)

  1. Download the latest binary for your platform from GitHub Releases.
  2. Make it executable: chmod +x kindle-clip
  3. Move kindle-clip to a directory in your PATH (e.g., ~/bin or /usr/local/bin):
    mv kindle-clip /usr/local/bin/kindle-clip
    

Build from Source

git clone https://github.com/emersonding/kindle-clip-processor.git
cd kindle-clip-processor
go build -o ./bin/kindle-clip ./cmd/kindle-clip
# Move ./bin/kindle-clip to your PATH

Commands

Set default path

Save the path to your Kindle clippings (usually found in ~/Documents/Kindle/):

kindle-clip set ~/Documents/Kindle/My\ Clippings.txt

This saves the path to ~/.config/kindle-clip/config.json. Useful for repeated operations without specifying the path each time.

List books

List all books with highlights:

# Using saved path
kindle-clip list

# Using explicit path
kindle-clip list ~/Documents/Kindle

# Filter by author
kindle-clip list --author "Yuval Noah Harari"

# Verbose mode (includes clip counts and date ranges)
kindle-clip list --verbose

# Export to file
kindle-clip list --export-md ./books.md

Print highlights

Print all highlights and notes:

# Print all highlights from all books
kindle-clip print

# Print highlights for a specific book
kindle-clip print --book "Sapiens"

# Filter by date range
kindle-clip print --from 2024-01-01 --to 2024-12-31

# Combine filters
kindle-clip print --book "Thinking, Fast and Slow" --from 2024-01-01

# Export to Markdown file
kindle-clip print --book "Sapiens" --export-md ./sapiens-notes.md

# Verbose mode (includes Kindle metadata)
kindle-clip print --verbose

Search notes

Search for specific keywords across all notes:

# Search for a keyword
kindle-clip search confidence

# Search with filters
kindle-clip search bias --author "Daniel Kahneman"

# Search and export results
kindle-clip search metacognition --export-md ./metacognition-notes.md

# Search with date range
kindle-clip search "system 1" --from 2024-01-01

Common Options

All list, print, and search commands support:

  • --from YYYY-MM-DD - Include notes created on/after this date
  • --to YYYY-MM-DD - Include notes created on/before this date
  • --book TEXT - Include only notes whose book title matches TEXT (case-insensitive)
  • --author TEXT - Include only notes whose author matches TEXT (case-insensitive)
  • --query TEXT - Include matching note text (used in search command)
  • --export-md PATH - Save Markdown output to a file
  • --verbose - Include Kindle metadata in output

Output Format

Book List

Compact by default:

# Books

- **Sapiens (Yuval Noah Harari)**
- **Thinking, Fast and Slow (Daniel Kahneman)**

Verbose mode adds clip counts and date ranges:

# Books

- **Sapiens (Yuval Noah Harari)**
  - clips: 42
  - first: 2024-01-15T10:30:00Z
  - last: 2024-02-20T14:22:00Z

Highlights and Notes

Organized by book with Markdown formatting:

# Sapiens (Yuval Noah Harari)

> Culture tends to argue that it forbids only that which is unnatural. But from a biological perspective, nothing is unnatural. Whatever is possible is by definition also natural.

> **Note**: This connects to the social construction argument in sociology.

# Thinking, Fast and Slow (Daniel Kahneman)

> The confidence that individuals have in their beliefs depends mostly on the quality of the story they can tell about what they see, even if they see little.

Notes are prefixed with > **Note**: while highlights use plain > blockquotes.

Path Resolution

kindle-clip resolves the clippings file path in this order:

  1. Explicit file or directory argument
  2. KINDLE_CLIP_PATH environment variable
  3. Saved config in ~/.config/kindle-clip/config.json

If you provide a directory instead of a file, it looks for:

  • <dir>/documents/My Clippings.txt (Kindle's typical location)
  • <dir>/My Clippings.txt (fallback)

Use Cases for AI Agents

Research Assistant

When a user asks "What did I highlight about cognitive biases?":

kindle-clip search "cognitive bias" --export-md ./cognitive-bias-notes.md

Book Summary

When a user asks "Show me my notes from Sapiens":

kindle-clip print --book "Sapiens" --export-md ./sapiens-summary.md

Reading Timeline

When a user asks "What books did I read in 2024?":

kindle-clip list --from 2024-01-01 --to 2024-12-31 --verbose

Cross-Book Research

When a user asks "Find all my notes about decision-making":

kindle-clip search "decision making" --export-md ./decision-making-research.md

Tips for AI Agents

  1. Always use --export-md when the user might want to save or review results later
  2. Use --verbose when users need full context or metadata
  3. Combine filters for precise results (e.g., --book "Sapiens" --from 2024-01-01)
  4. Case-insensitive matching - filters are case-insensitive, so "sapiens" matches "Sapiens"
  5. Partial matches work - --book "Think" will match "Thinking, Fast and Slow"
  6. Set the path once - Use kindle-clip set at the start of a session for cleaner commands

Error Handling

If kindle-clip is not installed, guide the user to install it using the installation instructions above.

If no path is configured, prompt the user to either:

  1. Run kindle-clip set <path> to save a default path
  2. Provide a path explicitly in each command
  3. Set the KINDLE_CLIP_PATH environment variable

Dependencies

  • Go binary (no runtime dependencies once built)
  • Works on macOS, Linux, and Windows (amd64 and arm64)

Repository

Source code and releases: https://github.com/emersonding/kindle-clip-processor

License

See the main repository for license information.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

content-mediaproductivitydocsautomationdata-analytics

同类 Skill