An AI-powered file system manager built with the File System Access API. Co-do lets you select a folder on your local machine and use AI to perform operations on the files within.
- File System Access: Native browser integration with your local file system using the File System Access API
- AI-Powered: Use Anthropic Claude, OpenAI GPT, or Google Gemini to interact with your files
- Multi-Provider Support: Configure multiple AI providers and switch between them
- Real-time Streaming: AI responses stream in real-time as they're generated
- Granular Permissions: Control which operations the AI can perform (always allow, ask, or never allow)
- Client-Side Only: Your API key and files never leave your browser (except for AI model API calls)
- Installable: Install Co-do on your device like a native app
- Offline Support: Core app functionality works without internet connection
- Automatic Updates: Get notified when new versions are available with changelog links
- App Shortcuts: Quick access to workspace via home screen shortcuts
- Strict CSP: Content Security Policy ensures data only goes to AI provider endpoints
- Sandboxed Operations: File operations are restricted to the selected directory
- Local Storage: API keys are stored in browser IndexedDB and never transmitted except to AI providers
- Permission Controls: User controls which operations are allowed
- Ask Before Execute: Destructive operations can require user approval
- Voice Input: Real-time voice transcription using Web Speech API - click the microphone button to dictate prompts
- Dark Mode Support: Automatic theme switching based on system preferences
- Responsive Design: Works on desktop, tablet, and mobile devices
- Toast Notifications: Non-intrusive feedback for operations
- Status Bar: Real-time operation status display
- Markdown Rendering: AI responses render as formatted markdown
- File System Observer: Real-time file change detection (Chrome 129+)
Co-do requires the File System Access API, which is currently available in:
- Chrome 86+ (Recommended: Chrome 140+)
- Edge 86+
- Other Chromium-based browsers
Safari has limited support for the File System Access API.
The voice transcription feature uses the Web Speech API (Speech Recognition), which is available in:
- Chrome 25+ (Desktop and Android)
- Edge 79+
- Safari 14.1+ (with limitations)
If your browser doesn't support voice recognition, the microphone button will be automatically hidden.
npm installnpm run devOpen http://localhost:3000 in your browser.
npm run buildThe built files will be in the dist directory.
npm test # Run all tests
npm run test:visual # Visual regression tests only
npm run test:accessibility # Accessibility tests only
npm run test:ui # Interactive test modeCo-do is a Progressive Web App that can be installed on your device:
- Generate Icons: Open
generate-icons.htmlin Chrome to create PWA icons - Save Icons: Download and save
icon-192.pngandicon-512.pngto thepublic/directory - Deploy: Build and deploy the app to a HTTPS server
- Install: Click the install icon in Chrome's address bar or use the browser menu
For detailed PWA setup instructions, see PWA-SETUP.md.
- Select an AI Provider: Choose between Anthropic, OpenAI, or Google
- Enter API Key: Your API key is stored locally and only sent to the selected AI provider
- Choose a Model: Select which AI model to use
- Select a Folder: Click "Select Folder" to choose a directory on your local machine
- Set Permissions: Configure which file operations the AI can perform
- Start Chatting: Ask the AI to help you with your files!
- "List all JavaScript files in this directory"
- "Create a README.md file with a description of this project"
- "Find all TODO comments in my code"
- "Rename all .txt files to .md"
- "Update the version number in package.json to 2.0.0"
- "Show me the first 20 lines of main.ts"
- "Compare the differences between old.js and new.js"
- "Search for 'TODO' in all files"
- "Create a new directory called 'backup'"
- "Show me the directory structure as a tree"
The AI has access to 18 file operations:
- open_file: Open and read file contents
- create_file: Create a new file with content
- write_file: Write or update file contents
- rename_file: Rename a file
- move_file: Move a file to a different location
- delete_file: Delete a file (use with caution!)
- cp: Copy a file to a new location
- list_files: List all files in the directory
- mkdir: Create a new directory
- tree: Display directory structure as a tree
- cat: Display file contents (alias for open_file)
- head_file: Read the first N lines of a file
- tail_file: Read the last N lines of a file
- get_file_metadata: Get file size, type, and last modified date
- grep: Search for text patterns in files (supports case-insensitive search)
- diff: Compare two files and show differences
- wc: Count lines, words, and characters in a file
- sort: Sort lines in a file
- uniq: Filter duplicate consecutive lines
- Claude Opus 4.5
- Claude Sonnet 4.5
- Claude Sonnet 3.5
- GPT-5.2
- GPT-4.1
- GPT-4.1 Mini
- o4-mini
- o3-mini
- GPT-4o
- Gemini 3 Flash Preview
- Gemini 3 Pro Preview
- Gemini 2.5 Flash
- Gemini 2.0 Flash
- Gemini 1.5 Pro
Co-do implements multiple layers of security:
- Strict CSP headers limit network access to AI provider APIs only
worker-src 'self'restricts Worker scripts to same-origin- No
unsafe-evalrequired for WebAssembly execution - Frame ancestors blocked to prevent clickjacking
- API keys stored securely in IndexedDB
- Keys only transmitted to the selected AI provider
- No server-side storage or logging
- Granular control over file operations (always/ask/never)
- Separate permissions for WASM custom tools
- Destructive operations require explicit approval
- Directory Sandboxing: File operations restricted to user-selected directory
- Markdown Sandboxing: AI responses rendered in sandboxed iframes (XSS protection)
- WebAssembly Sandboxing: WASM tools run in isolated Web Workers
WASM custom tools execute in isolated Web Workers for security and performance:
- Process Isolation: Each WASM execution runs in a dedicated Worker thread
- True Termination: Runaway or malicious modules can be terminated via
Worker.terminate() - Memory Limits: Configurable memory bounds per tool (default: 32MB, max: 256MB)
- Network Blocking: WASI socket syscalls return
EPERM(permission denied) - No DOM Access: Workers cannot access the main thread's DOM or globals
- CSP Enforcement: Workers inherit CSP, blocking unauthorized network requests
- Timeout Enforcement: Long-running executions are automatically terminated
For detailed security analysis, see docs/WASM-SANDBOXING-ANALYSIS.md.
- Vite: Build tool and development server
- TypeScript: Type-safe code with strict mode
- Vercel AI SDK: Multi-provider AI integration with streaming support
- File System Access API: Native file system integration
- IndexedDB: Secure local storage for provider configurations and WASM tools
- Service Worker: PWA offline support and caching
- Web Workers: Isolated WASM execution environment
- WebAssembly + WASI: Custom tool runtime with sandboxed execution
- Modern CSS: CSS custom properties for theming, no frameworks
Co-do/
├── src/
│ ├── main.ts # Application entry point
│ ├── ui.ts # UI manager and event handlers
│ ├── fileSystem.ts # File System Access API wrapper
│ ├── ai.ts # AI SDK integration
│ ├── tools.ts # AI tools for file operations
│ ├── preferences.ts # User preferences and permissions
│ ├── styles.css # Application styles
│ └── wasm-tools/ # WebAssembly custom tools system
│ ├── manager.ts # Tool orchestrator
│ ├── runtime.ts # WASI runtime (main thread fallback)
│ ├── wasm-worker.ts # Sandboxed Worker runtime
│ ├── worker-manager.ts # Worker lifecycle management
│ ├── vfs.ts # Virtual file system
│ ├── loader.ts # ZIP package validator
│ └── types.ts # Type definitions
├── tests/
│ ├── visual/ # Visual regression tests
│ ├── accessibility/ # Accessibility tests (WCAG 2.1 AA)
│ └── helpers/ # Test utilities
├── docs/
│ ├── WASM-TOOLS-PLAN.md # WASM tools implementation plan
│ └── WASM-SANDBOXING-ANALYSIS.md # Security analysis
├── public/
│ ├── manifest.json # PWA manifest
│ ├── sw.js # Service worker
│ └── icons/ # App icons
├── wasm-tools/ # WASM tool source and binaries
├── index.html # HTML entry point
├── vite.config.ts # Vite configuration with CSP
├── playwright.config.ts # Test configuration
├── tsconfig.json # TypeScript configuration
└── package.json # Dependencies and scripts
npm install # Install dependencies
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run type-check # Run TypeScript type checking
npm test # Run all tests
npm run test:visual # Run visual regression tests
npm run test:accessibility # Run accessibility tests
npm run test:visual:update # Update visual baselinesSee CHANGELOG.md for version history and updates.
MIT
Inspired by Anthropic's Co-work project.