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
Gabriel Horner
8beb52e213
fix: bump to latest nbb-logseq to fix quirky datascript require
2025-08-11 17:05:39 -04:00
Gabriel Horner
3ae3ff2cd4
fix: CLI start time
...
Lazy load namespaces as start time goes up with more required namespaces
external to nbb-logseq or node. CLI now only loads ~6 namespaces instead
of 55 namespaces at start and then lazy loads a command ns as needed
2025-08-11 17:05:39 -04:00
Gabriel Horner
b135b9c880
enhance(dev): task to vendor nbb deps for release
2025-08-11 17:05:39 -04:00
Gabriel Horner
9c6b7a2a6d
fix: correct api calls
...
Also update cli install instructions
2025-08-11 17:05:39 -04:00
Gabriel Horner
a60b1177d2
Add readme and confirm logseq installs as a local CLI
2025-08-11 17:05:39 -04:00
Gabriel Horner
c67e254b4a
enhance: search cmd highlights search term and
...
allows for user specified limit of results.
Also enabled nbb-logseq tests for cli since first
test was introduced
2025-08-11 17:05:39 -04:00
Gabriel Horner
81b3c65d6a
enhance: add api-based search cmd
...
Also add error handler for required option since
search cmd has one
2025-08-11 17:05:39 -04:00
Gabriel Horner
a0912b5fd9
fix: api query should return same as default query
...
Print as edn and unwrap nested datalog results
2025-08-11 17:05:39 -04:00
Gabriel Horner
fd0f54b9f9
enhance: query can optionally use api
2025-08-11 17:05:39 -04:00
Gabriel Horner
0dfcd64d2d
enhance: help cmd prints args and options usage
2025-08-11 17:05:39 -04:00
Gabriel Horner
465dceae17
enhance: add export edn command
...
Also DRY up graph-dir related fns
2025-08-11 17:05:39 -04:00
Gabriel Horner
0ecc41e19e
enhance: unexpected failures print more helpful stack and context
2025-08-11 17:05:39 -04:00
Gabriel Horner
cf02369a20
enhance: query DB graph(s)
2025-08-11 17:05:39 -04:00
Gabriel Horner
6f1d6bd437
chore: add clj-kondo config
2025-08-11 17:05:39 -04:00
Gabriel Horner
a64bea57c8
enhance: add --version
...
Also print global options in help and error if db version not installed
2025-08-11 17:05:39 -04:00
Gabriel Horner
f86a7558c8
chore: add workflow for cli linters
2025-08-11 17:05:39 -04:00
Gabriel Horner
1b1a4e5004
enhance: show can display multiple graphs
...
Also git-sha may not be present on older graphs
2025-08-11 17:05:39 -04:00
Gabriel Horner
38c6c99faa
enhance: show graph cmd
2025-08-11 17:05:39 -04:00
Gabriel Horner
241c1c104e
refactor: have one fn to fetch ~/logseq/graphs dir
...
Also add deps.edn to cli dep which is needed for reuse with frontend
2025-08-11 17:05:39 -04:00
Gabriel Horner
887d91d2ac
enhance: start CLI dep and implement list command
...
Also move common db graph list to shared ns and move common prefix
constants to common-config
2025-08-11 17:05:39 -04:00