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.

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.2.tar.gz (11.9 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.2-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: smartfileman-0.1.2.tar.gz
  • Upload date:
  • Size: 11.9 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.2.tar.gz
Algorithm Hash digest
SHA256 c9b78e4fa2df2cd3c647a996556bf3782a5e1f57da7c69b4562320bb692e4b1d
MD5 ff6d8966a73cc64cd49c5ee70b2a7d00
BLAKE2b-256 20664f40c3d37f1721cdccea3687930c564a9fbe3227d7791892c959c1fb85b7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: smartfileman-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 87c8af09eeb60d1d609e8bcfa1c159284034b051e95b44f7ee11c56f00738b02
MD5 15f288fa2a69ae02f9193d5e8787add1
BLAKE2b-256 c3f728b912dae395909049af3ca9b4747ff6b97c8d8218ae8b0faf85ffd4173e

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