feat(cli): turn the front door into a cobra CLI - #6
Merged
Conversation
Running with no subcommand still serves, so the published quickstart (go run github.com/septagon-oss/platformkit@latest) is unchanged. - serve: --addr/--port/--config/--env/--db-dsn/--admin-email/--admin-password flags; precedence defaults → config.yaml → environment → flags - version [--json]: release + API contract version from the build info - modules [--json] / openapi: compose the real app against a throwaway in-memory database — no ./pk.db side effects - config init: commented, fail-closed production config.yaml template that round-trips the strict parser (test-enforced) - new env vars PK_ADMIN_EMAIL / PK_ADMIN_PASSWORD seed the administrator without a config file Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Keeps pk-apps v0.10.0 from the 0.9.0 release, adds cobra, and files the CLI changelog entry under 0.10.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Turns the front door into a small cobra CLI. Running with no subcommand still serves, so the published quickstart (
go run github.com/septagon-oss/platformkit@latest) is unchanged.--addr,-p/--port,-c/--config,--env,--db-dsn,--admin-email,--admin-password; precedence defaults → config.yaml → environment → flags./pk.dbside effectsadmin_passwordships commented out on purpose)PK_ADMIN_EMAIL/PK_ADMIN_PASSWORDseed the administrator without a config fileVerification
make release-checkpasses end to end (fmt, vet, staticcheck, tests, race, 84% coverage vs 40% floor, govulncheck, gosec clean)serve -p 18101answered/healthz200 and shut down cleanly on SIGTERM🤖 Generated with Claude Code