Skip to content

feat(wtmcpctl): implement check command (#55)#67

Open
decko wants to merge 2 commits into
mainfrom
soda/55
Open

feat(wtmcpctl): implement check command (#55)#67
decko wants to merge 2 commits into
mainfrom
soda/55

Conversation

@decko
Copy link
Copy Markdown
Collaborator

@decko decko commented May 20, 2026

Summary

Implements the wtmcpctl check command (ticket #55).

Changes

  • Added cmd/wtmcpctl/check.go: new check subcommand that produces a diagnostic report, mirroring the runCheck() logic from cmd/wtmcp/main.go with intentional omissions:
    • No sandbox.Built() — server-specific concern not applicable to wtmcpctl
    • No readOnly flag — server-specific concern
  • Modified cmd/wtmcpctl/main.go: registers the new checkCmd with rootCmd

Diagnostic output includes

  • Version, workdir, plugin mode
  • Vault password status and vault-encrypted env groups
  • Env group errors
  • Plugin search path (ok/missing)
  • Discovered plugins with tool counts
  • Tool discovery mode

Test Plan

  • go test ./cmd/wtmcpctl/... — passes (0.007s, no failures)
  • golangci-lint run ./cmd/wtmcpctl/... — 0 issues
  • Full suite go test ./... — 29 packages, all pass
  • Manual: wtmcpctl check exits 0 with full diagnostic report
  • Manual: wtmcpctl check --workdir /custom/path correctly uses specified workdir

Acceptance Criteria

  • wtmcpctl check runs without error and produces diagnostic output
  • Output includes version, workdir, plugin mode, vault password, env groups, search path (ok/missing), plugin tool counts
  • --workdir /custom/path flag is respected
  • Command is registered and visible in wtmcpctl --help
  • go test ./cmd/wtmcpctl/... passes
  • golangci-lint run ./cmd/wtmcpctl/... passes (0 issues)

decko added 2 commits May 20, 2026 18:57
Implement `wtmcpctl check` that produces the same diagnostic output
as `wtmcp check`: version, workdir, plugin mode, vault password status,
env groups, plugin search path (with ok/missing), and discovered plugins
with tool counts.

Reuses `plugin.Discover()` with the globalWorkdir flag already set by
PersistentPreRunE, so `--workdir` is respected automatically.

The check.go file includes printCtlVaultStatus and
printCtlCredentialFileStatus, mirroring the logic in cmd/wtmcp/main.go
but without server-specific concerns (sandbox, read-only flag).
Add checkCmd to rootCmd.AddCommand so it appears in `wtmcpctl --help`.
@decko decko added the ai-assisted AI assisted implementation label May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted AI assisted implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant