Repository navigation
Introduce the Ceryx CLI - #1
akalipetis wants to merge 3 commits into
Conversation
akalipetis
commented
Nov 10, 2026
- Add Ceryx CLI
- Build and test with docker buildx, add VS Code config
- Add release workflow, install script and install docs
Go CLI for the Ceryx API: list, get, set, patch and delete routes and certificates. JSON on stdout, errors on stderr, exit codes 0/1/2/3 (3 = not found). Defaults to http://localhost:8080; override with --api-url or CERYX_API_URL.
Multi-stage Dockerfile cross-compiles and exports the binary, so only Docker is needed on the host. VS Code tasks and CI use it.
Publishing a release builds macOS and Linux binaries (arm64, amd64) with docker buildx and uploads them as ceryx_<os>_<arch> plus checksums.txt, a naming github.com/marcosnils/bin understands. install.sh downloads the right one for the host. README lists the install script, the latest release, Go and bin.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dfc0e9aff4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if f.Changed("meta") { | ||
| raw, _ := f.GetString("meta") | ||
| var meta map[string]any | ||
| if err := json.Unmarshal([]byte(raw), &meta); err != nil { |
There was a problem hiding this comment.
Preserve integer values when parsing certificate metadata
When --meta contains an integer outside float64's exact range, unmarshalling into map[string]any rounds it before the request is serialized; for example, 9007199254740993 is sent as 9007199254740992. This silently corrupts identifiers, serial numbers, or timestamps stored as metadata, so parse with UseNumber or otherwise preserve the raw JSON number.
Useful? React with 👍 / 👎.
| chmod 755 "$tmp" | ||
|
|
||
| sudo= | ||
| [ -w "$dir" ] || sudo=sudo |
There was a problem hiding this comment.
Check the writable parent before requiring sudo
When INSTALL_DIR does not exist beneath a writable parent—including the documented ~/.local/bin example on a fresh account—[ -w "$dir" ] is always false, so the script unnecessarily invokes sudo. This fails on systems without sudo and otherwise creates the user's local directory as root; create the directory as the current user when its parent is writable before deciding whether escalation is needed.
Useful? React with 👍 / 👎.