| Download source | Download app | Build |
|---|---|---|
A local-first AI research notebook for macOS. Collect sources — websites, PDFs, text, Markdown, DOCX — store everything on your Mac, and ask questions grounded in your research with citations.
Status: Code complete and organized; not yet built/verified in Xcode. Building requires Xcode 15+ (SwiftData macros do not ship with the Command Line Tools). See Building.
- Local-first. All notebooks, sources, chunks, chat history, and notes live in a SwiftData store on your Mac. Nothing is uploaded by SourceDesk itself.
- RAG-grounded chat. Answers are generated from the sources you've collected,
with
[Source N]citation markers and a citation inspector. - Flexible AI providers. Ollama (fully local, detected — never auto-downloaded), OpenAI, and Anthropic Claude. API keys are stored in the macOS Keychain.
- Web search. Optional Brave or DuckDuckGo results can be mixed into chat
(
Notebook + WeborWeb Onlymodes), clearly separated from your sources. - Offline-first. A network monitor tracks connectivity; cloud features are blocked with helpful messages while offline or when Local-Only Mode is on.
- Study tools. Ten generators — summary, key points, timeline, FAQ, quiz, flashcards, study guide, outline, quotations, and source comparison — with one-click "Save to Notes".
- Unlimited sources. Add websites, PDFs, TXT, Markdown, HTML, DOCX, and pasted text in any quantity.
- Import / export. Notebooks export to a documented
.ziparchive and can be imported back on the same or another Mac.
Ready-to-run builds are attached to every tagged Release, and a fresh
unsigned build is produced on demand via Actions → Build SourceDesk → Run
workflow. Grab the .dmg, mount it, and drag SourceDesk into
/Applications.
The app is unsigned (open-source, no paid Developer ID), so macOS asks the first time: right-click
SourceDesk→ Open instead of double-clicking. Everything else works like a normal installed Mac app.
- macOS 14 Sonoma or later
- Xcode 15 or later (SwiftData build support) — the latest Xcode is recommended
- Ollama for local models (optional)
- API keys for OpenAI / Anthropic / Brave (optional)
Clone or open the project, then:
open SourceDesk.xcodeproj- Select the SourceDesk scheme (⌘⇧<)
- Choose your team under Signing & Capabilities and (optionally) enable the
App Group entitlement
group.com.sourcedesk.appfor shared storage. Without the entitlement the app falls back to a per-app store automatically. - Run (⌘R).
The result is a normal macOS app: SourceDesk.app, built from the product
folder. You can copy it into /Applications; open it from Finder, launch it
from Spotlight, or pin it to the Dock. (For distribution to other Macs, use
Archive → Distribute App, or wrap the .app in a .dmg.)
The Xcode project is generated by scripts/generate_project.py;
re-run it if you add or remove source files.
Note: SwiftData
@Modelmacros require Xcode's build system. A plainswift buildfrom the terminal will fail with "external macro implementation not found" — this is expected and only affects Command Line Tool installs.
- Create a notebook (⌘N).
- Add sources (⌘U) — paste a URL, choose files, or paste text.
- Ask questions in the Research tab. Pick a search mode in the header.
- Inspect answers — click a citation pill to see the source excerpt.
- Generate study material in the Study Tools tab and save it to Notes.
- Move fast — press ⌘K for a command palette that jumps to any notebook, source, or tab.
- AI Providers — choose a local Ollama model (only models you've already installed are listed) or enter OpenAI/Anthropic API keys.
- Privacy — enable Local-Only Mode to restrict everything to local processing, and Confirm before sending content to cloud AI for a warning before your questions (and retrieved source excerpts) leave your Mac.
- Search — DuckDuckGo works with no key; Brave offers fuller results.
- Advanced — chunk size, overlap, retrieval count, and semantic embeddings.
See docs/ARCHITECTURE.md for the layout: models, the AI provider abstraction, ingestion pipeline, RAG flow, view models, and views.
Layout in brief:
SourceDesk/
├── App/ entry point, shared app state (AppState)
├── Models/ SwiftData models + SwiftData-free types (Types.swift)
├── Services/
│ ├── AI/ provider protocol, Ollama/OpenAI/Anthropic, AIManager
│ ├── Ingestion/ web download, text/document extraction, ingestion service
│ ├── RAG/ chunking, embeddings, vector store, pipeline
│ ├── Search/ DuckDuckGo + Brave providers, SearchManager
│ ├── Storage/ Keychain, notebook exporter/importer
│ └── StudyToolsService.swift
├── Utilities/ token estimate, chunking, text cleaning (pure Swift)
├── ViewModels/ observable view models
└── Views/ SwiftUI three-column interface
- Notebook data:
~/Library/Application Support/SourceDesk/ - API keys: macOS Keychain (service
sourcedesk) - Your sources and notes stay local. Cloud AI and web search are opt-in and only send what's needed for the task you trigger, always with a clear indicator in the UI (toolbar online/offline pill, provider menu, privacy settings).
Unit tests in SourceDeskTests/ cover token estimation, chunking, vector math,
citation parsing, robots handling, and more. Run them with ⌘U in Xcode.
MIT — see LICENSE.
See CONTRIBUTING.md.