8000 GitHub - linyimin0812/folyn: Local-first, vault-isolated, AI-native knowledge workspace. Markdown, whiteboards, ER diagrams & mind maps in one editor, with Claude Code / Codex / Gemini CLI agents wired in. Built with Tauri 2 + React. · GitHub
[go: up one dir, main page]

Skip to content
linyimin0812Public

About

Local-first, vault-isolated, AI-native knowledge workspace. Markdown, whiteboards, ER diagrams & mind maps in one editor, with Claude Code / Codex / Gemini CLI agents wired in. Built with Tauri 2 + React.

Topics

Resources

Stars

41 stars

Watchers

0 watching

Forks

Latest commit

 

History

2,562 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 简体中文 | 日本語 | Français | Deutsch | Español

Folyn Editor

Local-first · Vault-isolated · AI-native
Local-first, vault-based, AI-native knowledge workspace.

platform downloads stack license


One app, all your context. Isolate each set of data in a Vault, fit markdown, whiteboards, ER diagrams, and mind maps into one editor, and wire AI agents straight into your workflow — everything stays on your own devices.

For Users

First-run notes

The app is not code-signed; the OS will block it on first launch. Dismiss as follows:

  • Windows: You'll see a SmartScreen "Windows protected your PC" warning on first run. Click More info → Run anyway.
  • macOS: If "can't be opened" or "damaged" appears after install, run in Terminal:
    xattr -cr /Applications/Folyn.app
    Then reopen from Launchpad.

Why Folyn

  • Vault multi-vault isolation — Open a separate vault for each project or note set. Data stays independent, switch anytime. Your local device is the single source of truth.
  • Multi-format editing — Markdown (with container extensions: Button / Callout / Card / Tabs / Timeline / Steps / Grid / FilePreview / StatusTag / Collapsible, plus Graphviz / Mermaid / PlantUML diagram containers), rich text, CSV, JSON, markmap mind maps, dbml ER diagrams, drawio architecture diagrams, excalidraw hand-drawn whiteboards, graphviz DOT — one editor handles them all.
  • Universal preview — Office documents, audio/video, archives, e-books, presentations and drawings — view them without leaving Folyn.
  • Deep AI integration — Built-in adapters for six CLI agents: Claude Code, Codex CLI, Gemini CLI, Opencode, Pi Code Agent, Qoder. Switch freely across model vendors, no vendor lock-in.
  • Desktop pet assistant — A resident desktop companion that pushes schedule reminders and task-change notifications; click to bring up a chat with the LLM.
  • In-app terminal — Open a terminal inside Folyn and let Claude Code / Codex / other CLI agents read and write the current document — no window switching.
  • Activity collection — Collector extensions record your day — window switches, file changes, GitHub activity, webhook events — into a per-vault local database; review it on a timeline and relations graph, and generate daily/weekly/monthly reports as vault notes (optionally AI-written).
  • Extension system — Microkernel + extension SDK architecture. Rich text, DBML, file viewer, and activity collectors ship as extensions, translation is built in; third-party extensions supported.
  • Voice input — Speech-to-text with automatic polish, pasted straight to the cursor (currently macOS only).

Vault multi-vault isolation

Open a separate vault for each project or note set. Each vault is its own data space — notes, attachments, and extension configs are stored independently; switching vaults is like switching a whole workspace. Data stays on the local device; no cloud account required.

Vault switching

Multi-format editing

  • Markdown — Standard syntax + a set of container extensions: Button / Callout / Card / Collapsible / FilePreview / Grid / StatusTag / Steps / Tabs / Timeline, plus Graphviz / Mermaid / PlantUml diagram containers
  • Rich text — WYSIWYG, for layouts that don't need markdown syntax
  • Structured data — CSV, JSON, edited directly
  • Mind maps — markmap, markdown outlines auto-rendered as visual structure
  • Modeling & diagrams — dbml (ER) / drawio (architecture, flow) / excalidraw (hand-drawn whiteboard) / graphviz (DOT) / plantuml / mermaid

Markdown editor with container extensions

Universal preview

View Office documents, audio/video, archives, e-books, presentations and drawings without leaving Folyn — no extra software required.

Full-format preview

Deep AI integration

No vendor lock-in — mainstream CLI agents adapted straight into the editor:

  • Claude Code
  • Codex CLI
  • Gemini CLI
  • Opencode
  • Pi Code Agent
  • Qoder

Configure CLI paths in Settings → AI. Switch freely across model vendors by task or preference.

AI integration

Desktop pet assistant

Resident on desktop, pushes schedule reminders and task changes to the foreground; click to bring up the LLM chat window and ask anytime without breaking your flow.

External apps (scripts, cron, CI) can trigger pet notifications via a local HTTP API — default 127.0.0.1:17382, POST /pet/action pushes a bubble, supporting target navigation, launch to open a URL/app, and actions for bubble buttons. See docs/pet-notify-api.en.md.

Desktop pet

In-app terminal

