Behavior
wk folders update <id> --name <new> can rename a folder or project, but there's
no way to move a folder to a different parent. internal/commands/folder.go
only registers a --name flag, and folderService.Update() in
internal/api/folders.go only ever sends {"name": name} to PUT /folders/{id}.
Verified against the live API
PUT /folders/{id} accepts a parent_id field and actually performs the move:
curl -X PUT .../api/folders/32091444 -d '{"parent_id": 32091445}'
→ {"id":32091444,...,"parent_id":32091445,...} # 200, applied
Confirmed with wk folders list --parent <new-parent> showing the folder
correctly nested afterward, and a recipe inside it (folder_id unchanged)
transitively moved along with its containing folder.
So this is the exact same endpoint wk already calls for rename. The client
just never sends the second field.
Fix
Adding wk folders move <id> --parent <id> as its own command, mirroring
wk recipes move (a separate explicit opt-in from update, same reasoning:
update shouldn't relocate something as a side effect). Already implemented
and tested locally, PR incoming.
Behavior
wk folders update <id> --name <new>can rename a folder or project, but there'sno way to move a folder to a different parent.
internal/commands/folder.goonly registers a
--nameflag, andfolderService.Update()ininternal/api/folders.goonly ever sends{"name": name}toPUT /folders/{id}.Verified against the live API
PUT /folders/{id}accepts aparent_idfield and actually performs the move:Confirmed with
wk folders list --parent <new-parent>showing the foldercorrectly nested afterward, and a recipe inside it (folder_id unchanged)
transitively moved along with its containing folder.
So this is the exact same endpoint wk already calls for rename. The client
just never sends the second field.
Fix
Adding
wk folders move <id> --parent <id>as its own command, mirroringwk recipes move(a separate explicit opt-in fromupdate, same reasoning:updateshouldn't relocate something as a side effect). Already implementedand tested locally, PR incoming.