SuperAPI AI Directory

flomo-local-api

Coding & development

View repository

Updated 10-16 10:22

About this skill

Flomo Local API

Overview

Use this skill for fast flomo access when local desktop auth is available.

This skill now supports direct text edits to existing memos through the same local auth flow, including when the user provides a flomo memo URL like https://v.flomoapp.com/mine/?memo_id=....

Preconditions

  • flomo.app has been logged in on this Mac before
  • Local flomo storage exists under ~/Library/Containers/com.flomoapp.m/...
  • The request can be handled with local auth and API access

Use This Skill When

  • The user asks to search flomo memos by keyword, tag, or time range
  • The user asks what they have been thinking about recently
  • The user wants monthly markdown export or tag statistics
  • The user wants to create a simple memo without Chrome UI automation
  • The user wants to edit an existing text memo by slug or by flomo memo URL without opening the Web UI
  • The user wants faster querying than Chrome UI automation

Do Not Use This Skill When

  • The user wants to delete a memo
  • The user wants to operate through the live Web UI
  • The local desktop login state is missing or broken and the request cannot be completed from local auth

Default Workflow

  1. Use scripts/flomo_local_api.py.
  2. Prefer query for direct lookup.
  3. Prefer summarize for reflective prompts such as "What have you been thinking about lately".
  4. Prefer export-monthly when the user wants markdown output.
  5. Prefer create for lightweight memo creation without attachments.
  6. Prefer edit for updating the text content of an existing memo by slug or memo_id URL.
  7. Treat delete as out of scope unless the skill is expanded again later.

Commands

Query

Use for direct search by keyword, tag, date range, or recent window.

python3 /Users/zeeland/.codex/skills/flomo-local-api/scripts/flomo_local_api.py query --keyword "openclaw" --limit 10
python3 /Users/zeeland/.codex/skills/flomo-local-api/scripts/flomo_local_api.py query --tag "Proj/mf" --days 30
python3 /Users/zeeland/.codex/skills/flomo-local-api/scripts/flomo_local_api.py query --start-date 2026-03-01 --end-date 2026-03-11 --format markdown

query results now include both slug and the corresponding flomo memo URL so later edit steps can reuse them directly.

Summarize

Use for "What have I been focusing on lately / How have I been doing recently" style requests.

python3 /Users/zeeland/.codex/skills/flomo-local-api/scripts/flomo_local_api.py summarize --days 30
python3 /Users/zeeland/.codex/skills/flomo-local-api/scripts/flomo_local_api.py summarize --days 90 --limit 80

Export Monthly

Use when the user wants a monthly markdown dump plus tag-stats.md.

python3 /Users/zeeland/.codex/skills/flomo-local-api/scripts/flomo_local_api.py export-monthly
python3 /Users/zeeland/.codex/skills/flomo-local-api/scripts/flomo_local_api.py export-monthly --output-dir ~/download/flomo-markdown-export-monthly

Create

Use when the user wants to quickly create a text memo from local auth.

python3 /Users/zeeland/.codex/skills/flomo-local-api/scripts/flomo_local_api.py create --content "测试 memo #codex/demo"
printf '第一行\n\n第二段 #codex/demo\n' | python3 /Users/zeeland/.codex/skills/flomo-local-api/scripts/flomo_local_api.py create --stdin

Edit

Use when the user wants to update the text of an existing memo and already has either the memo slug or a flomo memo URL.

python3 /Users/zeeland/.codex/skills/flomo-local-api/scripts/flomo_local_api.py edit --slug "MTIzMDgzNzgz" --content "更新后的 memo 内容 #codex/demo"
python3 /Users/zeeland/.codex/skills/flomo-local-api/scripts/flomo_local_api.py edit --url "https://v.flomoapp.com/mine/?memo_id=MTIzMDgzNzgz" --content "更新后的 memo 内容 #codex/demo"
printf '第一行修改后\n\n第二段也更新\n' | python3 /Users/zeeland/.codex/skills/flomo-local-api/scripts/flomo_local_api.py edit --slug "MTIzMDgzNzgz" --stdin

Output Conventions

  • query --format json returns structured memo hits
  • query --format markdown returns a readable markdown list
  • summarize returns memo counts, top tags, and supporting memos
  • export-monthly writes one markdown file per month plus tag-stats.md
  • create returns the created memo payload with parsed markdown and tags
  • edit returns the updated memo payload with parsed markdown and tags
  • Monthly memo files keep only created_at metadata by default

Implementation Notes

  • The update path is PUT /memo/<slug> using the same local auth token and request signing as the other commands.
  • edit preserves the memo's current files and pin state so a text update does not accidentally drop attachments or pin status.
  • flomo share links of the form https://v.flomoapp.com/mine/?memo_id=... can be used directly; the skill extracts memo_id as the target slug.
  • For live-user edits, prefer small and explicit changes unless the user clearly asks for a rewrite.
  • For capability verification, use an idempotent marker string or a temporary test memo, then confirm by reading the updated payload.

Safety Rules

  • Only use create when the user explicitly asks for a new memo
  • Only use edit when the user explicitly asks to modify an existing memo
  • edit preserves the memo's current files and pin state; it is for text updates, not attachment management
  • Do not delete flomo memos from this skill
  • Do not persist extra raw dumps unless the user explicitly asks
  • Treat summaries as patterns from memo evidence, not diagnoses

Resources

scripts/

  • scripts/flomo_local_api.py: CLI for flomo query, summarize, export, lightweight create, and text edit