0.1.0 • Published 4 months ago

savethis v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Saveth.is CLI

Download and organize Gmail attachments from multiple accounts with fancy progress bars.

npm license downloads

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 attachments
  • has:attachment newer_than:30d - Emails with attachments from the last 30 days
  • has:attachment from:example@gmail.com - Emails with attachments from a specific sender
  • has:attachment filename:pdf - Emails with PDF attachments
  • has: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