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

Uploaded Python 3

File details

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

File metadata

  • Download URL: zortify-0.1.1.tar.gz
  • Upload date:
  • Size: 43.7 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.1.tar.gz
Algorithm Hash digest
SHA256 af7a2a80b16053adc28b8987a642b584ccc38eab51dc491758a9da85982aaebe
MD5 31b33efd5465b365c48724f3d5ed91ce
BLAKE2b-256 1cb7f85b5085273f3b7ce716219ede7740e675b7de8c1f4d40fe3b2425e4222a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zortify-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 37.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a22664d2bf247219889b224fd69fe1b86c5bd4428de547ad74c498823be457c0
MD5 3be3d528c73da3fe310a4f4219565731
BLAKE2b-256 ac79dba943813f4a8d96e1227346e748a0683f20adab7ee68b3f52872d7b50d9

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