Commit Graph

23509 Commits

Author SHA1 Message Date
rcmerci
ec4e31fa4b enhance(cli): update --profile output 2026-03-31 21:41:12 +08:00
rcmerci
57aabd1e56 fix lint 2026-03-31 19:30:55 +08:00
rcmerci
4cedd99255 feat(cli): add 'graph backup' subcmd 2026-03-31 16:08:09 +08:00
Gabriel Horner
8d30cd4a2d fix(cli): upsert property --type on a property
that has property values makes a graph invalid as property values then
have the wrong types for their property pair. This isn't possible in the
UI because the property type change checks for existing data but the
db-worker-node level does not. This :logseq.property/type update bug was
also possible from plugin/API calls
2026-03-30 17:58:56 -04:00
Gabriel Horner
05fdb7d2ad enhance(cli): completion for properties and tags 2026-03-30 14:22:07 -04:00
Gabriel Horner
e086d337b5 fix(cli): upsert property --type fails for json and string
These property types were failing with 'Invalid data' since they weren't
exposed for user properties
2026-03-30 12:45:44 -04:00
Gabriel Horner
86d54ac1ca fix(cli): upsert property many to one fails
with cryptic "Invalid data" instead of helpful
"This property can't change from multiple values to one value because it
has existing data."
2026-03-30 12:00:01 -04:00
Gabriel Horner
ce7042842d fix(cli): create property doesn't validate property title
App doesn't have this issue as property creation ends up going through
update branch. Also improve error message for incorrect tagged nodes.
"does not reference" is too ambiguous and doesn't mention that there's
something wrong with the tags relationship
2026-03-30 10:24:31 -04:00
rcmerci
0d03c428d8 enhance(cli): update skill md 2026-03-30 20:17:51 +08:00
rcmerci
c1a9b3888c enhance(cli): add more examples in example cmd 2026-03-29 22:54:53 +08:00
rcmerci
0a39d9038e enhance(cli): update search cmd hint 2026-03-29 21:20:43 +08:00
rcmerci
1afc0e558c enhance(cli): search cmd use --content option 2026-03-29 20:53:57 +08:00
rcmerci
7da9a60d6e fix(cli): shouldn't include '#' in page-name(2) 2026-03-28 21:29:50 +08:00
rcmerci
7b704741e0 fix(cli): shouldn't include '#' in page-name 2026-03-28 18:10:23 +08:00
Gabriel Horner
ccea0ace90 fix(cli): create page fails with 'page-not-found'
Some page names are modified during creation for internal reasons e.g.
'upsert page --page=foo#bar' results in the page 'fooHashTag-bar'. Use
uuid from create-page operation for more reliable
identification of created pages

