Bring-your-own-LLM writing assistant. A Chrome extension that gives you AI-powered writing assistance everywhere — using your own API keys and models.
Think Grammarly, but powered by Claude, GPT, Gemini, or any OpenAI-compatible model you choose.
- Text rewriting — fix grammar, sharpen, shorten, expand, change tone
- Command palette — slash commands (
/fix,/rewrite,/sharpen, etc.) - Multiple providers — Anthropic, OpenAI, Gemini, OpenRouter, custom endpoints
- Multi-language — auto-detects the language of your text and responds in the same language
- Privacy-first — API keys stored locally, PII redaction, audit log
- Tab context — optionally use content from open tabs as AI context
- Works everywhere — any text field, textarea, or contenteditable element
- Keyboard-first —
Ctrl+Shift+D/Cmd+Shift+Dto open instantly
Draftly/
├── packages/
│ ├── shared/ # Types, constants, utilities
│ ├── providers/ # LLM provider abstraction + adapters
│ ├── core/ # Prompts, transforms, privacy, context engine
│ ├── ui/ # Shared React components
│ └── word-integration/ # Microsoft Word support scaffold
├── apps/
│ ├── extension/ # Chrome Extension (Manifest V3)
│ └── settings-web/ # Settings dashboard (Vite + React)
Each LLM provider implements the LLMProvider interface:
interface LLMProvider {
id: string;
name: string;
configure(config: ProviderConfig): void;
listModels(): Model[];
complete(request: CompletionRequest): Promise<CompletionResponse>;
stream(request: CompletionRequest): AsyncGenerator<StreamChunk>;
estimateCost(request: CompletionRequest): CostEstimate | null;
validateConnection(): Promise<boolean>;
}Adding a new provider means implementing this interface. See packages/providers/src/adapters/ for examples.
- API keys are stored in Chrome's local storage, never synced
- PII redaction strips emails, phones, credit cards, SSNs before sending
- Sensitive domain blocklist prevents tab context from banking/auth sites
- Audit log records what was sent, to which provider, with what context
- Tab context requires explicit user consent per use
- Download
draftly-v0.1.0.zipfrom the latest release - Unzip it
- Open Chrome and go to
chrome://extensions - Enable Developer mode (top right)
- Click Load unpacked and select the
distfolder from the zip - Click the Draftly icon in the toolbar to configure your AI provider
If you want to build it yourself:
Prerequisites: Node.js 18+, pnpm 9+
git clone https://github.com/Azkabanned/Draftly.git
cd Draftly
pnpm install
pnpm build:extThen load apps/extension/dist as an unpacked extension in Chrome.
If using Ollama, you must allow the Chrome extension origin or requests will be blocked with a 403 error.
# Stop any running Ollama instance, then start with:
OLLAMA_ORIGINS="chrome-extension://*" ollama serve
# Or to run in the background:
OLLAMA_ORIGINS="chrome-extension://*" nohup ollama serve > /dev/null 2>&1 &If Ollama runs as a macOS menu bar app:
launchctl setenv OLLAMA_ORIGINS "chrome-extension://*"
# Then quit and reopen Ollama from the menu barTo make this permanent, add to your shell profile (~/.zshrc or ~/.bashrc):
export OLLAMA_ORIGINS="chrome-extension://*"Then in Draftly settings:
- Select Local / Custom Inference as your provider
- Set the base URL (default:
http://localhost:11434/v1) - Click Scan for Models to detect available models
- Select a model and save
LM Studio and vLLM generally don't have this CORS restriction — just set the correct base URL.
# Watch mode for the extension (rebuilds on changes)
pnpm dev
# Run the settings web app in dev mode
cd apps/settings-web && pnpm dev
# Run tests
pnpm test
# Type check
pnpm lint- Select text on any web page
- A small Draftly button appears near your selection
- Click it (or press
Ctrl+Shift+D) to open the command palette - Choose an action:
/fix,/rewrite,/sharpen,/shorten, etc. - Draftly sends your text to your chosen AI provider
- Replace the selection, insert below, or copy the result
- You can also right-click and choose "Rewrite with Draftly"
| Command | Description |
|---|---|
/fix |
Fix grammar, spelling, and punctuation |
/rewrite |
Rewrite for clarity |
/sharpen |
Make tighter and more precise |
/shorten |
Make more concise |
/expand |
Add more detail |
/paraphrase |
Rephrase in different words, same meaning |
/vocabulary |
Suggest stronger, more engaging word choices |
/professional |
Professional, polished tone |
/friendly |
Warm, conversational tone |
/persuasive |
More compelling and convincing |
/confident |
Assertive, no hedging language |
/formal |
Formal register for official communication |
/academic |
Scholarly tone for papers and research |
/simplify |
Simpler words and shorter sentences |
/tone |
Analyse how your writing comes across (doesn't rewrite) |
/reply |
Generate a reply |
/summarise |
Create a concise summary |
/brainstorm |
Generate ideas and angles from your text |
/draft |
Turn rough notes into polished prose |
/custom |
Your own instruction |
| Provider | Auth | Status |
|---|---|---|
| Anthropic (Claude) | API key | Full support |
| OpenAI (GPT) | API key | Full support |
| Google Gemini | API key | Full support |
| OpenRouter | API key | Full support |
| Custom (Ollama, LM Studio, etc.) | Optional API key | Full support |
Draftly has no servers. Your text goes directly from your browser to your AI provider (or stays on your machine with local models). Nothing passes through us.
- No servers, no tracking, no data collection — there is no Draftly backend
- API keys stored locally — never synced, never transmitted except to your provider
- PII redaction — optionally strip emails, phone numbers, credit cards before sending
- Sensitive site blocking — banking, auth, healthcare sites excluded from tab context
- Audit log — see exactly what was sent and to which provider
Full privacy policy: PRIVACY.md
The Chrome extension works with Word Online (word-edit.officeapps.live.com) since it uses contenteditable HTML. Select text in Word Online and use Draftly as you would on any page.
See packages/word-integration/WORD_ADDIN_PLAN.md for the technical plan. The core logic (providers, prompts, transforms) is shared — only the Office.js integration layer needs to be built.
- Inline grammar underlines (real-time as you type)
- Streaming responses in command box
- Custom prompt editor in settings
- Token cost tracking over time
- Plagiarism detection
- Team prompt sharing
- Native Office Word add-in
- Safari and Edge extension ports
- Custom workflows / prompt chains
- Bring-your-own-RAG knowledge base
- Extension: Chrome Manifest V3, esbuild
- UI: React 18, Tailwind CSS
- State: Zustand + Chrome Storage API
- Language: TypeScript (strict)
- Build: pnpm workspaces, esbuild, Vite
- Tests: Vitest
Draftly is currently available as a manual install from GitHub Releases. If there's enough interest, we'll publish it to the Chrome Web Store and other browser stores. Star the repo or open an issue if you'd like to see that happen.
Issues and PRs welcome at github.com/Azkabanned/Draftly.
MIT