feat(push): Add hypeman push command for local image upload#11
Conversation
Add new `hypeman push` command that loads images from the local Docker daemon and pushes them to the hypeman server's OCI registry endpoint. Features: - Load images from local Docker daemon - Push to hypeman server at /v2 endpoints - Automatic digest reference conversion for reliable conversion trigger - JWT authentication via HYPEMAN_API_KEY or HYPEMAN_BEARER_TOKEN Usage: hypeman push alpine:latest # Push with original name hypeman push myimage:v1 custom-name # Push with custom target name
Mesa DescriptionSummaryAdds new Features
Usage# Push with original name
hypeman push alpine:latest
# Push with custom target name
hypeman push myimage:v1 custom-nameNew Files
Modified Files
Test Plan
RelatedDescription generated by Mesa. Update settings |
There was a problem hiding this comment.
Performed full review of 9d7cf81...e120ec6
Analysis
-
Authentication Inconsistency: The push command silently allows unauthenticated pushes while other commands (like exec) require HYPEMAN_API_KEY, potentially causing confusing 401/403 errors without clear error messages.
-
Hardcoded Insecure Registry: The implementation uses hardcoded
name.Insecurewhich is inappropriate for production deployments and should be configurable based on URL scheme. -
Limited Error Handling: Server response validation is minimal, potentially obscuring the root cause when pushes fail due to authentication or authorization issues.
-
Missing Progress Feedback: No progress indication is provided for large image uploads, which could lead to poor user experience.
Tip
Help
Slash Commands:
/review- Request a full code review/review latest- Review only changes since the last review/describe- Generate PR description. This will update the PR body or issue comment depending on your configuration/help- Get help with Mesa commands and configuration options
4 files reviewed | 0 comments | Edit Agent Settings • Read Docs
All commands now check HYPEMAN_BASE_URL env var as fallback when --base-url flag is not provided. Precedence: flag > env var > default. This makes it easier to configure the CLI for different environments without passing --base-url on every command.
Summary
Adds new
hypeman pushcommand that loads images from the local Docker daemon and pushes them to the hypeman server's OCI registry.Features
/v2OCI Distribution endpointsHYPEMAN_API_KEYorHYPEMAN_BEARER_TOKENUsage
New Files
pkg/cmd/push.go- Push command implementationModified Files
pkg/cmd/cmd.go- Register push commandgo.mod/go.sum- Add go-containerregistry dependencyTest Plan
hypeman push alpine:latestsuccessfully pushes to local serverRelated