Skip to content

feat(cli): Phase 2 - Approval, watch, and status commands#3

Open
therichardngai-wolf wants to merge 4 commits intotherichardngai-code:mainfrom
therichardngai-wolf:feat/cli-phase2
Open

feat(cli): Phase 2 - Approval, watch, and status commands#3
therichardngai-wolf wants to merge 4 commits intotherichardngai-code:mainfrom
therichardngai-wolf:feat/cli-phase2

Conversation

@therichardngai-wolf
Copy link
Contributor

Summary

Adds approval management, real-time watching, and status overview commands.

New CLI Commands

Approval Management

  • notecode approval list — List pending approvals
  • notecode approval get <id> — Get approval details with payload and diffs

Monitoring

  • notecode watch — Real-time session and approval monitoring
    • Shows running sessions, pending approvals, recent completions
    • --interval <ms> for custom poll interval
    • --json for streaming JSON output

Status

  • notecode status — Server status overview
    • Session counts by status
    • Task counts by status
    • Pending approval count
    • Platform info

Features

  • All commands support --json for AI-agent integration
  • Real-time updates via polling
  • Graceful Ctrl+C handling

Adds a command-line interface for NoteCode management:

Task commands:
- notecode task list [--status, --priority, --project, --assignee, --search, --json]
- notecode task get <id> [--json]
- notecode task create --title '...' [--description, --priority, --assignee, --project, ...]
- notecode task update <id> [--status, --priority, --title, ...]

Session commands:
- notecode session list [--task-id, --status, --limit, --json]
- notecode session status <id> [--json]
- notecode session get <id> [--json]

Features:
- All commands support --json flag for machine-readable output
- Colored, formatted output for human readability
- Calls REST API at http://localhost:41920
- Server start preserved: 'notecode' or 'notecode serve' starts the server
- Uses Commander.js for CLI parsing
- Add commander.js for subcommand structure
- Task commands: list, get, create, update
- Session commands: list, get
- Support --json output for AI agents
- Backward compatible with legacy invocation
- Global --api-url flag for custom server URL
Phase 2 CLI enhancements:

Approval Commands:
- notecode approval list [--session <id>] [--json]
- notecode approval get <id> [--json]
- notecode approval approve <id> [-m message]
- notecode approval reject <id> -r <reason>

Watch Command (real-time monitoring):
- notecode watch [--json] - SSE-based activity streaming
- notecode watch --poll - Polling fallback mode
- Outputs: session events, approval pending, task changes

Status Command (system overview):
- notecode status [--json]
- Shows: server status, task counts, sessions, pending approvals

All commands support --json for AI agent consumption.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant