Skip to content

Commit b9764d9

Browse files
overdue db-version update
1 parent de65c75 commit b9764d9

2 files changed

Lines changed: 97 additions & 7 deletions

File tree

db-version-changes.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ High level changes:
4040
* Markdown syntax for blocks e.g. a heading or quote is no longer visible or editable. Removing a block's heading is done by right-click on a block and choosing the crossed out H icon.
4141
* Slides have been removed as a feature and we can support it as 3rd party plugin.
4242
* Excalidraw e.g. `/draw` is no longer a built-in feature and will hopefully be moved to a plugin.
43+
* Templates are created by tagging a block with `#Template` as described [here](./db-version.md#templates). Previously templates were made by adding a `template` property or through a menu item `Make a template`.
4344

4445
WIP changes:
4546
* RTC a.k.a. DB version sync will be enabled later.
@@ -75,6 +76,7 @@ Miscelleanous changes:
7576
* Assets can have custom user properties.
7677
* Assets are blocks and thus can show their linked references when zoomed in on the asset block.
7778
* Assets are resized by hovering over them and then dragging the left-right arrows that are visible over the scrollbars.
79+
* Maximum allowed asset size is 100M
7880
* Pdf annotations are visible under an asset block by default. Previously this view was in a separate page and required clicking in the pdf viewer.
7981

8082
#### Queries
@@ -94,9 +96,14 @@ Miscelleanous changes:
9496
* [Advanced queries](https://docs.logseq.com/#/page/advanced%20queries)
9597
* Advanced queries are now edited in a code block which means queries are syntax highlighted.
9698
* Some old advanced queries will no longer work and need to be rewritten. For engineers, compare the [db graph `schema`](https://github.com/logseq/logseq/blob/master/deps/db/src/logseq/db/frontend/schema.cljs) vs the [file graph `schema`](https://github.com/logseq/logseq/blob/master/deps/db/src/logseq/db/file_based/schema.cljs).
97-
* The attribute `:block/content` was renamed to `:block/title`. If used in an advanced query including in config.edn's `:default-queries`, change it to use `:block/title` e.g. `[?b :block/content "content"]` -> `[?b :block/title "content"]`
9899
* The task related properties `:block/marker`, `:block/priority`, `:block/deadline` and `:block/scheduled` have been respectively renamed to `:logseq.property/status`, `:logseq.property/priority`, `:logseq.property/deadline` and `:logseq.property/scheduled`. These properties should be queried via rules like `property` e.g. `(property :logseq.property/deadline ...)`.
99100
* These advanced query options are deprecated: :title, :group-by-page? and :collapsed?.
101+
* Attribute changes:
102+
* The attribute `:block/content` was renamed to `:block/title`. If used in an advanced query including in config.edn's `:default-queries`, change it to use `:block/title` e.g. `[?b :block/content "content"]` -> `[?b :block/title "content"]`
103+
* The attribute `:block/original-name` was renamed to `:block/title`. If used in an advanced query including in config.edn's `:default-queries`, change it to use `:block/title` e.g. `[?b :block/original-name "name"]` -> `[?b :block/title "name"]`
104+
* The attribute `:block/journal?` no longer exists. If used in an advanced query including in config.edn's `:default-queries`, change `[?p :block/journal? true]` to `[?p :blocks/tags :logseq.class/Journal]`
105+
* The attribute `:block/left` no longer exists and has been replaced by `:block/order`. It is not recommended to write queries with this attribute.
106+
* The attribute `:block/path-refs` no longer exists. Please use `(has-ref ?b ?ref)` instead of `[?b :block/path-refs ?ref]`.
100107
* Since block timestamps are available, they display in table view where possible.
101108

102109
#### Namespaces
@@ -137,3 +144,4 @@ Miscelleanous changes:
137144
* The attribute `:block/original-name` was renamed to `:block/title`. If used in an advanced query including in config.edn's `:default-queries`, change it to use `:block/title` e.g. `[?b :block/original-name "name"]` -> `[?b :block/title "name"]`
138145
* The attribute `:block/journal?` no longer exists. If used in an advanced query including in config.edn's `:default-queries`, change it to use `:block/type` e.g. `[?p :block/journal? true]` -> `[?p :block/type "journal"]`
139146
* The attribute `:block/left` no longer exists and has been replaced by `:block/order`. It is not recommended to write queries with this attribute.
147+
* The attribute `:block/path-refs` no longer exists. Please use `(has-ref ?b ?ref)` instead of `[?b :block/path-refs ?ref]`.

db-version.md

Lines changed: 88 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Description
22

3-
This page describes DB (database) graph functionality as of Aug 29th. See [here](https://test.logseq.com/#/) to try the latest stable version. If you're an existing user of Logseq, you'll be interested in [changes with the db version](./db-version-changes.md).
3+
This page describes DB (database) graph functionality as of Dec 19th, 2025. See [here](https://test.logseq.com/#/) to try the latest stable version. If you're an existing user of Logseq, you'll be interested in [changes with the db version](./db-version-changes.md).
44

55
NOTE: While there is an [automated backup](#automated-backup) for DB graphs, we recommend only using DB graphs for testing purposes.
66

@@ -23,12 +23,17 @@ NOTE: While there is an [automated backup](#automated-backup) for DB graphs, we
2323
* [Library](#library)
2424
* [Search Commands](#search-commands)
2525
* [Semantic Search](#semantic-search)
26+
* [MCP Server](#mcp-server)
27+
* [Sync](#sync)
28+
* [Plugins](#plugins)
2629
* [DB Graph Importer](#db-graph-importer)
2730
* [Automated Backup](#automated-backup)
2831
* [Export and Import](#export-and-import)
2932
* [Graph Export](#graph-export)
3033
* [Graph Import](#graph-import)
3134
* [EDN Data Export](#edn-data-export)
35+
* [iOS App](#ios-app)
36+
* [Android App](#android-app)
3237
* [Scripting](#scripting)
3338
* [CLI](#cli)
3439
* [Additional Links](#additional-links)
@@ -303,7 +308,12 @@ You can rate them using 4 levels to arrange their next review date.
303308

304309
### Assets
305310

306-
An asset has the new tag `#Asset`. Assets are created by dragging and dropping a file onto a block. They can also be batch uploaded by going to the `#Asset` page and clicking the `+` icon from the `Tagged Nodes` table. Asset files are stored under a graph's `assets/` directory. Manage assets from the `#Asset` page's `Tagged Nodes` section. The `Gallery View` is a helpful way to view assets.
311+
An asset has the new tag `#Asset`. Create an asset in the following ways:
312+
* Drag and drop a file onto a block.
313+
* Upload a file by going to the `#Asset` page and clicking on the `+ New` icon under the `Tagged Nodes` table.
314+
* Create from an external file by creating an image link in a block e.g. `![test](https://logseq.com/logo-with-border.a30e7bd0.png)`, clicking on it and then highlighting it. You'll be prompted to create an asset from the external one. This works for urls as well as local file paths e.g. `/Users/user/...`.
315+
316+
Asset files are stored under a graph's `assets/` directory. Manage assets from the `#Asset` page's `Tagged Nodes` section. The `Gallery View` is a helpful way to view assets.
307317

308318
### Templates
309319

@@ -394,6 +404,52 @@ Search commands run commands from the [Search modal](https://docs.logseq.com/#/p
394404

395405
[Search](https://docs.logseq.com/#/page/search) can optionally do a semantic search. To enable this, go to `Settings > AI` and choose a _local_ AI model. This feature is available on browsers that are [WebGPU capable](https://caniuse.com/webgpu) and the desktop.
396406

407+
## MCP Server
408+
409+
There is an optional [MCP](https://modelcontextprotocol.io/docs/getting-started/intro) server to allow AI applications to connect to a graph. An MCP server can run from the desktop app against the current graph or from the [cli](#cli) against a local or current graph. To configure the server on desktop:
410+
411+
1. Go to `Settings > AI` and enable the `MCP Server` switch.
412+
2. Then create an authorization token to your [HTTP Server](https://docs.logseq.com/#/page/local%20http%20server) for MCP requests and start the HTTP server.
413+
3. Configure a Local LLM that supports the [Streamable HTTP](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#streamable-http) mode:
414+
* [Gemini](https://gemini.google.com/) can be used on a free tier with a google account. Add the server with the gemini cli: `gemini mcp add logseq-http http://127.0.0.1:12315/mcp --transport http --header "Authorization: Bearer TOKEN"` where `TOKEN` is your server's auth token.
415+
* [LM Studio](https://lmstudio.ai/) can be used locally for free. Add a MCP server [as documented](https://lmstudio.ai/docs/app/plugins/mcp) and use http://127.0.0.1:12315/mcp for the url and for the Authorization header use `Bearer TOKEN` where `TOKEN` is your server's auth token.
416+
417+
NOTE: When running from the cli, you can skip step 1.
418+
419+
The MCP Server supports the following features:
420+
421+
* All creates and edits support one or many nodes as the MCP server can batch creates and edits in one invocation.
422+
* All creates and edits have a pretend option e.g. "pretend add page X with y blocks". This is useful for seeing how many changes would occur.
423+
* All changes to a current graph are undo/redo-able e.g. `Cmd-Z` in the app.
424+
* Search any node e.g. cmd-k.
425+
* Create and list pages.
426+
* Create and list tags. When creating tags, their properties and parent can be specified
427+
* Create and list properties. When creating properties, their type, cardinality and tags (for node type) can be specified
428+
* Add blocks to a page or edit them. When adding, tags can be specified. When editing, only block titles are supported.
429+
* All references to tags, properties or pages can handle new ones or reference existing ones.
430+
* Creation of pages, tags and properties runs the same app validations to prevent invalid data.
431+
432+
The following are TODOs for the MCP server:
433+
* Edit pages, tags and properties
434+
* Read and write properties that are associated with any node type
435+
* Read and write block children. This includes listing blocks beyond the top-level in a page.
436+
* Anything related to namespaces or property values
437+
438+
## Sync
439+
440+
NOTE: This feature is a paid feature that is currently _invite only_.
441+
442+
Logseq Sync syncs DB graphs between devices. It is also referred to as RTC (Real Time Collaboration) since this sync supports collaboration between users in real time like Google Docs! Some workflows that are specific to Sync:
443+
444+
* To create a synced DB graph:
445+
* On a desktop or browser client, do a one-time setup of setting up an encryption password. Go to `Settings > Encryption` and follow the instructions.
446+
* Click on the left sidebar graph name to open a menu and choose the `Create db graph` menu item.
447+
* Check 'Use Logseq Sync?'
448+
449+
## Plugins
450+
451+
The [JS Plugin SDK](https://logseq.github.io/plugins/) adds support for DB graphs, including DB-graph specific methods. There is also a CLJS SDK. See https://github.com/logseq/cljs-plugin-example for an example plugin using the CLJS SDK.
452+
397453
## DB Graph Importer
398454

399455
The DB Graph Importer converts a file graph to a DB graph. An overview of what it does:
@@ -410,6 +466,7 @@ The DB Graph Importer converts a file graph to a DB graph. An overview of what i
410466
* Tags associated with a page are associated to that page with a `Page Tags` property.
411467
* Tags are removed from their blocks when the `Remove inline tags` checkbox is checked. This matches the behavior of the DB version.
412468
* Property types are automatically detected for Number, Date, Checkbox, Url, Node and Text. If a property value has two conflicting but compatible types like Number and Text, it will choose the more lenient Text type.
469+
* Assets are copied and renamed to unique uuids. Zotero pdfs are imported, if the importer is run on desktop.
413470

414471
### Convert File Graph to DB graph
415472

@@ -473,7 +530,7 @@ Exported [EDN data](https://github.com/edn-format/edn) allows any DB graph conte
473530
* `Export block EDN data` - Run this command on the current block to copy it to the clipboard. When this data is imported, it will overwrite the current block.
474531
* `Export page EDN data` - Run this command on the current page to copy it to the clipboard. When this is imported to an existing page, it will append to the existing page.
475532
* `Export graph's tags and properties EDN data` - Run this command to copy the entire graph's tags and properties. This is useful for sharing your workflows with others without sharing your graph-specific data. This is an example of a workflow that was not possible with file graphs.
476-
* `Import EDN data` - Run this command to import any of the above exported data. If importing a block, you must have focus on the block you want to import into.
533+
* `Import EDN data` - Run this command to import any of the above exported data. If importing a block, you must have focus on the block you want to import into. If you do not want the import after seeing it, press `Cmd-Z` to undo it.
477534

478535
This feature is also available:
479536
* for the whole graph using the `Export EDN file` and `EDN to DB graph` options described above.
@@ -482,6 +539,28 @@ This feature is also available:
482539

483540
For developers, this shareable EDN data can also be used in scripts to create or modify existing graphs. For example, a page's data could be passed to [this script](https://github.com/logseq/logseq/blob/master/deps/db/script/create_graph.cljs) to create a new DB graph with that page.
484541

542+
## iOS App
543+
544+
NOTE: This is _invite only_ for now.
545+
546+
The new iOS App works on the latest iOS versions and should work on both iPhones and iPads. The app has native UI components and provides a mobile-first outliner experience. While it doesn't have all the features of the desktop app, it adds mobile-specific features. Here is an overview of high level navigation and features:
547+
548+
* There are five tabs: Home, Graphs, Capture, Go To and Search. There is also a datepicker in the upper left for easy journal navigation and a three dots menu in the upper right with tab-specific actions.
549+
* The outliner is available in all tabs except for `Graphs`.
550+
* In `Home`, see a default Journals view. Click on the three dots menu for more info about your app.
551+
* In `Graphs`, manage local, personal remote and shared remote graphs. Click on the the three dots menu for additional actions like `Import`.
552+
* In `Capture`, view and create new blocks. Click on the upper left audio button to capture a voice recording. Click on the upper right icon to send the captured blocks to today's journal.
553+
* In `Go To`, view favorited and recent nodes.
554+
* In `Search`, search nodes like you would with `Cmd-K` search in the desktop app.
555+
* External apps can send text to Logseq via their `Share` button. This quick capture will insert block into today's journal.
556+
* Outliner:
557+
* When editing a block, there is a block action bar that pops up at the bottom. The block action bar has buttons for several actions including ones to create a task, insert/create a photo, create a voice recording and open the `/` commands menu.
558+
* Collapse blocks by clicking on arrows on the right.
559+
560+
## Android App
561+
562+
There is a new Android app that has native UI components. This has not been opened up for alpha testing yet.
563+
485564
## Scripting
486565

487566
DB graphs are scriptable using https://github.com/logseq/nbb-logseq. Scripts can both read and _write any_ data in a DB graph. See https://github.com/logseq/nbb-logseq#database-version to get started.
@@ -496,15 +575,18 @@ On desktop, it is easy to modify an existing DB graph with a script and see the
496575

497576
## CLI
498577

499-
The `logseq` [CLI](https://en.wikipedia.org/wiki/Command-line_interface) provides commands to interact with desktop DB graphs from the command line. The CLI works independent of the Logseq app and makes Logseq features available for automation on CI/CD platforms like [Github Actions](https://github.com/features/actions). For example, a DB graph could have a Markdown export created on every push to Github. Some CLI commands also interact with the current DB graph if the [HTTP API Server](https://docs.logseq.com/#/page/local%20http%20server) is turned on. The CLI provides the following commands including:
578+
The `logseq` [CLI](https://en.wikipedia.org/wiki/Command-line_interface) provides commands to interact with desktop DB graphs and local graphs from the command line. The CLI works independent of the Logseq app and makes Logseq features available for automation on CI/CD platforms like [Github Actions](https://github.com/features/actions). For example, a DB graph could have a Markdown export created on every push to Github. Some CLI commands also interact with the current DB graph if the [HTTP API Server](https://docs.logseq.com/#/page/local%20http%20server) is turned on. The CLI provides the following commands including:
500579

501-
* list - List graphs
580+
* list - List local graphs
502581
* show - Show DB graph(s) info
503582
* search - Search DB graph like grep
504-
* query - Query DB graph
583+
* query - Query DB graph(s)
505584
* export - Export DB graph as Markdown
506585
* export-edn - Export DB graph as EDN
586+
* import-edn Import into DB graph with EDN
507587
* append - Append text to current page
588+
* mcp-server - Run a MCP server
589+
* validate - Validate DB graph
508590

509591
Read the [CLI's homepage](https://www.npmjs.com/package/@logseq/cli) to learn more.
510592

0 commit comments

Comments
 (0)