0.1.0 • Published 4 months ago
savethis v0.1.0
Saveth.is CLI
Download and organize Gmail attachments from multiple accounts with fancy progress bars.
Installation
# Install globally
npm install -g savethis
# Or use npx
npx savethis
Quick Start
# Authenticate with your first Gmail account
savethis auth
# Add more accounts
# Use add-account to always prompt for a new account (recommended)
savethis add-account
# Or use auth which will reuse existing accounts if available
savethis auth
# List all authenticated accounts
savethis accounts
# Remove an account
savethis remove-account user@gmail.com
# Download attachments from all accounts in parallel
savethis download --query "has:attachment" --parallel
# Download from a specific account
savethis download --query "has:attachment" --account user@gmail.com
Features
- Download attachments from multiple Gmail accounts
- Skip duplicate attachments automatically
- Track downloads with fancy progress bars
- Organize attachments by account and email subject
Commands
Usage: savethis [options] [command]
CLI tool to download and organize Gmail attachments
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
auth Authenticate with Gmail (adds a new account if run multiple times)
add-account Add a new Gmail account (always prompts for a new account)
accounts List all authenticated accounts
remove-account <email> Remove an authenticated account
download [options] Download attachments from Gmail
help [command] display help for command
Download Options
Usage: savethis download [options]
Download attachments from Gmail
Options:
-q, --query <query> Gmail search query
-o, --output <directory> Output directory for attachments (default: "./attachments")
-m, --max <number> Maximum number of emails to process (0 for unlimited) (default: "0")
-a, --account <email> Specific account to use (if not provided, will use all accounts)
-p, --parallel Download from all accounts in parallel (default: false)
-h, --help display help for command
Gmail Search Query Examples
has:attachment
- All emails with attachmentshas:attachment newer_than:30d
- Emails with attachments from the last 30 dayshas:attachment from:example@gmail.com
- Emails with attachments from a specific senderhas:attachment filename:pdf
- Emails with PDF attachmentshas:attachment larger:5M
- Emails with attachments larger than 5MB
Troubleshooting
If you see "Gmail API has not been used in project..." error, visit the URL in the error message to enable the Gmail API.
License
MIT
0.1.0
4 months ago