npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

savethis

v0.3.1

Published

CLI tool to download and organize Gmail attachments with AI document summarization

Readme

Saveth.is CLI

Download, organize, and analyze Gmail attachments with AI document summarization.

Website: https://saveth.is
Documentation: https://saveth.is/cli

Development

# Install dependencies
bun install

# Run directly
bun src/index.ts accounts add
bun src/index.ts accounts
bun src/index.ts gmail export --query "has:attachment"
bun src/index.ts gmail ask "What documents do I have about project X?"
bun src/index.ts document summarize contract.pdf

# Build
bun run build

Quick Start

# Install
npm install -g savethis

# Set your Google Generative AI API key (for AI analysis)
savethis config:set googleApiKey your-api-key-here

# Authenticate with your first Gmail account
savethis accounts add

# List all authenticated accounts
savethis accounts

# Download, index, and analyze attachments in one step
savethis gmail export --query "has:attachment" --output ./my-docs

# Generate Gmail search query with AI
savethis gmail query

# Chat with your email data using AI
savethis gmail ask "What documents did I receive last week?"

# Summarize any document with AI
savethis document summarize contract.pdf

# Export database to markdown
savethis export markdown --output export.md

Features

  • Download and search Gmail attachments across accounts
  • Extract text from any file format (PDF, Office, images)
  • Skip duplicates and only process new content
  • Full-text search of documents
  • AI chat interface for natural language queries
  • Document summarization with AI
  • Gmail query generation with AI
  • Export database to markdown for AI analysis
  • Persistent settings and authentication

Supported File Formats

  • Documents: PDF, DOCX, TXT, RTF, Markdown
  • Images: JPG, PNG, WebP, GIF (with automatic OCR)
  • Spreadsheets: XLSX, CSV, TSV
  • Presentations: PPTX, PPT
  • Code: Any text-based code files

Gmail Commands

Generate Search Query

# Generate Gmail search query with AI
savethis gmail query

# Example: "important emails with attachments from last week"
# Generates: "is:important has:attachment newer_than:2w older_than:1w"

Learn more about the AI-powered Gmail Query Generator.

Download and Index

# Download from all accounts with default settings
savethis gmail export

# Download with a specific query
savethis gmail export --query "has:attachment from:[email protected]"

# Download to a specific folder
savethis gmail export --output ./my-documents

# Download from a specific account
savethis gmail export --account [email protected]

AI Chat Interface

# Start an AI chat session about your emails and documents
savethis gmail ask

# Ask a specific question directly
savethis gmail ask "What PDFs did I receive from John last month?"
savethis gmail ask "Find my tax documents from 2023"
savethis gmail ask "Summarize my medical expenses"
savethis gmail ask "What contracts expire this year?"
savethis gmail ask "How much did I spend on software?"

# Specify a folder to use
savethis gmail ask --folder ./my-documents "How much did I spend on food last month?"

Document Summarization

# Summarize any document with AI
savethis document summarize contract.pdf

# See OCR results and summary
savethis document summarize receipt.jpg --show-extraction

# Control extraction display
savethis document summarize report.docx --max-extraction 100

# Use different AI models
savethis document summarize code.js --model gemini-pro

Learn more about AI-Powered Document Summarization.

Export Commands

# Export database to markdown
savethis export markdown

The markdown export creates a single file containing all emails and attachments, perfect for uploading to AI tools like Google AI Studio.

Configuration

The CLI uses a configuration file stored in ~/.savethis/config.json. You can manage your configuration with these commands:

# View current configuration
savethis config

# Set a configuration value
savethis config:set googleApiKey your-api-key-here
savethis config:set outputDir ~/Downloads/email-attachments
savethis config:set model gemini-1.5-flash

# Get a specific configuration value
savethis config:get googleApiKey

Available configuration options:

  • googleApiKey: Your Google Generative AI API key
  • outputDir: Default directory for saving attachments
  • model: Default AI model for analysis

Account Management

# List all authenticated accounts
savethis accounts

# Add a new Gmail account
savethis accounts add

# Remove an account
savethis accounts remove [email protected]

Privacy & Security

  • All data stays on your computer
  • Uses your own API keys
  • No cloud storage of your documents
  • Open source and transparent

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.

For issues with the AI chat interface, ensure you have set a valid Google API key using savethis config:set googleApiKey.

Related Documentation