feat(tpagectl): implement site command group #546

Merged
fuzzy merged 3 commits from feat/cli-site into main 2026-08-05 08:02:57 +00:00
Owner

What

Adds the site command group to tpagectl, starting Phase 2 site management.

  • New internal/tpagectl/site package with a site parent command registering five subcommands: create, list, get, delete, and update.
  • Each subcommand renders full --help/usage documentation describing its intended flags (e.g. create accepts --name, --owner, --visibility [public|limited|private], optional --domain, --preview-enabled; get/delete/update take a site name; list supports --format, --filter).
  • Subcommand actions return a clear not implemented yet error; real logic lands with their own roadmap issues (#171, #176, #182, #187, #192).
  • Root command registers the site group.

Why

Phase 2 roadmap task #164. Establishes the site command scaffolding so subcommand implementation issues can land as focused PRs with clean diffs (one file per subcommand).

Testing

  • Unit tests: parent has the 5 expected subcommands; each has non-empty usage/description; stub invocation returns errNotImplemented
  • Wiring tests: root help lists site; site --help lists all subcommands; individual subcommand help renders
  • go test -race ./... passes
  • golangci-lint run clean
  • pre-commit hooks pass (gofmt, go mod tidy, go test)

Breaking Changes

None.

Notes

Subcommand stubs intentionally do not consume the HTTP client yet — each will when its own issue implements it.

Closes #162
Closes #163
Closes #164

## What Adds the `site` command group to tpagectl, starting Phase 2 site management. - New `internal/tpagectl/site` package with a `site` parent command registering five subcommands: `create`, `list`, `get`, `delete`, and `update`. - Each subcommand renders full `--help`/usage documentation describing its intended flags (e.g. `create` accepts `--name`, `--owner`, `--visibility` [public|limited|private], optional `--domain`, `--preview-enabled`; `get`/`delete`/`update` take a site name; `list` supports `--format`, `--filter`). - Subcommand actions return a clear `not implemented yet` error; real logic lands with their own roadmap issues (#171, #176, #182, #187, #192). - Root command registers the `site` group. ## Why Phase 2 roadmap task #164. Establishes the site command scaffolding so subcommand implementation issues can land as focused PRs with clean diffs (one file per subcommand). ## Testing - [x] Unit tests: parent has the 5 expected subcommands; each has non-empty usage/description; stub invocation returns `errNotImplemented` - [x] Wiring tests: root help lists `site`; `site --help` lists all subcommands; individual subcommand help renders - [x] `go test -race ./...` passes - [x] `golangci-lint run` clean - [x] pre-commit hooks pass (gofmt, go mod tidy, go test) ## Breaking Changes None. ## Notes Subcommand stubs intentionally do not consume the HTTP client yet — each will when its own issue implements it. Closes #162 Closes #163 Closes #164
Add the tpagectl site command group with create, list, get, delete, and
update subcommands. Each subcommand renders help documenting its intended
flags and returns a not-implemented error until its own roadmap issue
lands.
Wire the site command group into the tpagectl root command and cover
root and subcommand help rendering with tests.
docs(roadmap): mark site command group complete
All checks were successful
Test and Release / lint (pull_request) Successful in 4m28s
Test and Release / test (pull_request) Successful in 23m51s
5634f26c14
Record completion of the tpagectl site command group scaffold and its
help documentation.

closes #162
closes #163
closes #164
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-08-05 07:42:01 +00:00
the.auditor left a comment

Summary

Site command group scaffolding for tpagectl. Verified: go test -race ./... passes (including new internal/tpagectl/site) and golangci-lint run ./... is clean. Closes #162-164.

No blocking issues.

Suggestions (filed as issues)

  1. internal/tpagectl/site/create.go, delete.go, list.go – help text references flags/behaviors not yet wired (--name/--owner/--visibility/--domain/--preview-enabled, --force, --format/--filter); users invoking them get "flag provided but not defined". Consider placeholder flags or softened descriptions until #165-170 land. Filed as #547

Praise

  • Clean one-file-per-subcommand layout; good package doc comment
  • Sentinel errNotImplemented with errors.Is is the right stub pattern
  • Meaningful tests: subcommand presence, help rendering, stub error propagation
  • Consistent aliases (sites, rm) and ArgsUsage
## Summary Site command group scaffolding for tpagectl. Verified: `go test -race ./...` passes (including new `internal/tpagectl/site`) and `golangci-lint run ./...` is clean. Closes #162-164. No blocking issues. ## Suggestions (filed as issues) 1. `internal/tpagectl/site/create.go`, `delete.go`, `list.go` – help text references flags/behaviors not yet wired (`--name/--owner/--visibility/--domain/--preview-enabled`, `--force`, `--format/--filter`); users invoking them get "flag provided but not defined". Consider placeholder flags or softened descriptions until #165-170 land. Filed as #547 ## Praise - Clean one-file-per-subcommand layout; good package doc comment - Sentinel `errNotImplemented` with `errors.Is` is the right stub pattern - Meaningful tests: subcommand presence, help rendering, stub error propagation - Consistent aliases (`sites`, `rm`) and `ArgsUsage`
fuzzy merged commit 5634f26c14 into main 2026-08-05 08:02:57 +00:00
fuzzy deleted branch feat/cli-site 2026-08-05 08:02:57 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/thwap-pagesd!546
No description provided.