Import Bear Notes into AI Memory

Bear is a beautiful notes app for Apple devices with Markdown support and nested tags. This guide shows how to export your Bear notes, import them into REM Labs, and make your entire notes library searchable by AI with semantic retrieval and entity graphs.

Step 1: Export from Bear

Bear supports bulk export in several formats. Use Markdown for the cleanest import:

  1. Open Bear on macOS
  2. Select all notes (Cmd+A in the notes list)
  3. File > Export Notes > Markdown
  4. Choose a folder like ~/bear-export/

Each note becomes a .md file. Bear tags like #work/meetings appear inline in the Markdown content.

Step 2: Parse Bear Tags

Bear uses a unique nested tag syntax. This parser extracts them:

function extractBearTags(content) { // Bear tags: #tag, #tag/subtag, #multi word tag# const simple = content.match(/#[\w][\w/]*/g) || []; const multiWord = content.match(/#[^#\n]+#/g) || []; const tags = [ ...simple.map(t => t.slice(1)), ...multiWord.map(t => t.slice(1, -1).trim()) ]; return [...new Set(tags)]; } // Example: // extractBearTags("Meeting with #work/clients about #project launch#") // => ["work/clients", "project launch"]

Step 3: Import into REM Labs

import { RemClient } from "@remlabs/sdk"; import fs from "fs"; import path from "path"; const rem = new RemClient({ apiKey: process.env.REMLABS_API_KEY }); const exportDir = process.env.BEAR_EXPORT_DIR || "~/bear-export"; const files = fs.readdirSync(exportDir).filter(f => f.endsWith(".md")); let count = 0; for (const file of files) { const content = fs.readFileSync(path.join(exportDir, file), "utf-8"); const title = path.basename(file, ".md"); const tags = extractBearTags(content); // Strip tag syntax from content for cleaner storage const cleanContent = content .replace(/#[\w][\w/]*/g, "") .replace(/#[^#\n]+#/g, "") .trim(); if (cleanContent.length < 10) continue; await rem.remember({ content: `${title}\n\n${cleanContent}`, namespace: "bear-notes", tags, metadata: { title, source: "bear", original_tags: tags, file: file } }); count++; } console.log(`Imported ${count} Bear notes`);

Step 4: Query Your Notes

// Semantic search across all your Bear notes const results = await rem.recall({ query: "ideas for the product redesign", namespace: "bear-notes", limit: 5 }); results.forEach(m => { console.log(`${m.metadata.title}`); console.log(` Tags: ${m.metadata.original_tags.join(", ")}`); console.log(` ${m.content.slice(0, 100)}...\n`); }); // Or scope to a specific Bear tag const workNotes = await rem.recall({ query: "quarterly review prep", namespace: "bear-notes", tags: ["work"], limit: 5 });

Re-Sync on a Schedule

Export from Bear periodically and re-run the import. REM Labs handles deduplication based on content, so re-importing the same note updates the existing memory rather than creating duplicates.

// Add to your crontab or run manually // 1. Export from Bear (can be automated via bear:// URL scheme) // 2. Run the import script node import-bear-notes.js

Bear URL scheme: You can automate the export step using Bear's bear://x-callback-url/search URL scheme with Shortcuts on macOS, creating a fully automated sync pipeline.

Make your Bear notes AI-searchable

Free tier. Tag-aware import. Semantic search on your notes.

Get Started