raindrop-cli
AI-native CLI for Raindrop.io. Built with TypeScript and Bun.
Designed for AI agents and automation scripts. TOON format for maximum token efficiency, with optional JSON output for standard integrations.
Key Features
- AI-Native: Outputs TOON format by default to save on context tokens
- Situation Reports: High-level
context command for a quick "state of the world" overview
- Hierarchy Support: Create, move, and manage nested collections
- Batch Operations: Bulk update or delete bookmarks efficiently
- Dry Run Mode: Safe account management with
--dry-run flag
Installation
git clone <repo>
cd raindrop-cli
bun install
bun run src/index.ts --help
bun link
Quick Start
-
Get your API Token
Get a test token from https://app.raindrop.io/settings/integrations
-
Login (Verifies token before saving)
bun run src/index.ts login
-
Account Overview (The agent "situation report")
bun run src/index.ts context
Usage Examples
Authentication
raindrop login
raindrop whoami
raindrop logout
Overview Commands
raindrop context
raindrop structure
raindrop schema
Bookmark Management
raindrop search "python"
raindrop search "python" --pretty
raindrop search "python" --format json
raindrop get 123456
raindrop add "https://example.com" --title "Example" --tags "work,reference"
raindrop patch 123456 '{"title": "New Title", "tags": ["updated"]}'
raindrop delete 123456
raindrop suggest 123456
raindrop wayback "https://example.com"
Collection Management
raindrop collection create "Research"
raindrop collection create "AI Papers" --parent 123 --public
raindrop collection get 123
raindrop collection update 123 '{"title": "New Name"}'
raindrop collection delete 123
raindrop collection delete-multiple 123,456,789
raindrop collection reorder title
raindrop collection reorder -count
raindrop collection expand-all true
raindrop collection merge 123,456 789
raindrop collection clean
raindrop collection empty-trash
raindrop collection cover 123 "https://example.com/image.png"
raindrop collection set-icon 123 "robot"
Tag Management
raindrop tag delete "old-tag" "useless-tag"
raindrop tag delete "old-tag" --collection 123
raindrop tag rename "work" "career"
Batch Operations
raindrop batch update --ids 1,2,3 '{"tags": ["archived"]}'
raindrop batch update --ids 1,2,3 '{"collection": {"$id": 123}}'
raindrop batch delete --ids 1,2,3
Global Options
--dry-run | Log actions instead of making real API requests |
--format, -f | Output format: toon (default) or json |
--help, -h | Show help |
--version, -v | Show version |
Environment Variables
RAINDROP_TOKEN | API token (alternative to login command) |
Output Formats
TOON (Default)
Token-optimized format for AI agents. Tabular data with minimal overhead.
JSON
Standard JSON output for programmatic use:
raindrop search "python" --format json
Configuration
Config is stored in ~/.config/raindrop-cli/config.json
Development
bun run dev
bun run typecheck
bun run build
License
MIT