$ show openclaw/graincrawl
graincrawl is a local-first CLI tool written in Go that archives Granola meeting notes, transcripts, panels, and metadata into a private SQLite database. It supports multiple read-only source adapters: Granola's private desktop API (via WorkOS token), the official public API (with a scoped API key), the local plaintext desktop cache, and legacy encrypted JSON files (via Electron safeStorage decryption). The tool provides commands for syncing, searching, exporting Markdown, creating portable snapshots, and browsing via a terminal UI. The architecture is cleanly modular with separate packages for each source adapter, a shared SQLite store with schema migrations, and a syncer that orchestrates fallback logic between sources. The codebase is well-tested, has comprehensive CI/CD, and follows Go best practices. It is not a data research project; it is a production-grade application for personal data archiving.
The LLM identified 3 files worth highlighting for reuse:
Implements decryption of Electron safeStorage-encrypted JSON files (AES-256-GCM with PBKDF2-derived key). Handles Chromium v10 payload format, macOS Keychain retrieval, and in-memory decryption with strict file integrity checks. This is a self-contained, reusable component for any tool that needs to decrypt Granola's legacy encrypted cache or supabase files without depending on Electron.
Parses Granola's cache-v6.json format (versions 6-8) and normalizes documents, transcripts, and metadata into the internal model. Handles empty maps, version validation, and provides a summary function. This is a clean, isolated parser that could be reused by other tools needing to read Granola's local cache.
Wraps crawlkit's snapshot library to export and import SQLite tables with a custom merge strategy that preserves local payloads on identity conflicts and retains tombstones. Demonstrates a well-designed conflict resolution pattern for portable data snapshots, reusable across similar archive tools.