Co-authored-by: Cursor <cursoragent@cursor.com>
AFFiNE
The open-source, multimodal AI knowledge base for individuals and teams.
Try AFFiNE · Self-host · Star on GitHub
Download · Docs · Discord · Discussions
TL;DR. Docs, whiteboards, databases, files, collaboration, and AI context in one local-first workspace — synced across Web, Windows, macOS, Linux, Android, and iOS; self-hostable; BYOK Beta for eligible workspaces; and coming-soon programmable workflows for Claude Code and other agentic tools.
Choose your path
- Want a multimodal AI knowledge base? Try AFFiNE.
- Want an open-source Notion + Miro alternative? Use AFFiNE's docs, canvas, and databases together.
- Want private AI workflows? Use AFFiNE AI with BYOK Beta or self-host AFFiNE.
- Using Claude Code or AI agents? Track the coming-soon programmable knowledge workflows.
- Building collaborative editors? Explore BlockSuite and y-octo.
- Evaluating for a team? Start with Cloud, then choose self-host or enterprise controls.
What is AFFiNE?
AFFiNE is an open-source, multimodal AI knowledge base for individuals and teams. It combines documents, whiteboards, databases, files, tasks, collaboration, and AI context in one block-based workspace. It syncs across Web, Windows, macOS, Linux, Android, and iOS, while giving users the flexibility of canvas thinking, the structure of documents and databases, and the control of local-first and self-hostable knowledge infrastructure.
Why AFFiNE is different
- Docs, whiteboards, databases, and files share the same block-based workspace.
- Multimodal AI workflows can use supported workspace context across docs, canvas, attachments, files, and structured knowledge where available.
- Local-first design keeps your workspace usable and synced across Web, Windows, macOS, Linux, Android, and iOS.
- Self-hosting is a first-class deployment path, not an afterthought.
- Bring-Your-Own-Key (Beta) gives eligible workspaces more control over AI provider choice, cost, and policy.
Key features
- Docs, whiteboards, databases, and files in one workspace.
- Multimodal AI workspace context across docs, canvas, images, attachments, databases, and structured knowledge where supported.
- Bring Your Own Key (Beta). Route AFFiNE AI through your own provider keys for eligible workspaces, with supported OpenAI, Anthropic, Gemini, and FAL provider routes where configured.
- Local-first storage and real-time collaboration.
- Cross-platform sync: Web, Windows, macOS, Linux, Android, and iOS.
- Self-hosting and private deployment.
- Coming-soon programmable knowledge workflows for Claude Code and agentic tools.
- Import/export and knowledge portability.
Why developers care
- Open-source monorepo with a first-class self-hosting path.
- Local-first storage with both browser (IndexedDB) and native (SQLite) clients via
nbstore. - Block-based editor foundation via
BlockSuite. - CRDT-based real-time collaboration on top of Yjs and
y-octo. - NestJS + GraphQL + Prisma backend powering sync, cloud, self-hosting, and AI copilot.
- Cross-platform engineering and sync: Web, Electron desktop for Windows/macOS/Linux, plus Android and iOS clients.
- Workspace-aware AI plumbing with BYOK Beta, designed to extend toward programmable, agent-operable knowledge workflows.
Coming soon: Claude Code-ready programmable knowledge workflows
Coming soon: Claude Code-ready programmable knowledge workflows. We are making AFFiNE operable from terminal scripts and agentic coding tools such as Claude Code. The upcoming CLI-like mode is designed to let AI agents read, search, create, update, import, export, and organize your AFFiNE knowledge base from your computer — turning AFFiNE into a programmable, multimodal knowledge layer for personal and team workflows.
This is an actively building priority roadmap capability, not a shipped CLI feature yet. We do not publish commands here until they are available and verified.
Run AFFiNE your way
- Cloud — Fastest way to start. Best for individuals and teams that want zero setup, automatic updates, and managed AFFiNE AI. → app.affine.pro
- Desktop & Mobile — Local-first daily workspace synced across Web, Windows, macOS, Linux, Android, and iOS. → affine.pro/download
- Self-host — Own your data and run AFFiNE in your infrastructure, with BYOK Beta for eligible self-hosted AI workflows where supported. → docs.affine.pro/self-host-affine
- Team & Enterprise — Admin, policy, security, and support, with workspace-level BYOK on eligible plans and priority-roadmap programmable workflows for agentic tools. → affine.pro/pricing
Get started
- Try AFFiNE online: app.affine.pro
- Download apps: affine.pro/download
- Self-host with Docker: Self-host AFFiNE
- Build from source: docs/BUILDING.md
- Join the community: Discord or GitHub Discussions
Self-hosting
Want full control? Start with the official Docker-based self-hosting guide. The self-host stack uses the AFFiNE server image, Postgres/pgvector, Redis, and a migration job.
- Read the official guide: Self-host AFFiNE
- Inspect the Docker Compose stack:
.docker/selfhost/compose.yml - Review licensing before production deployment: LICENSE and packages/backend/server/LICENSE
Development
Prerequisites: Node.js, Yarn 4, and Rust.
- Build from source: docs/BUILDING.md
- Desktop build: docs/building-desktop-client-app.md
- Server development: docs/developing-server.md
- Monorepo CLI for contributors: tools/cli/README.md
Open in GitHub Codespaces
Click the green Code button on the GitHub repo main page and select Create codespace on canary. This will open a new Codespace with the AFFiNE monorepo cloned and ready to go.
Contributing, community, and security
We welcome contributions from developers, testers, designers, technical writers, template creators, and community members.
- Bug reports: create a bug report
- Feature requests and product ideas: GitHub Discussions
- Code contributions: docs/CONTRIBUTING.md
- Contribution types: docs/types-of-contributions.md
- Code of Conduct: docs/CODE_OF_CONDUCT.md
- Contributor License Agreement: .github/CLA.md
- Security: SECURITY.md
- Sponsor AFFiNE: GitHub Sponsors
Translations are welcome. Join Discord or open a discussion if you want to help localize AFFiNE.
Resources
License
AFFiNE uses mixed licensing. Most source code outside packages/backend and packages/common/native is MIT-licensed; backend-related code is governed by the AFFiNE EE License. Please review LICENSE and packages/backend/server/LICENSE before production self-host deployment.
Upstreams
We would also like to thank the open-source projects that make AFFiNE possible:
- BlockSuite — the open-source collaborative editor project behind AFFiNE.
- y-octo — a native, high-performance, thread-safe Yjs CRDT implementation.
- OctoBase — a local-first collaborative data engine written in Rust.
- Yjs — CRDT support for state management and data sync on the web.
- Electron — cross-platform desktop apps with JavaScript, HTML, and CSS.
Acknowledgements
"We shape our tools and thereafter our tools shape us."
AFFiNE stands on the shoulders of pioneers like Notion, Miro, Whimsical, Airtable, Trello, Quip, and many others — projects that taught us what blocks, canvases, and structured knowledge can be. Thanks for checking us out; we appreciate your interest. See Upstreams and Contributors for the full list of projects and people behind AFFiNE.
Contributors
We would like to express our gratitude to everyone who has contributed to AFFiNE. If you have an AFFiNE-related project, documentation, tool, or template, please share it with the community through awesome-affine.