{"id":31040428,"url":"https://github.com/rahulrmcoder/ai-file-manager","last_synced_at":"2025-09-14T08:40:35.142Z","repository":{"id":305103501,"uuid":"1021929744","full_name":"RahulRmCoder/AI-File-Manager","owner":"RahulRmCoder","description":"AI File Manager is a powerful tool that combines the intelligence of Google's Gemini 2.0 Flash with intuitive file management capabilities. Instead of manually creating project structures or using command-line tools, simply describe what you need in natural language, and the AI agent will create the entire file structure for you.","archived":false,"fork":false,"pushed_at":"2025-07-18T07:20:47.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-18T11:17:36.637Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/RahulRmCoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-07-18T07:10:45.000Z","updated_at":"2025-07-18T07:20:51.000Z","dependencies_parsed_at":"2025-07-18T11:21:00.573Z","dependency_job_id":"f4478768-2650-42c0-beee-81e10c187814","html_url":"https://github.com/RahulRmCoder/AI-File-Manager","commit_stats":null,"previous_names":["rahulrmcoder/ai-file-manager"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/RahulRmCoder/AI-File-Manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2FAI-File-Manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2FAI-File-Manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2FAI-File-Manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2FAI-File-Manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RahulRmCoder","download_url":"https://codeload.github.com/RahulRmCoder/AI-File-Manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2FAI-File-Manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275081662,"owners_count":25402336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-09-14T08:40:31.208Z","updated_at":"2025-09-14T08:40:35.140Z","avatar_url":"https://github.com/RahulRmCoder.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 AI File Manager\n\n\u003e An intelligent conversational AI agent for automated file and project structure management\n\nAI File Manager is a powerful tool that combines the intelligence of Google's Gemini 2.0 Flash with intuitive file management capabilities. Instead of manually creating project structures or using command-line tools, simply describe what you need in natural language, and the AI agent will create the entire file structure for you.\n\n## 🌟 Features\n\n### 🧠 **Intelligent Project Structure Generation**\n- Describe any project type (React, Node.js, Python, etc.) and get a complete folder structure\n- Automatically generates appropriate configuration files, folder hierarchies, and starter files\n- Understands development best practices and creates industry-standard project layouts\n\n### 💬 **Natural Language Interface**\n- No need to remember complex commands or folder structures\n- Simply type: *\"Create a React project with components, utils, and styles folders\"*\n- Conversational AI that understands context and provides helpful responses\n\n### 📁 **Advanced File Operations**\n- Create, delete, and organize files and folders\n- Set custom working directories anywhere on your system\n- Browse and explore file contents with an intuitive interface\n- Bulk operations and complex nested structure creation\n\n### 🔒 **Security \u0026 Safety**\n- Controlled access with configurable allowed root directories\n- Path validation to prevent unauthorized file system access\n- Safe directory traversal with built-in security checks\n\n### 🎨 **Modern User Interface**\n- Clean, responsive web interface with dark theme\n- Real-time file explorer with breadcrumb navigation\n- Interactive chat interface with loading indicators and error handling\n- Quick action buttons for common tasks\n\n## 🚀 Quick Start\n\n### Prerequisites\n- **Node.js** (v14 or higher)\n- **Google Gemini API Key** ([Get one here](https://makersuite.google.com/app/apikey))\n\n### Installation\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/RahulRmCoder/AI-File-Manager.git\n   cd ai-file-manager\n   ```\n\n2. **Install dependencies**\n   ```bash\n   npm install\n   ```\n\n3. **Configure environment variables**\n   Create a `.env` file in the root directory:\n   ```env\n   GEMINI_API_KEY=your_gemini_api_key_here\n   PORT=3000\n   ```\n\n4. **Start the application**\n   ```bash\n   # Development mode with auto-reload\n   npm run dev\n   \n   # Production mode\n   npm start\n   ```\n\n5. **Open your browser**\n   Navigate to `http://localhost:3000`\n\n## 🎯 Usage Examples\n\n### Creating Project Structures\n\n**React Project:**\n```\n\"Create a React project structure with components, hooks, utils, and styling folders\"\n```\n\n**Node.js API:**\n```\n\"Set up a Node.js Express API with routes, controllers, middleware, and models folders\"\n```\n\n**Python Project:**\n```\n\"Create a Python project with src, tests, docs folders and setup.py\"\n```\n\n### File Management\n\n**Individual Files:**\n```\n\"Create a README.md file\"\n\"Create a config.json with basic settings\"\n```\n\n**Organizing Files:**\n```\n\"Create folders for images, documents, and scripts\"\n\"Delete all .tmp files\"\n```\n\n### Directory Management\n\n**Setting Working Directory:**\n```\n\"Set working directory to C:\\Users\\YourName\\Desktop\\MyProject\"\n\"Change to my Documents folder\"\n```\n\n## 🏗️ Architecture\n\n### Backend Components\n\n- **`server.js`** - Express.js server with CORS and routing\n- **`routes/ai.js`** - AI processing endpoints and Gemini integration\n- **`routes/files.js`** - File system operation endpoints\n- **`utils/gemini.js`** - Gemini AI agent with conversation management\n- **`utils/fileOperations.js`** - Secure file system operations with path validation\n\n### Frontend Components\n\n- **`public/app.js`** - Main application logic and UI management\n- **`public/index.html`** - Modern responsive web interface\n- **`public/styles/main.css`** - Dark theme styling with animations\n\n### Key Technologies\n\n- **Backend**: Node.js, Express.js, Google Generative AI SDK\n- **Frontend**: Vanilla JavaScript, CSS3, Font Awesome\n- **AI Model**: Google Gemini 2.0 Flash Experimental\n- **File System**: fs-extra for enhanced file operations\n\n## 🔧 Configuration\n\n### Working Directory\n- Default: `~/ai-file-manager-workspace`\n- Configurable through the UI or direct API calls\n- Supports common directories (Desktop, Documents, Downloads)\n\n### Allowed Roots\nThe system includes security measures with pre-configured allowed roots:\n- User home directory\n- Desktop, Documents, Downloads folders\n- Current working directory\n- Custom directories can be added as needed\n\n### API Configuration\n```javascript\n// Gemini Model Configuration\nmodel: 'gemini-2.0-flash-exp'\ntemperature: 0.7\nmaxOutputTokens: 2048\n```\n\n## 📡 API Reference\n\n### AI Processing\n```http\nPOST /api/ai/process\nContent-Type: application/json\n\n{\n  \"message\": \"Create a React project structure\",\n  \"context\": {\n    \"currentPath\": \"\",\n    \"workingDirectory\": \"/path/to/workspace\"\n  }\n}\n```\n\n### File Operations\n```http\n# List directory contents\nGET /api/files/list?path=subfolder\n\n# Create file\nPOST /api/files/create-file\n{\n  \"path\": \"filename.txt\",\n  \"content\": \"file content\"\n}\n\n# Set working directory\nPOST /api/files/set-directory\n{\n  \"directory\": \"/path/to/new/workspace\"\n}\n```\n\n## 🛡️ Security Features\n\n- **Path Validation**: Prevents directory traversal attacks\n- **Allowed Roots**: Restricts operations to safe directories\n- **Input Sanitization**: Validates all user inputs and file paths\n- **API Safety**: Gemini API configured with safety filters\n\n## 🎨 Customization\n\n### Adding Custom Project Templates\nExtend the AI's knowledge by modifying the prompt in `utils/gemini.js`:\n\n```javascript\n// Add your custom project structure templates\nconst customTemplates = {\n  \"flutter\": {\n    \"lib\": {\n      \"screens\": {},\n      \"widgets\": {},\n      \"models\": {}\n    },\n    \"assets\": {\n      \"images\": {},\n      \"fonts\": {}\n    }\n  }\n};\n```\n\n### Styling\nCustomize the interface by modifying `public/styles/main.scss`:\n\n```scss\n// Change color scheme\n:root {\n  --primary-color: #your-color;\n  --background-color: #your-background;\n}\n```\n\n## 🔄 Development\n\n### Available Scripts\n```bash\nnpm run dev      # Start with nodemon for development\nnpm run start    # Start production server\nnpm run sass     # Watch and compile SASS files\n```\n\n### File Structure\n```\nai-file-manager/\n├── public/\n│   ├── index.html      # Main web interface\n│   ├── app.js          # Frontend JavaScript\n│   └── styles/         # SCSS and compiled CSS\n├── routes/\n│   ├── ai.js           # AI processing routes\n│   └── files.js        # File operation routes\n├── utils/\n│   ├── gemini.js       # Gemini AI integration\n│   └── fileOperations.js # File system utilities\n├── server.js           # Express server\n└── package.json        # Dependencies and scripts\n```\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- **Google Gemini AI** for providing the intelligent language processing capabilities\n- **Express.js** for the robust web framework\n- **Font Awesome** for the beautiful icons\n- All the developers who create amazing project structures that inspired this tool\n\n## 📞 Support\n\n- Create an issue for bug reports or feature requests\n- Check existing issues before creating new ones\n- Provide clear reproduction steps for bugs\n\n---\n\n**Made with ❤️ for developers who want to focus on code, not file management.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulrmcoder%2Fai-file-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frahulrmcoder%2Fai-file-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulrmcoder%2Fai-file-manager/lists"}