Skip to content

chainabit bit move ​

Published (2.2.0) ​

This command is not included in Published (2.2.0). It is available in Development (2.2.0).

Development (2.2.0) ​

Change a Bit’s parent

Synopsis ​

text
chainabit bit move <id> --parent <id|none> [options]

Arguments ​

ArgumentDescriptionDefault
<id>Required.—

Options ​

OptionDescriptionDefault
--parent <id\|none>Parent Bit ID, or none to move to the top level. Required.—
--revision <n>Last read Bit revision (required for block documents)—

Options shared by every command are described in Global options and shared behavior.

Behavior ​

Moves a Bit under another Bit. --parent is required: pass the ID of the new parent, or none to move the Bit to the top level.

  • Without --revision, the command first reads the Bit's current revision and then moves it only if that revision is still current.
  • With --revision <n>, the move is a single write that succeeds only if the Bit still has that revision.

If the Bit changed in the meantime, the command fails with a revision conflict and does not retry. Read the Bit again with get and repeat the move.

The same command is also available as chainabit bits move.

Output ​

Prints the moved Bit as a list of labelled fields. With --json, the output is the updated Bit record, including parentId (null at the top level) and its new revision.

Authentication and permissions ​

You must be signed in. The service decides whether you may move a given Bit; a refusal is shown as an error and nothing changes.

Examples ​

bash
chainabit bit move 00000000-0000-4000-8000-000000000001 --parent 00000000-0000-4000-8000-000000000002
chainabit bit move 00000000-0000-4000-8000-000000000001 --parent none
chainabit bit move 00000000-0000-4000-8000-000000000001 --parent 00000000-0000-4000-8000-000000000002 --revision 12

Built with purpose. chainabit.com