ZeroDraft is an open-source, agentic document workspace designed for complex writing tasks. Unlike chat-based AI tools that require constant context switching and copy-pasting, ZeroDraft embeds an autonomous agent directly into your file system.
It reads your entire project context, writes valid files (markdown, specs, code), and edits existing documents in place. It brings the power of "Cursor" to technical documentation, fiction writing, and research.
- Context Awareness: The agent reads your full directory structure (
src/,chapters/,notes/) to understand the broader context of your work. - Local-First Privacy: Your data remains on your machine or your private Supabase instance. Support for local LLMs ensures confidentiality for sensitive legal or proprietary documents.
- Agentic Workflow: ZeroDraft doesn't just chat; it executes tools. It can create file structures, refactor outlines, and generate comprehensive drafts autonomously.
- Autonomous File Management: Give high-level commands like "Read the specs in
/docsand generate aREADME.md," and watch the agent execute file system operations. - Rich Text Editor: A polished, Tiptap-based writing environment that supports standard markdown, slash commands, and seamless AI integration.
- Loop Detection & Correction: Advanced logic to prevent agentic loops, ensuring reliable execution of complex multi-step tasks.
- Cross-Model Support: Integration with Vercel AI SDK allows you to bring your own API keys for OpenAI, Anthropic, or local models via OpenRouter.
- Node.js 18+
- Supabase Account (for authentication and database)
- LLM API Key (OpenAI, Anthropic, or OpenRouter)
-
Clone the repository:
git clone https://github.com/marsalanjaved1/zerodraft.so.git cd zerodraft -
Install dependencies:
npm install
-
Configure environment: Copy the example credentials file:
cp .env.local.example .env.local
Populate
.env.localwith your API keys:NEXT_PUBLIC_SUPABASE_URL=your_process_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key SUPABASE_SERVICE_ROLE_KEY=your_service_role_key OPENROUTER_API_KEY=your_llm_api_key
-
Run the development server:
npm run dev
Navigate to http://localhost:3000 to access the application.
- Technical Product Managers: Keep PRDs, RFCs, and Architecture specs in sync with your codebase.
- Fiction Authors: Maintain a living "Series Bible" where characters and plot points update automatically as you write.
- Legal & Academic Professionals: Summarize and synthesize sensitive PDF case files locally without exposing data to public cloud training.
We welcome contributions from the community. Whether you are fixing bugs, designing new agent tools, or improving the editor UI, your help is appreciated.
Please read our Contributing Guidelines for details on our code of conduct and the process for submitting pull requests.
See ROADMAP.md for our future plans, including:
- Web Search Tool integration.
- PDF/Docx file ingestion.
- Enhanced "Consult Writer" persona modes.
Distributed under the MIT License. See LICENSE for more information.
