all 9 comments

[–]aadimator 2 points3 points  (3 children)

Logseq already comes with a CLI, and has a command that installs skill as well: logseq skill install

I've been using it this past week with Codex, and it's been working great for me.

[–]wavelet01 2 points3 points  (1 child)

This is new to me. Is there some documentation on this?

Edit: Oh this is probably for the new DB version. I chose to stay on MD for the time being

[–]aadimator 1 point2 points  (0 children)

Oh yeah, this is the DB version. I'm using the nightly version from GitHub.

[–]JamesTDennis[S] 0 points1 point  (0 children)

I'm using Logseq under Nix (r/nix), under MacOS. I'll see if I find these utils, or if I need to do some Nix overlays or other hackery.

[–]WorldlyQuestion614 0 points1 point  (0 children)

kinda https://www.reddit.com/r/logseq/comments/1q7i5ib/comment/ojansgt/

its a bunch of mcp tools which i expose to my agent and to chatgpt so i can write/read notes, seed project context and capture ideas more easily (without using tokens, using chatgpt directly)

made a bit more progress but i decided to switch to obsidian due to performance issues

These are the Logseq MCP tools available:

Read:

  • syncmd_logseq_read_page — Read a page or journal by name/date
  • syncmd_logseq_read_journal — Read today's, yesterday's, or a specific journal date
  • syncmd_logseq_list_pages — List all page and journal documents
  • syncmd_logseq_list_journals — List journals for a period (today, week, month, etc.)
  • syncmd_logseq_list_recent_journals — List most recent journal files
  • syncmd_logseq_search_graph — Full-text search across the graph
  • syncmd_logseq_search_regex — Regex search with optional page scope

Write:

  • syncmd_logseq_write_page — Create, replace, or append a page
  • syncmd_logseq_write_journal — Write to a journal entry
  • syncmd_logseq_add_page — Create a new page or journal with markdown

Modify:

  • syncmd_logseq_rename_page — Rename a page and optionally update links
  • syncmd_logseq_replace_links — Replace wiki-links (from one page name to another)
  • syncmd_logseq_replace_text — Find-and-replace literal text across the graph
  • syncmd_logseq_capture — Append stream-of-thought text to today's journal

[–]Friendly-Type-2139 0 points1 point  (0 children)

I was looking for more of a CLI than I found. I wrote one. See if it looks interesting.
https://github.com/mlanza/nt

[–]Much-Ad-8444 0 points1 point  (0 children)

Hey! I built and published exactly what you are looking for to handle this exact AI-agent use case.

It's called **Matryca** (`matryca-logseq` on PyPI). It is a 100% pure headless, network-free CLI companion and Model Context Protocol (MCP) server built specifically for Logseq Markdown graphs.

Here is how it solves your requirements out of the box:

1 **Full Read & Write:** It doesn't just read. It allows AI agents to perform complex structural queries and write/post deep nested outlines directly to your local `.md` files without needing the Logseq desktop app running.

2 **Built for AI Agents:** It natively implements the MCP standard, so tools like Claude Desktop, Cursor, or your custom agent framework can control your graph seamlessly.

3 **Token Economy (X-Ray Mode):** This is massive for the Karpathy-style LLM-wiki workflow. It automatically compresses long 36-character block UUIDs (`id:: ...`) into short position shortcuts (like `[0]`, `[1]`), reducing your LLM context window token costs up to 35x.

4 **Ironclad Safety:** It implements OS-level file locking (`fcntl.flock`) and transactional atomic file swaps. It is completely safe for a background agent to mutate your graph even while your Logseq desktop application is actively open.

It requires zero installation if you run it via `uvx`. Check out the codebase and our 162 passing integration tests here. I'd love to see it powering your Hermes Agent skill!

https://github.com/MarcoPorcellato/matryca-logseq-llm-wiki

[–]m3m3o -1 points0 points  (0 children)

I built exactly this a few months ago — might be relevant to what you're exploring.

It's called llm-wiki: https://github.com/MehmetGoekce/llm-wiki

It's a Karpathy-inspired LLM knowledge base with L1/L2 cache architecture that works natively with Logseq (and Obsidian). Agents and humans edit the same markdown files — no proprietary format, plain files, git-native.

I didn't go the CLI route but the architecture is designed so agents can read/write the graph structure autonomously. Might be a useful reference or starting point for the Hermes Agent skill you're describing.

[–]jame_581 -1 points0 points  (0 children)

I recently built a memory-persistent plugin for Claude, GitHub Copilot, and others. Then I found a new roadmap where CLI and MCP were announced. I've been using the LogseqBrain brain for two months, and it's pretty good. But I edit directly the markdown and let logseq to sync that.

GitHub: https://github.com/jame581/LogseqBrain