Skip to main content

AI-powered file organization CLI tool

Project description

Zortify - AI-powered file organization

CI PyPI version Python 3.10+ License: MIT

A command-line tool that automatically organizes messy folders using AI-powered file classification.
Stop wasting time manually sorting your Downloads folder.

Quick StartUsage GuideConfigurationAI Setup

Why I Built This

My Downloads folder was a disaster - hundreds of files piled up with no organization. I got tired of manually sorting PDFs, images, installers, and random files. So I built this tool to handle it automatically.

The AI part is optional - it works great with just file extensions, but if you want smarter classification (like recognizing "Q4_Report_Final_v2.pdf" as a document even without looking at the extension), you can enable local AI with Ollama.

Features

  • Smart Classification - Recognizes files by extension, filename patterns, and optionally AI
  • Dry Run Mode - Preview changes before anything moves
  • Undo Support - Made a mistake? Just run zortify undo
  • Custom Rules - Set up your own patterns (e.g., all *invoice* files go to Documents/Invoices)
  • Works Offline - No internet required (AI runs locally via Ollama)
  • Cross-Platform - Windows, macOS, Linux

Installation

pip install zortify

Or install from source:

git clone https://github.com/zeerakzubair/zortify.git
cd zortify
pip install -e .

Quick Start

# See what would happen (dry run)
zortify organize ~/Downloads --dry-run

# Actually organize
zortify organize ~/Downloads

# Undo if needed
zortify undo

Usage

Organize Files

# Basic usage
zortify organize ~/Downloads

# Preview without moving
zortify organize ~/Downloads --dry-run

# Include subfolders
zortify organize ~/Downloads --recursive

# Skip confirmation
zortify organize ~/Downloads --yes

# Verbose output
zortify organize ~/Downloads -v

Check Folder Status

zortify status ~/Downloads

Undo Operations

# Undo last operation
zortify undo

# Undo last 5 operations
zortify undo --steps 5

Configuration

# Create config file
zortify config --init

# View current config
zortify config --show

# Edit config
zortify config --edit

AI Setup (Optional)

The tool works without AI, but enabling it gives smarter classification.

Option 1: Ollama (Recommended - Free & Local)

  1. Install Ollama from ollama.com
  2. Pull a model:
    ollama pull phi3
    
  3. That's it! Zort uses Ollama by default.

Option 2: Groq (Free Tier - Cloud)

  1. Get API key from console.groq.com
  2. Set environment variable:
    export GROQ_API_KEY=your_key_here
    
  3. Update config:
    zortify config --edit
    # Change provider to "groq"
    

Check AI Status

zortify ai

Default Categories

Category Extensions
Documents pdf, doc, docx, txt, xls, xlsx, ppt, pptx
Images jpg, png, gif, webp, svg, bmp
Videos mp4, mkv, avi, mov, webm
Audio mp3, wav, flac, aac, ogg
Archives zip, rar, 7z, tar, gz
Code py, js, ts, java, cpp, go, rs
Installers exe, msi, dmg, deb, rpm
Data csv, json, xml, yaml, sql

Custom Rules

Edit ~/.config/zort/config.yaml:

rules:
  - pattern: "*invoice*"
    category: documents
    subfolder: Invoices

  - pattern: "screenshot*"
    category: images
    subfolder: Screenshots

  - pattern: "*.tmp"
    action: delete

Documentation

For more detailed information:

Development

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

# Run tests
pytest

# Lint
ruff check src/

Support

If this tool saved you time, consider buying me a coffee:

Buy Me A Coffee

License

MIT License - see LICENSE for details.

Author

Zeerak Zubair - zubairzeerak@gmail.com

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

zortify-0.1.0.tar.gz (43.6 kB view details)

Uploaded Source

Built Distribution

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

zortify-0.1.0-py3-none-any.whl (37.4 kB view details)

Uploaded Python 3

File details

Details for the file zortify-0.1.0.tar.gz.

File metadata

  • Download URL: zortify-0.1.0.tar.gz
  • Upload date:
  • Size: 43.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for zortify-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5c348bc9e1f47af9ea5fdbd36ff8102d9098b6b421b4e1783bc306f4e98e2dba
MD5 5b5e05e9e985c34c15962644ebf7fbee
BLAKE2b-256 32f0fea320038fb5fe68bdd8390afa25f24c67ac0f1c0f4a847f17517c37a1e7

See more details on using hashes here.

File details

Details for the file zortify-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: zortify-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for zortify-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb49a35c8f432c7ecf432c4efc96235571f73c3853f4cccdfb9ea6f5b24a9ba8
MD5 ea2ab4cc66bbf95528944176c1ca0a65
BLAKE2b-256 52d27a51d868319458fc29721d4b5b34f378eff1dbed8acc6ec913dca2953f16

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