# Proton Search Search your [Proton Drive](https://proton.me/drive) files from [Obsidian](https://obsidian.md) and create small reference notes. This is an independent project. It is **not affiliated with, endorsed by, or sponsored by Proton AG**. Forked from [yunusey/obsidian-proton-integration](https://github.com/yunusey/obsidian-proton-integration). ## What it does - Sign in to Proton Drive in your browser - Search files by name or path (local [MiniSearch](https://github.com/lucaong/minisearch) index, no search server) - Create a markdown note with two properties only: `url` and `path` - Open the file in the browser, or on this computer if the Proton Drive app is installed The plugin does not embed or preview Proton Drive files inside Obsidian. ## Install Until it is on the Obsidian community plugin directory: 1. Build the plugin (`npm install` then `npm run build`). 2. Copy `main.js`, `manifest.json`, and `styles.css` into `.obsidian/plugins/proton-search/` in your vault. 3. Enable **Proton Search** in Obsidian settings. ## Usage 1. Open **Settings → Proton Search** and click **Sign in**, or run **Sign in to proton drive**. 2. Complete sign-in in your browser, then return to Obsidian. 3. Run **Search proton drive files** (or click the search ribbon icon) and pick a file. 4. Confirm or change the note name (default: the Proton file name). 5. A note is created in the **Proton Drive** folder at the vault root (or another folder you set). Notes are stored flat, with no subfolders. Each note has only two properties: - `url` — the file on Proton Drive in the browser - `path` — a `file://` link on this computer, if the Proton Drive app folder is found With the note open, or from the file menu: - **Open proton file in browser** - **Open proton file on this computer** Rebuild the search index from settings or with **Refresh proton drive search index**. Photos are optional and can take a long time. ## Privacy - **Session:** sign-in data is saved in plugin storage so you stay signed in after restarting Obsidian. You can enable **Keep credentials in memory only** if you prefer to sign in again each time. Saved credentials are written to `.obsidian/plugins/proton-search/data.json`, unencrypted. **Do not share this file, and do not add it to version control.** - **Search index:** file names and folder paths are stored locally in `data.json`. File contents are not indexed. - **Client UID:** a random `protonClientUid` is stored so the Proton Drive SDK can identify this installation. It is not a credential. > [!CAUTION] > The Proton Drive SDK is still evolving and does not yet ship standalone auth. Sign-in follows the same pattern as the [official Drive CLI](https://github.com/ProtonDriveApps/sdk/tree/main/js/cli). ## Development ```bash npm install npm run dev npm run build npm run typecheck ``` ## License MIT