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

flowsquire

v1.0.9

Published

Local-first automation platform for organizing files on your computer. No cloud, no AI, no subscriptions — just simple WHEN → DO workflows.

Readme

FlowSquire

A local-first automation platform for organizing files on your computer. No cloud, no AI, no subscriptions — just simple WHEN → DO workflows.

Getting Started in 2 Minutes

npm install -g flowsquire
flowsquire init      # 30 sec setup wizard
flowsquire start     # Drop a file in ~/Downloads

That's it. Your files organize themselves.

Features

  • File Watching: Automatically organize files as they appear
  • Smart PDF Workflow: Sort PDFs by keywords (invoice, bank, notes, etc.) with automatic compression
  • Downloads Organizer: Sort images, videos, music, archives, documents, installers, and code files
  • Screenshot Organizer: Organize screenshots by app, website domain, and date (macOS)
  • Priority-Based Rules: Higher priority rules execute first
  • Dry-Run Mode: Preview actions before executing
  • PDF Compression: Automatically compress large PDFs (configurable threshold, default: 8MB)
  • Interactive Setup: Guided wizard for first-time configuration

Installation

npm install -g flowsquire

Prerequisites

Ghostscript (required for PDF compression):

# macOS
brew install ghostscript

# Ubuntu/Debian
sudo apt-get install ghostscript

# Windows
# Download from https://www.ghostscript.com/download/gsdnld.html

Note: Without Ghostscript, PDF compression will fail, but all other features work normally.

Quick Start

# Run interactive setup wizard
flowsquire init

# Start the file watcher
flowsquire start

# Or with dry-run (preview only)
flowsquire start --dry-run

Interactive Setup

During flowsquire init, you'll be asked:

  1. Watch folder — Where to watch for new files (default: ~/Downloads)
  2. Documents folder — Where to organize documents (default: ~/Documents)
  3. Screenshots folder — Where screenshots are saved (default: ~/Downloads/Screenshots)
  4. Downloads organizer mode:
    • nested — Organize inside Downloads subfolders (Images/, Videos/, etc.)
    • system — Move to system folders (Pictures/, Movies/, Music/, etc.)
  5. PDF compression threshold — Size in MB above which PDFs are compressed (default: 8)
  6. Screenshot organizer mode:
    • metadata — Organize by App/Domain (macOS only)
    • by-app — Organize by App name only
    • by-date — Organize by date (works on all platforms)

Templates

PDF Workflow (6 rules)

Automatically organizes PDFs based on filename and size:

| Priority | Rule | Condition | Nested Mode Destination | System Mode Destination | |----------|------|-----------|------------------------|------------------------| | 500 | Large PDF Compression | > threshold (default: 8MB) | ~/Downloads/PDFs/{category}/Compressed/ | ~/Documents/PDFs/{category}/Compressed/ | | 450 | arXiv Research Papers | YYMM.NNNNN format | ~/Downloads/PDFs/Research(arXiv)/ | ~/Documents/PDFs/Research(arXiv)/ | | 400 | Invoice Organizer | invoice, bill, payment, receipt, tax | ~/Downloads/PDFs/Invoices/ | ~/Documents/PDFs/Invoices/ | | 300 | Bank Statement | bank, statement, transaction, finance, credit, debit | ~/Downloads/PDFs/Finance/ | ~/Documents/PDFs/Finance/ | | 200 | Study Notes | notes, note, lecture, study, class, course, assignment, homework, exam | ~/Downloads/PDFs/Study/ | ~/Documents/PDFs/Study/ | | 100 | Default | any PDF | ~/Downloads/PDFs/Unsorted/ | ~/Documents/PDFs/Unsorted/ |

Features:

  • Cross-platform Ghostscript support (macOS/Linux: gs, Windows: gswin64c)
  • Quality levels: screen (low), ebook (medium), printer (high)
  • Preserves original filenames
  • Configurable compression threshold (set during flowsquire init)

Smart Compression: Large PDFs exceeding your configured threshold are automatically categorized before compression:

  • Original file → PDFs/{category}/
  • Compressed copy → PDFs/{category}/Compressed/

arXiv Research Papers: Academic papers from arXiv.org are automatically detected by their standardized filename format:

  • New format (2015+): YYMM.NNNNN (e.g., 2601.16163.pdf)
  • Old format (2007-2014): YYMM.NNNN (e.g., 0706.0001.pdf)
  • Versioned: YYMM.NNNNNvV (e.g., 2601.16163v1.pdf)

Example: 2601.16163v1.pdfPDFs/Research(arXiv)/2601.16163v1.pdf

Note: Currently only arXiv papers are auto-detected for the Research category. Support for other academic paper sources (DOI-based filenames, keywords like "paper", "journal", "conference") is planned for future releases.

Categories detected from filename:

  • Invoices: invoice, bill, receipt, rechnung, facture, factura, fattura, fatura, factuur, счет, 发票, 請求書, 세금계산서, فاتورة
  • Finance: bank, statement, transaction, kontoauszug, banque, banco, banca, банк, 银行, 銀行, 은행, بنك
  • Study: notes, lecture, study, assignment, homework, exam, notizen, vorlesung, cours, notas, заметки, 笔记, ノート, 노트, ملاحظات
  • Unsorted: Everything else

Multilingual Support:
FlowSquire automatically detects PDF categories in 12 languages: English, German, French, Spanish, Italian, Portuguese, Dutch, Russian, Chinese (Simplified), Japanese, Korean, and Arabic. Files like Rechnung_2026.pdf, ACME銀行_statement.pdf, or 发票_2026.pdf are automatically sorted into the correct category.

