impl 008-logseq-cli-move-command.md

This commit is contained in:
rcmerci
2026-01-20 17:06:52 +08:00
parent 7c0f14a1d3
commit e697c33167
9 changed files with 360 additions and 25 deletions

View File

@@ -67,6 +67,7 @@ Inspect and edit commands:
- `add block --blocks <edn> [--page <name>] [--parent <uuid>]` - insert blocks via EDN vector
- `add block --blocks-file <path> [--page <name>] [--parent <uuid>]` - insert blocks from an EDN file
- `add page --page <name>` - create a page
- `move --id <id>|--uuid <uuid> --target-id <id>|--target-uuid <uuid>|--page-name <name> [--pos first-child|last-child|sibling]` - move a block and its children (defaults to first-child)
- `remove block --block <uuid>` - remove a block and its children
- `remove page --page <name>` - remove a page and its children
- `search --text <query> [--type page|block|tag|property|all] [--include-content] [--limit <n>]` - search across pages, blocks, tags, and properties
@@ -83,6 +84,7 @@ Subcommands:
list property [options] List properties
add block [options] Add blocks
add page [options] Create page
move [options] Move block
remove block [options] Remove block
remove page [options] Remove page
search [options] Search graph
@@ -116,6 +118,7 @@ node ./static/logseq-cli.js graph create --repo demo
node ./static/logseq-cli.js graph export --type edn --output /tmp/demo.edn --repo demo
node ./static/logseq-cli.js graph import --type edn --input /tmp/demo.edn --repo demo-import
node ./static/logseq-cli.js add block --page TestPage --content "hello world"
node ./static/logseq-cli.js move --uuid <uuid> --page-name TargetPage
node ./static/logseq-cli.js search --text "hello"
node ./static/logseq-cli.js show --page-name TestPage --format json --output json
node ./static/logseq-cli.js server list