Open a terminal panel inside the Folyn workspace, side-by-side with the editor, file paths auto-synced. Claude Code / Codex CLI / other agents can modify the current document directly; AI edits appear in the editor immediately. Command output can be pasted back at the cursor — "edit → invoke → paste back" collapses into one pipeline.

In-app terminal

Activity collection

Collector extensions from the extension store record what happens on your machine — frontmost window changes, file create/modify/delete, GitHub commits/PRs/issues, and events pushed from external tools via a local webhook — into a database stored inside the vault. Nothing leaves your device.

The Activity tab turns raw events into a day timeline and an entity relations graph (people, meetings, repositories, documents, tasks). Daily, weekly, and monthly reports are written as markdown notes in the vault; with a custom prompt the report body is generated by the LLM instead of a fixed template, and the desktop pet can notify you when a report is ready.

Activity timeline

Activity relations graph

Each collector can be enabled/disabled separately with its own polling interval — or write your own with the extension SDK.

Extension system

Microkernel + extension SDK architecture; the core stays lean and features load on demand:

  • Translation — Multilingual content processing (built in)
  • Rich text / DBML / file viewer — Editing and viewing extensions from the extension store
  • Activity collectors — Window activity / files / GitHub / webhook collectors from the extension store record events for the Activity tab

Third-party extension extensions supported; see docs/extensions.html.

Extensions

Voice input

Speech is transcribed to text in real time and auto-polished — removing filler and pauses — then pasted at the cursor. Currently macOS only; Windows not yet supported.

Voice input

For Developers

Tech Stack

Layer Technology
Shell Tauri 2 (Rust)
Frontend React 18, Vite 6, TypeScript
Editor CodeMirror 6
Markdown unified / remark / rehype pipeline
State Zustand 5
Styling Tailwind CSS 3
Monorepo pnpm workspaces

Project Structure

folyn/
├── apps/
│   └── desktop/              # Tauri desktop app
│       ├── src/              # React frontend
│       │   ├── components/   # shell, editor, AI, sidebar, file-types, ...
│       │   ├── editor/       # CodeMirror extensions
│       │   ├── hooks/        # React hooks
│       │   ├── store/        # Zustand stores
│       │   └── utils/        # Utility modules
│       └── src-tauri/        # Rust backend (Tauri commands)
├── packages/
│   ├── cli-adapter/          # AI CLI adapter abstraction (Claude / Codex / Gemini / Opencode / Pi / Qoder)
│   ├── container-extensions/    # Markdown container directive extensions
│   ├── extension-host/          # Extension host runtime
│   ├── extension-sdk/           # Extension SDK for third-party authors
│   ├── create-folyn-extension/  # Extension scaffolding CLI
│   └── vault-provider/       # Vault storage provider abstraction
├── package.json
├── pnpm-workspace.yaml
└── tsconfig.base.json

Extension Points

  • cli-adapter package — Implement the adapter interface to plug in a new CLI Agent
  • container-extensions package — Custom :::directive container extensions, registered to the slash menu
  • vault-provider package — Custom storage backends (beyond local / GitHub / WebDAV / S3)
  • extension-host + extension-sdk — Third-party extensions register capabilities via the SDK (published on npm as folyn-extension-sdk); the microkernel loads them on demand
  • create-folyn-extension — Scaffolding CLI to quickly start a new extension
  • File types — Register a new Handler under apps/desktop/src/components/file-types/ to extend file types

See docs/extensions.html for details.

Architecture Diagrams

Design diagrams for the extension system and the activity collection pipeline (editable sources live in docs/assets/diagrams/):

Architecture

Microkernel + extensions — the extension host runtime mediates between feature extensions and the Rust microkernel's capability services; third-party extensions enter through the sandbox isolation layer.

Extension trust tiers

Trusted vs sandbox extensions — trusted packages are TOFU-pinned and run in the host main realm; sandbox packages run inside an opaque-origin iframe with no DOM or Tauri access.

Extension RPC protocol

postMessage RPC protocol — request/response, host push, and reverse command invocation across the host/iframe boundary, with per-call permission gating.

Activity collectors

Activity collectors — the poll/webhook runtime drives the collect → redact → ingest → cursor-advance loop; the cursor only moves after a successful push.

Activity database schema

Activity database schema — per-vault SQLite tables for events, entities, relations, collector cursors, and run history.

Extension SDK surface

SDK surface — the type contracts published as folyn-extension-sdk: the Extension entry, the ExtensionApi capability boundary (vault, editor, AI, network, terminal, export, commands, events, storage, env, registries), contributes declaration points, and dev tools.

Getting Started

Prerequisites

Install & Run

# Install dependencies
pnpm install

# Start development (frontend + Tauri dev window)
pnpm dev

# Build the frontend only
pnpm build

# Build the desktop app (platform-specific installer)
pnpm build:app

License

MIT

About

Local-first, vault-isolated, AI-native knowledge workspace. Markdown, whiteboards, ER diagrams & mind maps in one editor, with Claude Code / Codex / Gemini CLI agents wired in. Built with Tauri 2 + React.

Topics

Resources

Stars

41 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0