Example: invoice_large.pdf (10MB) → PDFs/Invoices/invoice_large.pdf + PDFs/Invoices/Compressed/invoice_large_compressed.pdf

Downloads Organizer (7 rules)

Sorts non-PDF files by type:

| Type | Extensions | Nested Mode Destination | System Mode Destination | |------|------------|------------------------|------------------------| | Images | jpg, jpeg, png, gif, webp, svg | ~/Downloads/Images/ | ~/Pictures/Downloads/ | | Videos | mp4, mov, avi, mkv | ~/Downloads/Videos/ | ~/Movies/ | | Music | mp3, wav, flac, aac | ~/Downloads/Music/ | ~/Music/ | | Archives | zip, rar, 7z, tar, gz | ~/Downloads/Archives/ | ~/Documents/Archives/ | | Documents | doc, docx, txt, rtf, xls, xlsx, ppt, pptx | ~/Downloads/Documents/ | ~/Documents/Documents/ | | Installers | dmg, pkg, exe, msi | ~/Downloads/Installers/ | ~/Documents/Installers/ | | Code | js, ts, jsx, tsx, py, rb, go, rs, java, cpp, c, h | ~/Downloads/Code/ | ~/Documents/Code/ |

Screenshot Organizer

Organizes screenshots based on your chosen mode:

Metadata Mode (macOS only, requires Accessibility permissions):

  • Organizes by: AppName/Domain/{filename}_{date}_{time}.png
  • Example: Google Chrome/aistudio.google.com/SCR-2026-02-01_16-41.png
  • Captures: foreground app, browser URL, window title

By App Mode:

  • Organizes by: AppName/{filename}.png
  • Example: Google Chrome/SCR-20260201-ornd.png

By Date Mode (works on all platforms):

  • Organizes by: Year/Month/{filename}.png
  • Example: 2026/February/SCR-20260201-ornd.png

Note: On non-macOS platforms, metadata mode falls back to by-date automatically.

CLI Commands

flowsquire init                          # Interactive setup wizard
flowsquire start                         # Start file watcher
flowsquire start --dry-run               # Preview mode (no actual changes)
flowsquire rules                         # List all rules
flowsquire config                        # Show all configured paths and settings
flowsquire config --<key> <value>        # Set a config value
flowsquire config --<key>                # Get a config value

Config Options

Path Settings:

  • --downloads <path> — Watch folder for new files
  • --documents <path> — Documents organization folder
  • --screenshots <path> — Screenshots folder
  • --pictures <path> — Pictures folder
  • --videos <path> — Videos/Movies folder
  • --music <path> — Music folder

Mode Settings:

  • --downloads-mode <nested|system> — Downloads organizer mode
  • --screenshot-mode <metadata|by-app|by-date> — Screenshot organizer mode
  • --pdf-compression-threshold-mb <number> — PDF compression threshold in MB

Examples:

flowsquire config --downloads ~/Downloads
flowsquire config --downloads-mode system
flowsquire config --screenshot-mode by-date
flowsquire config --pdf-compression-threshold-mb 12

Note: After changing modes, delete rules and re-run flowsquire init to regenerate rules.

Rule Structure

Rules are stored in .flowsquire/rules.json:

{
  "id": "...",
  "name": "My Rule",
  "enabled": true,
  "priority": 100,
  "tags": ["pdf", "invoice"],
  "trigger": {
    "type": "file_created",
    "config": { "folder": "/Users/me/Downloads" }
  },
  "conditions": [
    { "type": "extension", "operator": "equals", "value": "pdf" },
    { "type": "name_contains", "operator": "equals", "value": "invoice" }
  ],
  "actions": [
    {
      "type": "move",
      "config": {
        "destination": "/Users/me/Documents/Invoices",
        "pattern": "{filename}_{YYYY}-{MM}-{DD}",
        "createDirs": true
      }
    }
  ]
}

Condition Types

  • extension — File extension (e.g., "pdf", "jpg")
  • name_contains — Filename contains text (case-insensitive)
  • name_starts_with — Filename starts with text
  • name_ends_with — Filename ends with text
  • size_greater_than_mb — File size in MB

Action Types

  • move — Move file to destination
  • copy — Copy file to destination
  • rename — Rename file
  • compress — Compress PDF (requires Ghostscript)

Pattern Placeholders

Date/Time:

  • {filename} — Original filename without extension
  • {YYYY} — Year (2026)
  • {MM} — Month number (01-12)
  • {Month} — Month name (January, February, etc.)
  • {DD} — Day (01-31)
  • {HH} — Hour (00-23)
  • {mm} — Minute (00-59)
  • {ss} — Second (00-59)

Screenshot Metadata (macOS only):

  • {app} — Foreground application name (e.g., "Google Chrome")
  • {domain} — Website domain (e.g., "github.com")

Development

# Clone repo
git clone [email protected]:miit-daga/flowsquire.git
cd flowsquire

# Install dependencies
npm install

# Build
npm run build

# Run in dev mode
npm run dev

# Test
npm test

Architecture

┌─────────────┐     ┌──────────────┐     ┌─────────────┐
│   CLI       │────▶│  File Watcher│────▶│  Rule Engine│
│  (cli.ts)   │     │  (chokidar)  │     │             │
└─────────────┘     └──────────────┘     └──────┬──────┘
                                                 │
                        ┌──────────────┐        │
                        │   Actions    │◀───────┘
                        │ (move/copy/  │
                        │  compress)   │
                        └──────────────┘

License

MIT

Philosophy

Your computer should work for you. Not the other way around.