Skip to content

clippingkk/cli

Repository files navigation

CK-CLI codecov

High-performance command-line tool for parsing Kindle clippings into structured JSON and syncing with ClippingKK web service.

video guide

Installation

go to release page and download one.

Usage

# Parse to JSON
ck-cli parse -i "My Clippings.txt" -o output.json

# Parse from stdin
cat "My Clippings.txt" | ck-cli parse > output.json

# Extract unique titles
cat "My Clippings.txt" | ck-cli parse | jq -r .[].title | sort -u

Options:

  • -i, --input: Input file path (default: stdin)
  • -o, --output: Output file path or http for web sync (default: stdout)

Output format:

[{
  "title": "Book Title",
  "content": "Highlighted text",
  "pageAt": "78",
  "createdAt": "2019-03-27T19:57:26Z"
}]

Web Sync

# Authenticate (get token from https://clippingkk.annatarhe.com)
ck-cli login --token "YOUR_TOKEN"

# Sync to ClippingKK
ck-cli parse -i "My Clippings.txt" -o http

Configuration stored in ~/.ck-cli.toml.

Development

Requirements: Go 1.24+

git clone https://github.com/clippingkk/cli.git
cd cli
make build    # Build binary
make test     # Run tests
make lint     # Run linter

See Makefile for all commands.

Features

  • Multi-language parsing (Chinese, English, etc.)
  • Flexible I/O (files, stdin/stdout, web sync)
  • High-performance processing of large files
  • Direct ClippingKK web service integration
  • Cross-platform (macOS, Linux, Windows)

Contributing

See CLAUDE.md for development guidelines.

License

MIT

About

a command-line interface to parse `My Clippings.txt` to JSON format

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •