Skip to main content

mr note-blocks rebalance

Rewrite every block's position string on a note to evenly spaced, compact values while preserving the current display order. Use this as a cleanup step after heavy reordering, when fractional positions have grown long (e.g. "aaamzzz"), or when you want a predictable position layout before a batch of reorders. The block IDs, types, content, and state are untouched.

Usage

mr note-blocks rebalance

Examples

Rebalance all block positions on note 42

mr note-blocks rebalance --note-id 42

Rebalance

mr note-blocks rebalance --note-id 42
mr note-blocks list --note-id 42 --json | jq -r '.[] | [.id, .position] | @tsv'

Flags

FlagTypeDefaultDescription
--note-iduint0Note ID (required) (required)

Inherited global flags

FlagTypeDefaultDescription
--jsonboolfalseOutput raw JSON
--no-headerboolfalseOmit table headers
--pageint1Page number for list commands (default page size: 50)
--quietboolfalseOnly output IDs
--serverstringhttp://localhost:8181mahresources server URL (env: MAHRESOURCES_URL)

Exit Codes

0 on success; 1 on any error

See Also