feat: implement edit and delete host commands
- Add edit command with flag-based and interactive update modes - Add delete command with confirmation prompt and --force flag - Include delete alias 'rm' for convenience - Add comprehensive tests for both commands - Update project state documentation
This commit is contained in:
+28
-8
@@ -2,7 +2,7 @@
|
||||
|
||||
> **Purpose**: Enable seamless continuation of development by any agent/LLM across sessions
|
||||
>
|
||||
> **Last Updated**: 2024-06-23 (Session 5)
|
||||
> **Last Updated**: 2024-06-23 (Session 6)
|
||||
> **Current Status**: Implementation In Progress - Tasks 1-8 Complete
|
||||
> **Phase**: MVP Development (Phase 1)
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
✅ **Bug Fix**: Fixed deadlock in JSON storage (RLock within Lock)
|
||||
|
||||
### What Needs to Happen Next
|
||||
🔄 **Task 10+**: Edit/remove commands, TUI implementation
|
||||
🔄 **Task 10**: TUI implementation (Bubble Tea)
|
||||
🔄 **Task 11**: Export/Import commands
|
||||
🔄 Build and test core features
|
||||
🔄 Prepare MVP release
|
||||
|
||||
@@ -52,12 +53,12 @@
|
||||
| **Errors** | ✅ 100% | AppError + ConnectionError + SSH error handler |
|
||||
| **SSH Client** | ✅ 100% | Password + key auth, Execute, Connect/Close |
|
||||
| **CLI Framework** | ✅ 100% | Cobra root, version, completion commands |
|
||||
| **CLI Commands** | 🟡 40% | add + list + connect commands done; edit/remove pending |
|
||||
| **CLI Commands** | 🟡 60% | add + list + connect + edit + delete commands done |
|
||||
| **TUI** | 🔲 0% | Terminal user interface |
|
||||
| **Testing** | 🟡 45% | Error + SSH + add + list + connect tests passing |
|
||||
| **Testing** | 🟡 50% | Error + SSH + add + list + connect + edit + delete tests passing |
|
||||
| **Documentation** | 🔲 0% | Usage guides and API docs |
|
||||
|
||||
### Overall Progress: **~60% Complete** (Tasks 1-9 done)
|
||||
### Overall Progress: **~65% Complete** (Tasks 1-9 + edit/delete done)
|
||||
|
||||
---
|
||||
|
||||
@@ -142,6 +143,22 @@
|
||||
- `cmd/hostkeeper/connect.go` — Connect command with native SSH (default) and direct Go SSH (--direct) modes
|
||||
- `cmd/hostkeeper/connect_test.go` — Tests for command existence, flags, and SSH arg building
|
||||
|
||||
#### ✅ Edit Host Command
|
||||
- **Status**: ✅ Completed
|
||||
- **Priority**: HIGH
|
||||
- **Deliverables**: Edit existing SSH host configurations
|
||||
- **Files Created**:
|
||||
- `cmd/hostkeeper/edit.go` — Edit command with flag-based and interactive modes
|
||||
- `cmd/hostkeeper/edit_test.go` — Tests for command existence and flags
|
||||
|
||||
#### ✅ Delete Host Command
|
||||
- **Status**: ✅ Completed
|
||||
- **Priority**: HIGH
|
||||
- **Deliverables**: Delete SSH hosts with confirmation prompt
|
||||
- **Files Created**:
|
||||
- `cmd/hostkeeper/delete.go` — Delete command with --force flag to skip confirmation
|
||||
- `cmd/hostkeeper/delete_test.go` — Tests for command existence, alias, and flags
|
||||
|
||||
#### 🔲 Task 10-14: Remaining Tasks
|
||||
- **Status**: Not Started
|
||||
- **Details**: See `docs/plans/2024-06-22-hostkeeper-implementation.md`
|
||||
@@ -163,11 +180,13 @@
|
||||
- [x] Add host command
|
||||
- [x] List hosts command
|
||||
- [x] Connect host command
|
||||
- [x] Edit host command
|
||||
- [x] Delete host command
|
||||
|
||||
### Next Sprint
|
||||
- [ ] CLI commands (edit, remove)
|
||||
- [ ] Basic TUI implementation
|
||||
- [ ] TUI implementation (Bubble Tea)
|
||||
- [ ] Export/import functionality
|
||||
- [ ] Key management commands
|
||||
|
||||
### Final Sprint
|
||||
- [ ] Testing and integration
|
||||
@@ -528,7 +547,8 @@ cat go.mod
|
||||
### Milestone Tracking
|
||||
- [x] Milestone 1: Foundation (Tasks 1-6) - Week 1 ✅ COMPLETE
|
||||
- [x] Task 7-9: Add, List, Connect commands ✅ COMPLETE
|
||||
- [ ] Milestone 2: Core Features (Tasks 7-10) - Week 2-3 (80% complete)
|
||||
- [x] Edit & Delete commands ✅ COMPLETE
|
||||
- [ ] Milestone 2: Core Features (Tasks 7-10) - Week 2-3 (85% complete)
|
||||
- [ ] Milestone 3: Polish & Release (Tasks 11-14) - Week 4
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user