docs: update CLI documentation to use username instead of user-id

CLI Changes:
- Update user.get command to accept username parameter instead of user-id
- Update user.update command signature in documentation
- Update user.delete command signature in documentation

Implementation Consistency:
- Align README.md CLI examples with app/cli/commands/user.py implementation
- Clarify username-based user identification across all user management commands
- Update test expectations to match username-based interface

Documentation:
- README.md: Replace <user-id> with <username> in all user command examples
- Ensure consistency across user create, get, update, delete commands
This commit is contained in:
2026-05-12 12:26:06 +00:00
parent 4fa770e771
commit 7bcf5cbb2b
3 changed files with 13 additions and 13 deletions
+3 -3
View File
@@ -829,14 +829,14 @@ def test_cli_user_update_and_delete_flow() -> None:
update_result = runner.invoke(
runner.app,
["user", "update", user.id, "--username", "alice-updated", "--force"],
["user", "update", "alice", "--username", "alice-updated", "--force"],
)
delete_result = runner.invoke(runner.app, ["user", "delete", user.id, "--force"])
delete_result = runner.invoke(runner.app, ["user", "delete", "alice-updated", "--force"])
assert update_result.exit_code == 0
assert "alice-updated" in update_result.stdout
assert delete_result.exit_code == 0
assert f"Deleted user: {user.id}" in delete_result.stdout
assert "Deleted user: alice-updated" in delete_result.stdout
def test_cli_comment_add_and_list() -> None:
repo = FakeRepo(_portfolio())