AI-powered code exploration and analysis platform
Upload projects from GitHub, ZIP, or URL β browse files, extract content, and chat with AI models about your code.
Features β’ Quick Start β’ API β’ Configuration β’ Contributing
- Clone from GitHub repositories with branch selection
- Fetch from any URL (ZIP files)
- Drag & drop ZIP file upload
- URL hash loading β open repos via
vibzcode.com/#https://github.com/user/repo - File size limit enforcement (configurable)
- Interactive file tree with folder expand/collapse
- Smart detection of important files (package.json, Dockerfile, main entry points, etc.)
- File search/filter with keyboard shortcut (
Ctrl+K) - Syntax-highlighted preview modal for any file
- File groups β save and reload file selections
- Media file filtering
- Multi-model support via OpenRouter (GPT, Grok, and more)
- π§ Smart Chat (NEW!) β Intelligent AI that understands project structure and auto-fetches files
- Automatic structure analysis on activation
- Auto-loads important files (package.json, README, etc.)
- Natural file fetching: just ask "read server.js" and it loads automatically
- Context file management with visual UI
- Understands folder queries: "What's in the components folder?"
- Smart suggestions based on project type
- Prompt caching (
cache_control: ephemeral) to reduce token costs on repeated context - Quick actions: Explain, Find Bugs, Improve, Generate Tests, Documentation, Refactor
- Markdown rendering with syntax highlighting and code copy buttons
- Chat history persistence per project
- Specialized agents: Security analysis, performance optimization, documentation generation, refactoring, testing
- Prompt templates for common tasks
- Automatic file structure inclusion in output
- Code summarization option (strips comments, formats code)
- Token estimation display
- Copy to clipboard or download as file
- DaisyUI component library on Tailwind CSS
- Dark and light theme toggle
- Fully responsive β works on mobile and desktop
- Session persistence via localStorage
- Keyboard shortcuts (
Ctrl+Enterto extract/send,Ctrl+Kto search) - Toast notifications
- Models management β add, remove, enable/disable AI models from settings
- App config β default model, cache toggle, auto-select important files
- Environment variables β update API keys and limits without restarting
- Node.js 18+
- npm
- (Optional) MongoDB for cloud storage
- (Optional) OpenRouter API key for AI features
git clone https://github.com/Zizwar/zip2prompt.git
cd zip2prompt
npm installCreate a .env file:
PORT=8080
STORAGE_MODE=local
MAX_FILE_SIZE_MB=50
# Optional β enables AI chat
OPENROUTER_API_KEY=sk-or-v1-...
DEFAULT_AI_MODEL=openai/gpt-5.1-codex-mini
# Optional β MongoDB instead of local file storage
MONGODB_URI=mongodb+srv://user:pass@cluster.mongodb.net/vibzcode# Development
npm run dev
# Production
npm startOpen http://localhost:8080 in your browser.
- Load a project β paste a GitHub URL and click Clone, drop a ZIP, or enter a direct URL
- Browse & select files β use the file tree in the sidebar; important files are auto-selected
- Extract β click Extract to merge selected files into a single output with file structure
- Chat with AI β switch to the Chat tab, ask questions about the code with full file context
- Quick actions β use Explain, Bugs, Improve, Tests, Docs, or Refactor buttons for one-click analysis
Open a project directly via URL:
https://vibzcode.com/#https://github.com/user/repo
https://vibzcode.com/get/https://github.com/user/repo
vibzcode/
βββ server.js # Hono server with all API routes
βββ config/
β βββ database.js # Storage abstraction (local/MongoDB)
β βββ models.json # AI model registry
β βββ app-config.json # App settings
βββ utils/
β βββ openrouter.js # OpenRouter API client
βββ public/
β βββ index.html # SPA entry point (DaisyUI + Alpine.js)
β βββ js/
β βββ app.js # Alpine.js component registration & init
β βββ upload.js # Upload/clone module
β βββ filetree.js # File tree rendering & selection
β βββ chat.js # AI chat module
β βββ config.js # Settings/models management
β βββ utils.js # Shared utilities
βββ uploads/ # Stored ZIP files
βββ filegroups/ # Saved file selections
βββ prompttemplates/ # Prompt templates
βββ data/ # Local storage (projects, chats)
| Layer | Technology |
|---|---|
| Server | Node.js, Hono |
| Frontend | Alpine.js, DaisyUI (Tailwind CSS) |
| AI | OpenRouter (multi-model) |
| ZIP handling | AdmZip |
| Syntax highlighting | Highlight.js |
| Markdown | Marked.js |
| Icons | Font Awesome 6 |
| Storage | Local filesystem or MongoDB |
| Method | Endpoint | Description |
|---|---|---|
POST |
/upload |
Upload ZIP, clone from GitHub, or fetch from URL |
GET |
/uploads |
List uploaded projects |
GET |
/reopen/:filename |
Reopen a previously uploaded project |
GET |
/file-preview/:filename/:filepath |
Preview a single file from a project |
POST |
/extract |
Extract and merge selected files |
DELETE |
/upload/:filename |
Delete an uploaded project |
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/ai/chat |
Send a message with file context (JSON body) |
GET |
/api/ai/chat/:projectId |
Get chat history for a project |
GET |
/api/ai/models |
List available AI models |
POST |
/api/ai/analyze |
Run project analysis |
POST |
/api/ai/agent/:type |
Run a specialized agent |
GET |
/api/ai/agents |
List available agents |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/config |
Get app configuration |
PUT |
/api/config |
Update app configuration |
GET |
/api/config/models |
Get model registry |
PUT |
/api/config/models |
Update model registry |
GET |
/api/config/env |
Get environment config (API key masked) |
PUT |
/api/config/env |
Update environment variables |
| Method | Endpoint | Description |
|---|---|---|
GET |
/prompt-templates |
List prompt templates |
GET |
/file-groups |
List saved file groups |
POST |
/file-groups |
Save a file group |
DELETE |
/file-groups/:name |
Delete a file group |
Local (default) β no dependencies, data stored in ./data/:
STORAGE_MODE=localMongoDB β cloud storage, scalable:
STORAGE_MODE=mongodb
MONGODB_URI=mongodb+srv://...Models are managed from the UI (Settings > Models tab) and stored in config/models.json. Default models include GPT-4.1 Mini, GPT-5 Mini, GPT-5.1 Codex Mini, Grok 4.1 Fast, Grok 3 Mini, Grok Code Fast, and Arcee Coder Large.
To add models programmatically:
{
"models": [
{ "id": "openai/gpt-4.1-mini", "name": "GPT-4.1 Mini", "provider": "OpenAI", "enabled": true }
]
}When enabled (default), context files are sent with cache_control: { type: "ephemeral" }. This reduces token costs when the same file context is used across multiple messages in a conversation.
Toggle from the UI or in config/app-config.json:
{ "enableCache": true }docker build -t vibzcode .
docker run -p 8080:8080 -e OPENROUTER_API_KEY=sk-or-... vibzcodeOr with docker-compose:
docker-compose upAI features not working?
- Verify
OPENROUTER_API_KEYis set (check Settings > API in the UI) - Ensure the key is valid at openrouter.ai
- Check server logs for error details
MongoDB connection failed?
- Verify
MONGODB_URIis correct - Whitelist your IP in MongoDB Atlas
- The app falls back to local storage automatically
Large files rejected?
- Increase
MAX_FILE_SIZE_MBin.envor Settings > API - Default limit is 50MB
Contributions are welcome.
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes
- Push to the branch
- Open a Pull Request
ISC
- OpenRouter β multi-model AI API
- Hono β fast web framework
- Alpine.js β lightweight reactive framework
- DaisyUI β Tailwind CSS component library
- Highlight.js β syntax highlighting
- Marked.js β markdown parser