mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
e3140af5ee
* feat: add Flomo memos reader adapter Read your Flomo memos via the signed API. - flomo memos: Lists recent memos with content, tags, timestamps Uses the Flomo v1 API with MD5 signing (secret embedded). Requires FLOMO_ACCESS_TOKEN env variable. Supports pagination via --slug cursor and --limit. * fix: add --token arg for Flomo auth * fix: use COOKIE strategy with browser-based API call Use Strategy.COOKIE + browser:true instead of PUBLIC + manual token. The adapter now reads flomo_token from localStorage in the browser, and makes the signed API call from within the page context via fetch(). Signature is computed in Node.js and injected into the browser eval. No env var or --token flag needed. * fix: use access_token from localStorage.me for API auth Flomo API requires Bearer token from access_token field in localStorage.me (not api_token). Adapter now reads access_token from the browser's localStorage and calls the signed API from Node.js with the Bearer header. * feat: add --since filter, refine flomo adapter API - Add --since <unix_ts> to filter memos by updated_at - Add --limit 200 to fetch all memos in one call - Mark --slug as experimental (cursor pagination unreliable) - 5 tests passing * feat: add images column to flomo memos output * docs: add flomo adapter documentation * fix: use clampInt and rebuild manifest * fix(flomo): harden memos reader contract --------- Co-authored-by: huzekang <huzekang@opencode.ai> Co-authored-by: jackwener <jakevingoo@gmail.com>
2.3 KiB
2.3 KiB
Flomo
Mode: 🌐 Cookie · Domain: flomoapp.com, v.flomoapp.com
Commands
| Command | Description |
|---|---|
opencli flomo memos |
List your Flomo memos |
What works today
- Lists memos from your Flomo account using the browser login session.
- Reads the access token automatically from
localStorage.me.access_token— no manual token setup required. - Supports
--limitfrom 1 to 200. Invalid values fail instead of being silently clamped. - Supports
--since <unix_ts>to filter by update time. - Supports
--slug <cursor>for pagination from a previous memo page. - Returns stable
id/urlfields plus memo content (HTML), slug, tags, image URLs, and timestamps.
Current limitations
- Requires browser mode with an active Flomo login session.
- The Flomo API uses a custom MD5 signing mechanism with a fixed secret key (embedded in the adapter). If the signing key changes, the adapter will break.
--slugpagination is experimental and may not work reliably.- Image URLs have expiration timestamps in the query string; they may expire after some time.
- Rate limited to 360 requests per hour.
Usage Examples
# List recent memos
opencli flomo memos
# Fetch all memos
opencli flomo memos --limit 200
# Filter by time (Unix timestamp)
opencli flomo memos --since 1735689600
# Continue from a memo cursor
opencli flomo memos --slug memo_abc123 --limit 50
# JSON output
opencli flomo memos --limit 200 -f json
Prerequisites
- Requires Chrome running with an active Flomo session at
v.flomoapp.com. - Standalone mode will auto-launch Chrome; use the Browser Bridge extension for an established session.
Notes
- The adapter authenticates via
Strategy.COOKIE— it reads the Bearer token fromlocalStoragein the browser context, then calls the signed API from Node.js. - Memo content is stored as HTML (including formatting tags like
<p>,<ul>,<strong>, etc.). - Image attachments are returned as thumbnail URLs from Flomo's CDN (
static.flomoapp.com). - The
--sinceparameter expects a Unix timestamp in seconds (e.g.1735689600= 2025-01-01 00:00:00 UTC). idis the memo slug returned by Flomo andurlopens the memo in Flomo's web app when the session has access.