feat: create/edit commands, apply-compatible output, better describe #6

Merged
michal merged 2 commits from feat/create-edit-commands into main 2026-02-22 16:40:36 +00:00
Owner

Summary

  • create server/profile/project with full CLI flags — kubectl parity for everything possible via apply -f
  • edit server/profile/project — opens $EDITOR for in-flight resource editing (like kubectl edit)
  • get -o yaml/json now outputs apply-compatible format (strips internal fields, wraps in resource key) — enables get server ha-mcp -o yaml > s.yaml && apply -f s.yaml round-trip
  • describe shows visually clean sectioned output with aligned columns and tables
  • Extracted shared utilities (resolveResource, resolveNameOrId, stripInternalFields) from duplicated code
  • Instances are immutable (no create/edit) — like pods in kubernetes

Test plan

  • 199 CLI tests pass (including new create, edit, describe, get tests)
  • 241 mcpd tests pass
  • Manual: mcpctl create server test --transport STDIO
  • Manual: mcpctl get server test -o yaml > test.yaml && mcpctl apply -f test.yaml
  • Manual: mcpctl edit server test
  • Manual: mcpctl describe server test

🤖 Generated with Claude Code

## Summary - **`create server/profile/project`** with full CLI flags — kubectl parity for everything possible via `apply -f` - **`edit server/profile/project`** — opens `$EDITOR` for in-flight resource editing (like `kubectl edit`) - **`get -o yaml/json`** now outputs apply-compatible format (strips internal fields, wraps in resource key) — enables `get server ha-mcp -o yaml > s.yaml && apply -f s.yaml` round-trip - **`describe`** shows visually clean sectioned output with aligned columns and tables - Extracted shared utilities (`resolveResource`, `resolveNameOrId`, `stripInternalFields`) from duplicated code - Instances are immutable (no create/edit) — like pods in kubernetes ## Test plan - [x] 199 CLI tests pass (including new create, edit, describe, get tests) - [x] 241 mcpd tests pass - [ ] Manual: `mcpctl create server test --transport STDIO` - [ ] Manual: `mcpctl get server test -o yaml > test.yaml && mcpctl apply -f test.yaml` - [ ] Manual: `mcpctl edit server test` - [ ] Manual: `mcpctl describe server test` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
michal added 1 commit 2026-02-22 14:33:41 +00:00
feat: add create/edit commands, apply-compatible output, better describe
Some checks failed
CI / lint (pull_request) Has been cancelled
CI / typecheck (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
CI / package (pull_request) Has been cancelled
b25ff98374
- `create server/profile/project` with all CLI flags (kubectl parity)
- `edit server/profile/project` opens $EDITOR for in-flight editing
- `get -o yaml/json` now outputs apply-compatible format (strips internal fields, wraps in resource key)
- `describe` shows visually clean sectioned output with aligned columns
- Extract shared utilities (resolveResource, resolveNameOrId, stripInternalFields)
- Instances are immutable (no create/edit, like pods)
- Full test coverage for create, edit, and updated describe/get

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
michal added 1 commit 2026-02-22 16:39:23 +00:00
fix: resolve resource names in get/describe (not just IDs)
Some checks failed
CI / lint (pull_request) Has been cancelled
CI / typecheck (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
CI / package (pull_request) Has been cancelled
97ade470df
fetchResource and fetchSingleResource now use resolveNameOrId so
`mcpctl get server ha-mcp` works by name, not just by ID.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
michal merged commit a05a4c4816 into main 2026-02-22 16:40:36 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: michal/mcpctl#6