Skip to main content

CLI tool to organize files by extension, fuzzy filename similarity, and semantic grouping

Project description

fileman

smartfileman is a powerful command-line tool that intelligently organizes files in your directories using multiple strategies:

  • 📁 Extension-based grouping - Organize files by type (Images, Documents, Videos, etc.)
  • 🔍 Fuzzy filename clustering - Group similar filenames using intelligent string matching
  • 🧠 Semantic clustering - Use AI embeddings (via Ollama) to group files by content meaning

Installation

From PyPI (Recommended)

pip install smartfileman

Local development install

pip install .

Then run:

fileman --help

Requirements

  • Python 3.9, 3.10, 3.11, or 3.12
  • For semantic mode: Ollama must be installed and running

Usage

Basic Usage

Organize files in a directory by extension:

fileman organize-files --dir /path/to/folder

Common Options

Option Short Description
--dir -d Source directory to organize (default: current directory)
--interactive -i Prompt for custom folder names
--raw -R Use fuzzy filename clustering
--semantic -s Use AI-powered semantic grouping
--preview -p Preview grouping without moving files
--recursive -r Organize files in subdirectories
--eliminate-duplicates --ed Remove duplicate files

Examples

Preview before organizing:

fileman organize-files --dir ~/Downloads --preview

Organize with fuzzy clustering:

fileman organize-files --dir ~/Documents --raw

AI-powered semantic organization:

fileman organize-files --dir ~/Projects --semantic

Interactive mode with custom folder names:

fileman organize-files --dir ~/Desktop --interactive

Semantic Mode

Semantic mode uses Ollama to generate embeddings from file content and cluster files by meaning. It automatically:

  1. Checks for required models (embeddinggemma, llama3.2)
  2. Prompts to download missing models
  3. Extracts text from PDFs, DOCX, PPTX, TXT, MD, and more
  4. Clusters files using K-Means on combined title + content embeddings

Installing Ollama

  1. Download from ollama.ai
  2. Install and start the Ollama service
  3. Run fileman with --semantic flag - missing models will be auto-downloaded

Supported File Types

Category Extensions
Images jpg, png, webp
Videos mp4, mkv
Audio mp3, wav
Archives tar, zip, xz
Documents pdf, docx, pptx, md

Development

# Clone the repository
git clone https://github.com/yourusername/smartfileman.git
cd smartfileman

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install with dev dependencies
pip install -e ".[dev]"

# Run the CLI
fileman --help

Publishing

# Build distribution
python -m build

# Upload to PyPI
twine upload dist/*

License

MIT License - see LICENSE for details.

Contributing

Contributions welcome! Please open an issue or submit a PR.

Installation Scripts

Linux/macOS

curl -sSL https://raw.githubusercontent.com/DineshThumma9/filman/main/scripts/install.sh | bash

Windows (PowerShell)

iwr https://raw.githubusercontent.com/DineshThumma9/filman/main/scripts/install.ps1 -useb | iex

The installer will:

  • Automatically find a compatible Python version (3.9-3.13 for full features)
  • Install with semantic support if available
  • Fall back to base installation on Python 3.14+

Manual Installation

# All Python versions (base features)
pip install smartfileman

# Python 3.9-3.13 (with semantic mode)
pip install smartfileman[semantic]

# Using specific Python version
python3.12 -m pip install smartfileman[semantic]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smartfileman-0.1.3.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smartfileman-0.1.3-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file smartfileman-0.1.3.tar.gz.

File metadata

  • Download URL: smartfileman-0.1.3.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for smartfileman-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ce9296be2c5be52f955b38434200e4c522f320892dbcf334e777839a9adcb627
MD5 9740b40cde493e1f4ac8f2215cb7c466
BLAKE2b-256 7e9dca2da89d9bf3f32ab83b85f5bd4dbb9bc8dfc80afb0e13049df2bdf899dd

See more details on using hashes here.

File details

Details for the file smartfileman-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: smartfileman-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for smartfileman-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a9e05882280782e5d8870afaf39f3187b01fdc5923324f11888004add2e75208
MD5 7e88ca79e8e03ffa9088c21ccfb5f011
BLAKE2b-256 bc7d2b3c8eb0c2cd9b59eb10d6b2a2626169f6a02325304e91904350e75d9d08

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page