Also finish fix for 29a7a77a6b
2026-03-27 14:45:29 -04:00
rcmerci
23daff7dbd enhance(cli): add example subcmd 2026-03-27 23:17:02 +08:00
rcmerci
88d5873176 fix(cli): propagate server error codes and handle invalid query as 400 2026-03-27 20:54:14 +08:00
Gabriel Horner
29a7a77a6b fix: upsert page property options can't handle user properties
Fails with 'unknown built-in' error instead of just handling it.
Also fix an incorrect test teardown from previous commit
2026-03-26 17:33:19 -04:00
Gabriel Horner
8732d947fb fix: cleanly print unexpected errors for option handling
from commands/build-action. For example, if --blocks-file has a
nonexistent file or if --blocks or --blocks-file are invalid EDN we
would print full stacktraces which is confusing for user-facing errors.
Update error handling so that it matches
how other unexpected option failures are handled e.g. `logseq graph
import -t edn -g cli-test2 --input=blah`
2026-03-26 11:08:20 -04:00
Gabriel Horner
301ea87943 fix: read file cli options don't recognize '~'
These paths autocomplete fine and should be usable
2026-03-26 10:33:10 -04:00
rcmerci
59d0e5777b enhance(cli): add search subcmd 2026-03-26 21:57:25 +08:00
rcmerci
a16f0012e9 enhance(cli): add --profile global option 2026-03-26 19:31:17 +08:00
rcmerci
ce2dcfc566 067-logseq-cli-json-namespaced-keys.md 2026-03-26 15:16:14 +08:00
rcmerci
cb68930ec8 066-logseq-cli-list-property-cardinality-column.md 2026-03-26 14:20:03 +08:00
Gabriel Horner
0009e7cc21 enhance(cli): import edn can import into existing graph
This functionality is available in the old cli so making sure it's
available in the new one. Also update messaging so it's clear when a new
graph is created
2026-03-25 17:52:58 -04:00
Gabriel Horner
46ec2187db enhance(dev): unlock-graph option for nbb cli
to allow querying of graph that has been used with new cli
2026-03-25 13:56:53 -04:00
Gabriel Horner
b513b94026 fix: new property and class idents don't have suffix
when created from app or cli. Moving db-worker to node changed the
js/process exist check in db-ident ns. Brought back env var for
straightforward fix. I checked other process checks and this was the
only one affected this way. Also remove double testing for graph-parser as
it hasn't provided any benefit and yet another place where we kept
juggling this env var
2026-03-25 13:54:14 -04:00
Gabriel Horner
105282cb78 fix(cli): silently ignores several validation failures
that only the desktop app sees. Ignoring validation errors than causes
further errors as the cli doesn't see updates and doesn't understand the
validation constraints it faces. For example, updating a block with a
private tag e.g. `logseq upsert block --id=219
--update-tags='["Journal"]'` should fail with an explicit message
instead of pretending to succeed
2026-03-24 15:02:53 -04:00
rcmerci
8c93d3c9da enhance(cli): add --ref-id-footer in show cmd 2026-03-24 21:38:02 +08:00
Gabriel Horner
a7bf7fc6ef fix(cli): show cmd 500s with :datetime properties
Crashed with datascript lookup errors like "Highest supported entity id is
2147483647, got 1774299180000". Also add display support for :datetime
properties
2026-03-24 08:51:50 -04:00
rcmerci
bad48702e8 enhance(cli-e2e): update spec :cmd -> :cmds 2026-03-24 16:40:32 +08:00
Gabriel Horner
4263123e83 fix: nonexistent string :date property value silently passes
and doesn't set anything. Now it errors clearly.
Also improve property validation for --{update/remove}-properties to
include property name
2026-03-23 16:09:38 -04:00
Gabriel Horner
26ac7f5aa5 enhance: improve error handling for create/update only upsert options
so they aren't used incorrectly in the wrong mode. Also update help
so all create/update only options are clearly labeled and remove
unused code for remove options
2026-03-23 14:38:58 -04:00
Gabriel Horner
2a8e500a8c fix: invalid :default property value incorrectly passes
but displays warning in the app. For example --update-properties='{"p1"
4}, pretends to pass but is invalid for a :default p1 property. Also
fixes other :default property values incorrectly being passed e.g.
boolean. Also improve reporting of http-request failures as not
including response body gave user no idea why certain property values like
keywords failed
2026-03-23 11:09:25 -04:00
Gabriel Horner
8961286006 fix: upsert with invalid EDN for tags and properties optiosn gives incorrect
error - "target or update/remove options"
2026-03-23 09:39:14 -04:00
rcmerci
d88ae59990 enhance(cli-e2e): add bb cleanup 2026-03-22 17:49:45 +08:00
rcmerci
1010341f56 enhance(cli-e2e): use 'bash -c' instead of 'bash -lc' 2026-03-22 16:51:30 +08:00
rcmerci
791b3e98f7 fix(cli): found by case block-upsert-update-id-custom-many-property-json 2026-03-22 16:09:53 +08:00
rcmerci
c5995a6652 test(cli-e2e): block-upsert-update-id-custom-many-property-json 2026-03-22 16:00:49 +08:00
rcmerci
31234caef7 update cli-e2e/agents.md 2026-03-21 18:29:46 +08:00
rcmerci
90c81f196d enhance(cli-e2e): add progress reporting and -h/--help to test runner 2026-03-21 17:24:45 +08:00
Gabriel Horner
031c2b705d enhance(dev): Add --verbose to cli E2E
Also add tests to nearest workflow
2026-03-20 16:22:29 -04:00
rcmerci
ca4cb121e3 fix test 2026-03-20 16:54:19 +08:00
rcmerci
2cc0735e3a enhance(cli): migrate non-sync integration coverage to cli-e2e shell suite 2026-03-20 16:34:54 +08:00
Gabriel Horner
721225ba00 fix: upsert --update-tags|remove-tags NON-TAG silently passes
even though no tag is added. Should error instead. Also improve
nonexistent tag error to include name and improve wording
on two upsert options
2026-03-19 19:24:57 -04:00
Gabriel Horner
029194e6f6 fix: undo + redo and possibly more in desktop
Electron app wasn't setting up transact fn like browser does
2026-03-19 15:39:25 -04:00
Gabriel Horner
a7469bcd36 fix: search not starting or working
Per Claude this may have been triggered by adbaf10abc
2026-03-19 14:08:48 -04:00
Gabriel Horner
bb7f3b9dde enhance: sort cli options alphabetically 2026-03-19 13:38:14 -04:00
Gabriel Horner
317d3b583c fix: invalid target-uuid option gives wrong error
about unknown command. Source of bug was that uuid options
are being validated downstream and can throw codes that aren't
recognized later. This is needless complexity so fix by validating
the option at cmdline parse time. Also change this for all
other uuid options to simplify them. Also tweaked cli.main which
swallowed daemon error codes instead of reporting them
2026-03-19 12:17:32 -04:00
rcmerci
23e42c77f6 063-logseq-cli-upsert-block-custom-many-property.md 2026-03-19 16:36:11 +08:00