Skip to content

feat(cli): Phase 3 - Agent, project, and import/export commands#4

Open
therichardngai-wolf wants to merge 6 commits intotherichardngai-code:mainfrom
therichardngai-wolf:feat/cli-phase3
Open

feat(cli): Phase 3 - Agent, project, and import/export commands#4
therichardngai-wolf wants to merge 6 commits intotherichardngai-code:mainfrom
therichardngai-wolf:feat/cli-phase3

Conversation

@therichardngai-wolf
Copy link
Contributor

Summary

Adds agent management, project switching, and task import/export functionality.

New CLI Commands

Agent Management

  • notecode agent list — List configured agents
  • notecode agent get <id> — Get agent details
  • notecode agent skills <id> — List agent skills
  • notecode agent spawn <id> <prompt> — Spawn agent for a task

Project Management

  • notecode project list — List projects
  • notecode project get <id> — Get project details
  • notecode project switch <id> — Switch active project
  • notecode project current — Show current active project

Import/Export

  • notecode task export — Export tasks to JSON
    • --status, --project-id filters
    • --output <file> to save to file
  • notecode task import <file> — Import tasks from JSON
    • --project-id to specify target project
    • --dry-run to preview without importing

Features

  • Full --json support on all commands
  • Dry-run mode for safe imports
  • Agent spawning for automation

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.
- Add 'approval list' to show pending approvals
- Add 'approval get <id>' to view approval details with diffs
- Add 'watch' command for real-time session/approval monitoring
- Add 'status' command for server overview (sessions, tasks, approvals)
- All commands support --json output format
- Watch supports --interval for custom poll timing
Phase 3 CLI enhancements:

Agent commands:
- notecode agent list [--project <id>] [--provider <p>] [--json]
- notecode agent get <name> [--project <id>] [--json]
- notecode agent skills [--project <id>] [--provider <p>]
- notecode agent spawn --task <id> --prompt <p> (experimental)

Project commands:
- notecode project list [--favorite] [--recent] [--search] [--json]
- notecode project get <id> [--json]
- notecode project switch <id>
- notecode project current [--json]

Batch operations:
- notecode task export [--status] [--project] [-o file]
- notecode task import <file> [--project] [--dry-run]

All commands support --json output for programmatic usage.
Builds on Phase 1 (task, session) and Phase 2 (approval, watch, status).
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