feat: add group management commands

Implemented roadmap #5: Group management commands with full CRUD.

Features:
- group create <name> [members] - Create new group with optional initial members
- group get <uuid> - Display group details (uuid, name_hash, members, timestamps)
- group update <uuid> <members> - Replace entire member list
- group delete <uuid> - Delete group
- group add-member <uuid> <user-uuid> - Add single member (incremental)
- group remove-member <uuid> <user-uuid> - Remove single member (incremental)

The add-member and remove-member commands fetch current members, modify the list,
and update atomically - providing a better UX than replacing the entire list.

Backend API endpoints used:
- POST /api/groups - Create group
- GET /api/groups/{uuid} - Get group details
- PUT /api/groups/{uuid} - Update members
- DELETE /api/groups/{uuid} - Delete group

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-05 23:50:27 +03:00
parent 39a1d4482a
commit 33201227ca
4 changed files with 329 additions and 0 deletions

View File

@@ -119,6 +119,14 @@ var completer = readline.NewPrefixCompleter(
readline.PcItem("get"),
readline.PcItem("create"),
),
readline.PcItem("group",
readline.PcItem("create"),
readline.PcItem("get"),
readline.PcItem("update"),
readline.PcItem("delete"),
readline.PcItem("add-member"),
readline.PcItem("remove-member"),
),
readline.PcItem("help"),
readline.PcItem("exit"),
readline.PcItem("quit"),