Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

logseq-cli

Skill by logseq

Operates the current Logseq command-line interface to inspect and edit graph pages, blocks, tasks, tags, and properties. It also runs Datascript queries, shows block trees, and manages graphs and db-worker-node servers.

  • Score 84
  • 46k stars
  • AGPL-3.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install logseq-cli

Built from the published package, never by AI.

git clone --depth 1 https://github.com/logseq/logseq /tmp/logseq && mkdir -p ~/.claude/skills && cp -r /tmp/logseq/.agents/skills/logseq-cli ~/.claude/skills/logseq-cli

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install logseq-cli in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The Logseq CLI skill teaches an AI assistant to operate the current logseq command-line interface. It covers listing, upserting, removing, and searching graph nodes, pages, blocks, tasks, tags, and properties. It also covers running Datascript queries, showing page and block trees, and managing graphs and db-worker-node servers. The skill directs the assistant to check --help and logseq example output instead of relying on long static examples.

The skill sets rules for writes. Multi-item content should become block trees through --blocks or --blocks-file, task state should go through upsert task --status, and tags should be passed as EDN vectors with --update-tags. Tags must exist before they are associated. It is aimed at people and assistants who run logseq commands or interpret their output.

Written from the project's SKILL.md and checked against it.

What it can do

  • Graph inspect and editList, upsert, remove, and search nodes, pages, blocks, tags, properties, and tasks.
  • Datascript queriesRun queries with the query command and list built-in and custom queries.
  • Page and block treesShow the tree structure of pages and blocks with the show command.
  • Graph managementCreate, switch, remove, validate, export, import, and back up graphs.
  • Server managementList, start, stop, restart, and clean up db-worker-node servers.
  • Task commandsCreate and update tasks with upsert task --status, and list tasks.
  • Structured block writesCreate sibling and child blocks from Markdown outlines with --blocks or --blocks-file.
  • Tag associationAdd or remove tags on blocks through explicit --update-tags and --remove-tags options.

What you need

  • Logseq command-line interface (logseq) installed
  • A Logseq graph to target with --graph

Try asking

  • Create a task in today's journal with status done using the Logseq CLI
  • Show the block tree for a Logseq page and summarize its structure
  • Run a Datascript query on my Logseq graph and explain the output

Good to know

  • Tags must already exist before they can be associated with a block.
  • --update-tags expects an EDN vector, not a comma-separated string.
  • show --id and remove block --id do not parse EDN; they accept integers or bracketed lists of integers.
  • Task state should not be placed in block content; use upsert task --status.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .agents/skills/logseq-cli/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md8 KB

Alternatives to logseq-cli

All alternatives →

Compare with agentmemory-config, understand-knowledge or reports

logseq-cli: common questions

How do I tag a Logseq block from the CLI?

Use upsert block with --update-tags and an EDN vector such as '["AI-GENERATED" "CLI"]'. If the tag does not exist, create it first with upsert tag.

What output formats does the Logseq CLI support?

Human output is the default. Use --output json or --output edn for structured results. skill show prints raw Markdown in every output mode.

How do I write a multi-level outline into Logseq with this skill?

Use upsert block with --blocks or --blocks-file and Markdown list indentation for the hierarchy. Use --dry-run in create mode to preview the planned operations.

How do I install logseq-cli?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is logseq-cli free?

The code is published under the AGPL-3.0 licence. The service it connects to may have its own pricing.

Is logseq-cli safe to use?

It scores 84 of 100. Grades: maintenance A, licence C, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to logseq-cli?

Similar skills: agentmemory-config, understand-knowledge, reports, forget.

logseq-cli Install

Add to stack

Loading.