hardis:project:action:reorder
Description
Command Behavior
Reorders deployment actions in the project configuration.
Supports two modes:
- Single move: Move one action to a new position using
--action-idand--position. - Full reorder: Provide the complete ordered list of action IDs using
--orderto rearrange all actions in a single call.
Agent Mode
Supports non-interactive execution with --agent:
# Single move
sf hardis:project:action:reorder --agent --scope branch --when pre-deploy --action-id <uuid> --position 1
# Full reorder
sf hardis:project:action:reorder --agent --scope branch --when pre-deploy --order "id1,id2,id3"
Required in agent mode:
--scope,--when- Either
--action-id+--position, or--order
Technical explanations
- For single move: removes the action from its current position and inserts at the new position (1-based, clamped to valid range).
- For full reorder: validates that the provided IDs match exactly the existing action IDs, then reorders.
Parameters
| Name | Type | Description | Default | Required | Options |
|---|---|---|---|---|---|
| action-id | option | ID of the action to move (single move mode) | |||
| agent | boolean | Run in non-interactive mode for agents and automation | |||
| branch | option | Target branch name (for branch scope, defaults to current branch) | |||
| debug -d |
boolean | Activate debug mode (more logs) | |||
| flags-dir | option | undefined | |||
| json | boolean | Format output as json. | |||
| order | option | Comma-separated list of all action IDs in desired order (full reorder mode) | |||
| position | option | New 1-based position for the action (single move mode) | |||
| pr-id | option | Pull request ID (for pr scope, defaults to draft) | |||
| scope | option | Configuration scope: project, branch, or pr | project branch pr |
||
| websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration | |||
| when | option | When to run the action: pre-deploy or post-deploy | pre-deploy post-deploy |
Examples
$ sf hardis:project:action:reorder
$ sf hardis:project:action:reorder --agent --scope branch --when pre-deploy --action-id abc-123 --position 1
$ sf hardis:project:action:reorder --agent --scope branch --when pre-deploy --order "id1,id2,id3"