rootCmd.Use was "mol" while .goreleaser.yaml sets binary: "molecule". Align to "molecule" to match the published binary name, test invocations, and docs. Also fix test helper to use runtime.GOEXE instead of hardcoded /tmp/go/bin/go. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2.0 KiB
2.0 KiB
PR: feat/cli-full-command-tree → molecule-cli
Status
- Branch:
feat/cli-full-command-tree(pushed locally, GH_TOKEN dead — cannot push to origin) - Existing PR #3 (
feat/cli-workspace-commands) is superseded by this branch - When token recovers: push branch, close #3, open this PR
PR Title
feat(cli): implement full CLI command tree
PR Body
Summary
Implements the full CLI command tree for molecule-cli, the primary user-facing tool for the Molecule AI platform.
cmd/molecule/main.go: entry point callingcmd.Execute()internal/cmd/root.go: cobra root with global flags (--api-url,--verbose,--output,--config), registers all 4 command groupsinternal/cmd/workspace.go: 7 subcommands (list, create, inspect, delete, restart, audit, delegate)internal/cmd/agent.go: 4 subcommands (list, inspect, send, peers)internal/cmd/platform.go: 2 subcommands (audit, health)internal/cmd/config.go: 5 subcommands (list, get, set, init, view)internal/cmd/http.go:runHTTPhelper shared by agent send and workspace delegateinternal/client/platform.go: control plane HTTP client with workspace/agent/health/audit operations
All 18 subcommands wire to the platform API via MOLECULE_API_URL.
Binary builds cleanly to ./bin/mol with Go 1.23.
Resolves: KI-001 (entry point), KI-002 (partial — API client), KI-003 (go.sum).
Test plan
go build -o bin/mol ./cmd/molecule— BUILD OKbin/mol --help— shows all 4 command groupsbin/mol workspace --help— shows all 7 workspace subcommandsbin/mol agent --help— shows all 4 agent subcommandsbin/mol config --help— shows all 5 config subcommandsbin/mol platform --help— shows audit, healthbin/mol --version— shows versionMOLECULE_API_URL=http://localhost:8080 bin/mol workspace list— hits APIbin/mol workspace list --output json— structured output works- Run CI (go test ./..., go build)
🤖 Generated with Claude Code