Gabriel Horner
7b07116b41
enhance(cli): improve error messages for unspecified graphs
...
Introduced a breaking change for query and search commands where
graph(s) are specified as options instead of arguments. This
makes local graph usage consistent across all commands.
Also fixed in-app search not working and local query with multiple
graphs not querying from the right db
2025-11-17 17:40:23 -05:00
Gabriel Horner
62deed7e7f
enhance(cli): add api mode for export-edn command
...
Also changes :graph from being a required arg to an option
2025-11-17 15:11:02 -05:00
Gabriel Horner
d7f7dbea1d
fix(cli): fix pluralization of import/export messages
...
also fix export :classes having wrong count
2025-11-06 16:42:46 -05:00
Gabriel Horner
0bc0892b8a
enhance(cli): Add import-edn command
...
Works for both current and local graphs. Addresses CLI and API for
https://discord.com/channels/725182569297215569/1365819617079066744/1365819617079066744
2025-11-06 16:42:46 -05:00
Gabriel Horner
a138a0e973
chore: bump cli to 0.3.0 for release
2025-10-29 16:13:01 -04:00
Gabriel Horner
e3ce613a74
fix: update :block :add op supported args
2025-10-29 14:27:21 -04:00
Gabriel Horner
1ebfd30b50
fix: page refs display uuids instead of text for getPage
2025-10-27 16:30:04 -04:00
Gabriel Horner
dc76a94e01
fix: edit block operation shouldn't require page id
...
Address feedback. This was an implementation detail that added a
needless constraint
2025-10-27 15:41:12 -04:00
Gabriel Horner
20ed5bccfb
Merge branch 'master' into feat/mcp-server
2025-10-22 12:20:54 -04:00
Gabriel Horner
6412179189
fix: add block on new page doesn't add tags
2025-10-20 16:23:46 -04:00
Gabriel Horner
58c520d17f
fix: existing properties failing to be created with a new tag
2025-10-20 15:31:43 -04:00
Gabriel Horner
953e9c18b2
fix: create blocks on new page
...
Also tweak list* tools description so they expand for more cases e.g.
property types for listProperties
2025-10-20 13:33:08 -04:00
Gabriel Horner
9aaf5db25c
enhance(cli): graph args+options can be local files or dirs
...
This affects all cli commands that take graph args.
Also tweaked mcp-server host+port defaults to match the app
2025-10-17 13:18:03 -04:00
Gabriel Horner
0f7532e3c3
enhance: list* tools default to minimal info
...
Provide expand option to provide additional detail
2025-10-16 16:53:16 -04:00
Gabriel Horner
0122425e68
fix: upsert-nodes build in db-worker and transacts w/ new op
...
Ensure full db is available for building import edn.
Transacting w/ new op allows llm changes to be undone
2025-10-16 13:37:29 -04:00
Gabriel Horner
cc054a2850
enhance: dry run option for upsert-nodes
...
Also give an explicit error when incorrectly using mcp with file graphs.
Better than random errors that vary per tool
2025-10-16 10:44:32 -04:00
Gabriel Horner
e5258c0708
chore: remove unused write tools
...
Also revert related changes on api fns
2025-10-16 10:44:32 -04:00
Gabriel Horner
a586fc47fb
enhance: batch update nodes tool
...
This improves and replaces all previous tools. Features include:
* Add pages, blocks to pages, tags and properties
* Tags can set parents and tag properties
* Properties can have type, cardinality and classes set for :node
* Add tags to blocks
* Edit blocks
* api and local tools work
* Thorough tool validation
* When doing these operations, most operations can reference new or existing
entities if they are referenced by uuid
2025-10-16 10:44:32 -04:00
Gabriel Horner
bfcc3590ac
fix: getPage should also return data about page
...
This was causing write tools to fail as llm's usually reach for
getPage over listPages to get a page id. Moved remove-hidden-properties
since it's also used by mcp api responses
2025-10-16 10:44:32 -04:00
Gabriel Horner
d83641b08c
fix: fixes related to getPage tool
...
Fix getPage returning successful when no page found. Also make pageName
arg consistent with other tools. Also fix api server error where
a nil response fails the 500 check
2025-10-16 10:44:32 -04:00
Gabriel Horner
743c3807c1
enhance: API tools to add to page, search blocks and
...
update a block's content. Also fix search not returning usable
uuids in response
2025-10-16 10:44:32 -04:00
Gabriel Horner
a16c89b986
enhance: Add optional mcp server to API server
...
Also switch CLI MCP server to fastify to reuse frontend code.
Also fix DELETE /mcp which was wrong
2025-10-16 10:44:32 -04:00
Gabriel Horner
6c9db3a679
enhance: Add HTTP Streamable mode to MCP server
...
and default to it
2025-10-16 10:44:32 -04:00
Gabriel Horner
70a6f617aa
enhance: add listTags and listProperties to API mcp server
...
by introducing logseq.cli.* for internal API usage.
Also refactor existing api tools to share same implementation as
local tools. This fixes a couple bugs w/ the api tools as get-page
was returning :block.temp/* keys and list-pages were returning uuids under
the id key unlike all other responses
2025-10-16 10:44:32 -04:00
Gabriel Horner
179f08cf90
enhance: list tags and properties for local mcp
2025-10-16 10:44:31 -04:00
Gabriel Horner
f2f799b49b
enhance: mcp server works with local graph
...
when given -g option
2025-10-16 10:44:31 -04:00
Gabriel Horner
96704e9998
enhance: basic mcp server w/ 2 commands
...
works w/ api and starting server from
cmdline for now
2025-10-16 10:44:31 -04:00
Gabriel Horner
27d5a369fd
fix: bump to latest nbb-logseq to fix most logseq.db dependent ns
2025-10-13 21:34:00 -04:00
Gabriel Horner
f93f889f8a
chore: bump to latest nbb w/ datascript update
2025-09-03 10:00:45 -04:00
Gabriel Horner
8ea1edd9e5
fix(cli): Unexpected errors should exit 1
2025-08-27 15:06:41 -04:00
Gabriel Horner
a8e2b173ce
fix(api): unexpected failures in api should 500
...
Previously we were getting 200s which makes handling more complicated
(check status and async response) and was already resulting in buggy
error handling
2025-08-26 15:19:32 -04:00
Gabriel Horner
bf68783348
enhance: add append improvements based on feedback
...
* For append api call, default to today if app is not in a page context
* API relate commands can auth w/ env var
2025-08-26 11:49:02 -04:00
Gabriel Horner
58270ff934
enhance: add append command
...
Fixes https://test.logseq.com/#/page/689ca670-d93f-4fe0-a262-029d95f8450f
2025-08-26 11:27:34 -04:00
Gabriel Horner
4b5a16628a
enhance: add in-depth usage descriptions to more complex commands
2025-08-26 11:27:34 -04:00
Gabriel Horner
610e77bb90
fix: rename api-query-token options to api-server-token
...
api-query-token doesn't make sense as a name as it the token isn't
specific to query. This was an accidental name while working on query
cmd
2025-08-26 11:27:34 -04:00
Gabriel Horner
c0bee994c1
enhance: print usage for required arg errors
2025-08-26 11:27:34 -04:00
Gabriel Horner
ffaccbb33e
enhance: export command can save to file option
...
Also update export-edn command to have same default behavior as
export command. Printing to stdout was ok for dev but is surprising and
possibly overwhelming for most graphs
2025-08-26 11:27:34 -04:00
Gabriel Horner
13d7709b34
chore: dry up usage of same fn across 3 namespaces
2025-08-26 11:27:34 -04:00
Gabriel Horner
0722097df1
enhance: export cmd reuses existing namespaces
2025-08-26 11:27:34 -04:00
Gabriel Horner
6a84e56984
enhance: working spike for export md command
...
export namespaces aren't reused yet. Fixed bug w/ get-block-and-children
not invoking correctly in nbb. Bumped all deps to use latest nbb-logseq
2025-08-26 11:27:34 -04:00
Gabriel Horner
cc1093ac85
enhancement: add offline CLI search and predefined query
...
to address https://github.com/logseq/logseq/pull/12000#issuecomment-3177406045 .
Also bump version for initial release
2025-08-13 10:59:08 -04:00
Gabriel Horner
7c610cfd51
chore: bump cli alpha release
2025-08-11 17:14:50 -04:00
Gabriel Horner
35c2952f6b
fix: commands with required arguments
...
failing w/ confusing stacktraces. Also exit correctly when a nonexistent
graph is given
2025-08-11 17:05:39 -04:00
Gabriel Horner
a6974021ce
chore: add basic help test
...
Also add assertion to guard against previous load time issue
2025-08-11 17:05:39 -04:00
Gabriel Horner
5adc5dcdc6
enhance: entity queries per Tienson's feedback
...
Can use uuid string as shorthand identifier. Can make properties
readable with option. Also wire up local query to use default catch
handler
2025-08-11 17:05:39 -04:00
Gabriel Horner
d5c46433b2
fix: silent failures on commands
...
Also add user friendly error handling when api server isn't turned on
2025-08-11 17:05:39 -04:00
Gabriel Horner
70855ef033
chore: add changelog
...
also fix minor bug silently failing show command for abnormal graphs
2025-08-11 17:05:39 -04:00
Gabriel Horner
bf6433ed7a
chore: update readme
2025-08-11 17:05:39 -04:00
Gabriel Horner
677f5df46b
fix: also print version correctly when installed via npm
2025-08-11 17:05:39 -04:00
Gabriel Horner
637d158478
chore: prep package.json for alpha release
...
confirmed with npm pack that CLI works with files config
2025-08-11 17:05:39 -04:00