feat(cli): Phase 1 - Core task and session commands#2
Open
therichardngai-wolf wants to merge 1 commit intotherichardngai-code:mainfrom
Open
feat(cli): Phase 1 - Core task and session commands#2therichardngai-wolf wants to merge 1 commit intotherichardngai-code:mainfrom
therichardngai-wolf wants to merge 1 commit intotherichardngai-code:mainfrom
Conversation
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
therichardngai-code
requested changes
Feb 10, 2026
Owner
therichardngai-code
left a comment
There was a problem hiding this comment.
Review: Request Changes
Thank you for this CLI enhancement PR. The feature concept is solid and API integration is correct. However, there are code standard violations that need to be addressed before merge.
❌ Must Fix
1. JavaScript → TypeScript Required
All new files are .js but our code standards require TypeScript with strict mode:
cli/notecode.js → cli/notecode.ts
cli/src/api.js → cli/src/api.ts
cli/src/commands/session.js → cli/src/commands/session.ts
cli/src/commands/task.js → cli/src/commands/task.ts
cli/src/formatters.js → cli/src/formatters.ts
Reference: docs/code-standards.md - TypeScript strict mode required
2. File Size Limit Exceeded
cli/src/formatters.js is 282 lines but our limit is < 200 LOC.
Split into:
cli/src/formatters/task-formatters.tscli/src/formatters/session-formatters.tscli/src/formatters/colors.ts(shared ANSI codes)
Reference: docs/code-standards.md - "Target: < 200 LOC per file"
⚠️ Should Fix
3. Add Basic Tests
No test files included. Please add at least:
- Unit tests for formatters
- Integration test for API client (mock fetch)
4. Add Type Definitions
When converting to TypeScript, add proper types:
interface Task {
id: string;
title: string;
status: TaskStatus;
priority: TaskPriority | null;
// ...
}
type TaskStatus = 'not-started' | 'in-progress' | 'review' | 'done' | 'cancelled' | 'archived';✅ What's Good
- Backward compatibility preserved (
npx notecodestill starts server) - All API endpoints verified to exist
- Proper error handling for connection refused
--jsonflag for AI agent integration- Clean separation (client CLI vs server code)
Please address the Must Fix items and resubmit. Happy to re-review once updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements core CLI commands for task and session management.
New CLI Commands
Task Management
notecode task list— List tasks with filters (status, assignee, project)notecode task get <id>— Get task detailsnotecode task create <title>— Create new tasknotecode task update <id>— Update task (status, priority, title, description)Session Management
notecode session list— List sessions with filtersnotecode session get <id>— Get session detailsFeatures
--jsonflag on all commands for AI-agent-friendly outputPart of CLI Enhancement Plan
See
docs/CLI_ENHANCEMENT_PLAN.mdfor full roadmap.