Skip to content

ryanjdillon/ordne

Repository files navigation

ordne logo ordne

order for the digital hoarder.

ordne is a Rust CLI and MCP server for indexing, deduplicating, classifying, and safely migrating large file collections.

Built for messy multi-drive archives you want to clean up and organize without risking data loss.

Features

  • Safe operations - Hash-verified moves, explicit --dry-run / --execute
  • Multi-drive index - Local and rclone-backed drives
  • Classification - Rules + interactive review
  • Migrations - Resumable, space-aware batches
  • MCP server - Native Model Context Protocol integration
  • Dependencies - Rust, clap, rusqlite, tokio, rmcp, rclone, rsync

Roadmap

  • Policy-driven recurring workflows (cron/systemd)
  • Incremental scanning
  • MCP status streaming and batch operations
  • See TODO.md for the full list

Installation

From source

cargo build --release

With Nix

nix develop  # Enter dev shell
nix build    # Build the package

Quick Start

# Register a drive
ordne drive add nas_main /mnt/nas --role source

# Scan for files and duplicates
ordne scan nas_main

# View status
ordne status

# Classify files
ordne classify --auto

# Create, review, approve, and execute a migration plan
ordne plan create delete-trash --source-drive nas_main
ordne plan show <plan_id>
ordne plan approve <plan_id>
ordne migrate <plan_id> --execute

MCP Server (Quick Setup)

  1. Build the MCP binary:
cargo build --release -p ordne-mcp
  1. Run it with your database path:
ordne-mcp --db ~/.local/share/ordne/ordne.db
  1. Configure your MCP client (example for Claude Code):
{
  "mcpServers": {
    "ordne": {
      "command": "ordne-mcp",
      "args": ["--db", "/path/to/ordne.db"]
    }
  }
}

For full details, see docs/mcp-server.md.

Agent Policy (Default)

  • Prefer native duplicate discovery via dedup_refresh (MCP) or ordne dedup refresh (CLI).
  • Treat rmlint_import / ordne rmlint import as a non-standard path, used only when explicitly approved by the user.
  • When using rmlint import, use replacement mode (clear_existing_duplicates: true or --replace) only when the user asks to replace current duplicate grouping state.

Example Workflow: Clean Up One or More Drives

  1. Register each drive with a role (source, backup, target):
ordne drive add photos_raid /mnt/photos --role source
ordne drive add archive_usb /mnt/archive --role backup
ordne drive add new_nas /mnt/new_nas --role target
  1. Scan all drives to build the index:
ordne scan --all
  1. Review duplicates and unique backups:
ordne query duplicates
ordne query backup-unique
  1. Classify and plan deletions:
ordne classify --auto
ordne plan create delete-trash
ordne plan show <plan_id>
ordne plan approve <plan_id>
  1. Execute the plan after review (explicit dry-run or execute required):
ordne migrate <plan_id> --execute
  1. Verify and generate a final report:
ordne verify --drive new_nas
ordne report

Documentation

See docs/cli.md for CLI usage details. See docs/api.md for the Rust API reference and publishing workflow. See docs/policy.md for the draft policy schema. See docs/spec.md for complete architecture and design documentation.

License

MIT

About

Agentic file-system cleaner — deduplicate, organize, and enforce backup policies across local, remote, and cloud storage via CLI, MCP, or agent skill.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors