Commit Graph

3 Commits

Author SHA1 Message Date
211b57b5b3 fix(cli): remove stray brace in runPlatformHealth causing syntax error
The yaml-output-support refactor removed the combined json/yaml if-block
but left a dangling `}` that closed runPlatformHealth prematurely,
putting the tabwriter block outside the function body.

Removes the stray brace at line 137. CI vet was failing with:
  platform.go:138:2: syntax error: non-declaration statement outside function body

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 05:23:40 +00:00
ab91b652ef fix(cli): implement true YAML output support
The `--output yaml` flag was accepted but aliased to JSON since
printYAML() was never defined. Add printYAML() using gopkg.in/yaml.v3
(already an indirect dep via viper) and split all output format
branches into explicit json/yaml/table paths.

Affected commands: workspace list/create/inspect/audit,
agent list/inspect/peers, platform audit/health.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 03:47:00 +00:00
3eabe3c780 feat: implement full CLI command tree
Implement the core CLI for molecule-cli:

- cmd/molecule/main.go: entry point calling cmd.Execute()
- internal/cmd/root.go: cobra root with global flags (--api-url,
  --verbose, --output, --config), registers all 4 command groups
- internal/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: runHTTP helper shared by agent send and
  workspace delegate
- internal/client/platform.go: control plane HTTP client with
  workspace/agent/health/audit operations

All 18 subcommands wire to platform API via MOLECULE_API_URL.
Binary builds to ./bin/mol. Resolves KI-001, KI-002 (partial),
KI-003.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 01:18:24 +00:00