{"id":49475398,"url":"https://github.com/jihadkhawaja/ai.fileorganizer","last_synced_at":"2026-04-30T19:31:35.331Z","repository":{"id":297840929,"uuid":"997990991","full_name":"jihadkhawaja/AI.FileOrganizer","owner":"jihadkhawaja","description":"An AI-powered system for organizing files and folders, featuring automatic image classification.","archived":false,"fork":false,"pushed_at":"2026-03-05T19:07:44.000Z","size":54,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-05T21:52:19.728Z","etag":null,"topics":["ai","csharp","dotnet","filesystem","local-ai","microsoft-agent-framework","organize-files","organize-photos"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jihadkhawaja.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-07T16:26:36.000Z","updated_at":"2026-03-05T19:07:57.000Z","dependencies_parsed_at":"2025-06-07T20:40:44.579Z","dependency_job_id":null,"html_url":"https://github.com/jihadkhawaja/AI.FileOrganizer","commit_stats":null,"previous_names":["jihadkhawaja/ai.fileorganizer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jihadkhawaja/AI.FileOrganizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jihadkhawaja%2FAI.FileOrganizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jihadkhawaja%2FAI.FileOrganizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jihadkhawaja%2FAI.FileOrganizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jihadkhawaja%2FAI.FileOrganizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jihadkhawaja","download_url":"https://codeload.github.com/jihadkhawaja/AI.FileOrganizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jihadkhawaja%2FAI.FileOrganizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32475191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","csharp","dotnet","filesystem","local-ai","microsoft-agent-framework","organize-files","organize-photos"],"created_at":"2026-04-30T19:31:34.688Z","updated_at":"2026-04-30T19:31:35.322Z","avatar_url":"https://github.com/jihadkhawaja.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Notice\n**This repository has ben archived and won't be maintained**. Please check [OneShotPrompt](https://github.com/jihadkhawaja/OneShotPrompt) instead.\n\n# AI.FileOrganizer\n\nAI.FileOrganizer is an AI-powered command-line tool that helps you organize files and folders using natural language instructions.\n\nIt is built with the [Microsoft Agent Framework](https://learn.microsoft.com/en-us/agent-framework/overview/) and uses pluggable AI providers to interpret intent, select the right tools, and safely execute file operations.\n\n## What It Does\n\n- Accepts natural language requests from a CLI.\n- Uses an AI agent to classify intent and choose appropriate tools.\n- Performs file and folder operations through focused tool modules.\n- Supports multiple AI backends through a provider abstraction layer.\n\n## High-Level Architecture\n\n```mermaid\nflowchart LR\n\tUser[\"User (Natural Language Request)\"] --\u003e CLI[\"AI.FileOrganizer.CLI\"]\n\tCLI --\u003e Agent[\"Microsoft Agent Framework Orchestrator\"]\n\tAgent --\u003e Selector[\"ToolSelector\"]\n\tSelector --\u003e FileTools[\"FileTools\"]\n\tSelector --\u003e FolderTools[\"FolderTools\"]\n\tAgent --\u003e Providers[\"AI Provider Layer\\n(OpenAI / Azure OpenAI / Ollama)\"]\n\tFileTools --\u003e FS[\"Local File System\"]\n\tFolderTools --\u003e FS\n```\n\n## Projects\n\n- `AI.FileOrganizer`: Core library containing intent handling and tool selection.\n- `AI.FileOrganizer.CLI`: Command-line host that runs the agent workflow.\n\n## Download and Run (Prebuilt Binaries)\n\nPrebuilt binaries are published for each tagged release in GitHub Releases:\n\n- `AI.FileOrganizer-win-x64.zip`\n- `AI.FileOrganizer-linux-x64.zip`\n- `AI.FileOrganizer-osx-arm64.zip`\n\nDownload from: [Releases](https://github.com/jihadkhawaja/AI.FileOrganizer/releases)\n\n### 1. Extract the archive\n\nExtract the archive for your platform into any folder.\n\n### 2. Configure provider settings\n\nOpen `config.yaml` in the extracted folder and set the provider you want to use.\n\nExample:\n\n```yaml\nOpenAI:\n  ApiKey: \"your-api-key\"\n  Model: \"gpt-4o-mini\"\n```\n\n### 3. Run the CLI\n\nWindows (`win-x64`):\n\n```powershell\n.\\AI.FileOrganizer.CLI.exe\n```\n\nLinux (`linux-x64`):\n\n```bash\nchmod +x ./AI.FileOrganizer.CLI\n./AI.FileOrganizer.CLI\n```\n\nmacOS Apple Silicon (`osx-arm64`):\n\n```bash\nchmod +x ./AI.FileOrganizer.CLI\n./AI.FileOrganizer.CLI\n```\n\nThe app will prompt you to choose a provider and then accept natural-language file organization requests.\n\n## Recurring Schedules\n\nThe recommended scheduling model is to run the CLI once per job and let the operating system handle recurrence.\n\nWhy this design:\n\n- The current app is a console host, not a Windows service.\n- OS schedulers are more reliable for restarts, missed runs, and machine reboots.\n- Each run stays deterministic: load config, execute one prompt, exit.\n\nAdd one or more jobs to `config.yaml`:\n\n```yaml\nJobs:\n  - Name: \"downloads-cleanup\"\n    Prompt: \"Organize files in Downloads by type\"\n    Provider: \"OpenAI\"\n    AutoApprove: true\n    PersistMemory: false\n    ThinkingLevel: \"low\"\n    Schedule: \"Daily at midnight\"\n    Enabled: true\n```\n\nGenerate a sample job block:\n\n```powershell\ndotnet run --project AI.FileOrganizer.CLI/AI.FileOrganizer.CLI.csproj -- --job-template downloads-cleanup\n```\n\nCreate a job interactively and write it into `config.yaml`:\n\n```powershell\ndotnet run --project AI.FileOrganizer.CLI/AI.FileOrganizer.CLI.csproj -- --create-job\n```\n\nRun a job once:\n\n```powershell\ndotnet run --project AI.FileOrganizer.CLI/AI.FileOrganizer.CLI.csproj -- --job downloads-cleanup\n```\n\nList configured jobs:\n\n```powershell\ndotnet run --project AI.FileOrganizer.CLI/AI.FileOrganizer.CLI.csproj -- --list-jobs\n```\n\nPrint the Windows Task Scheduler action for a job:\n\n```powershell\ndotnet run --project AI.FileOrganizer.CLI/AI.FileOrganizer.CLI.csproj -- --task-command downloads-cleanup\n```\n\nYou can also use the wrapper scripts instead of the full `dotnet run` command.\n\nPowerShell:\n\n```powershell\n./scripts/ai-fileorganizer.ps1 create-job\n./scripts/ai-fileorganizer.ps1 list-jobs\n./scripts/ai-fileorganizer.ps1 job-template downloads-cleanup\n./scripts/ai-fileorganizer.ps1 run-job downloads-cleanup\n./scripts/ai-fileorganizer.ps1 task-command downloads-cleanup\n```\n\nLinux/macOS:\n\n```bash\nchmod +x ./scripts/ai-fileorganizer.sh\n./scripts/ai-fileorganizer.sh create-job\n./scripts/ai-fileorganizer.sh list-jobs\n./scripts/ai-fileorganizer.sh job-template downloads-cleanup\n./scripts/ai-fileorganizer.sh run-job downloads-cleanup\n./scripts/ai-fileorganizer.sh task-command downloads-cleanup\n```\n\nFor unattended execution, set `AutoApprove: true`. If a job triggers an approval-gated tool and `AutoApprove` is `false`, the run will fail instead of hanging.\n\n### Windows Task Scheduler\n\nCreate a task that runs the CLI on your preferred cadence. Example action:\n\n```powershell\ndotnet run --project \"C:\\path\\to\\AI.FileOrganizer.CLI\\AI.FileOrganizer.CLI.csproj\" -- --job downloads-cleanup\n```\n\nIf you publish the app first, point Task Scheduler to the published executable instead of `dotnet run`.\n\n## Build from Source\n\n```powershell\ndotnet build AI.FileOrganizer.slnx\ndotnet run --project AI.FileOrganizer.CLI/AI.FileOrganizer.CLI.csproj\n```\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE.txt).\n\n---\n\n*Powered by [Microsoft Agent Framework](https://learn.microsoft.com/en-us/agent-framework/overview/).*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjihadkhawaja%2Fai.fileorganizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjihadkhawaja%2Fai.fileorganizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjihadkhawaja%2Fai.fileorganizer/lists"}