Skip to content

feat: add folder command group#248

Open
scottlovegrove wants to merge 3 commits intomainfrom
scottl/folders
Open

feat: add folder command group#248
scottlovegrove wants to merge 3 commits intomainfrom
scottl/folders

Conversation

@scottlovegrove
Copy link
Copy Markdown
Collaborator

Summary

  • Adds td folder command group with list, view, create, update, and delete subcommands
  • Exposes the SDK's folder CRUD endpoints (getFolders, getFolder, addFolder, updateFolder, deleteFolder)
  • Folders are workspace-scoped — list and create require a workspace ref (positional or --workspace), while update/delete/view support id:xxx directly or name-based lookup with --workspace
  • Auto-detects workspace when only one exists

Test plan

  • 21 new tests in folder.test.ts covering all subcommands, JSON output, dry-run, empty states, workspace auto-detection, and error cases
  • All 1271 existing tests still pass
  • Type check, lint, format, and skill sync all clean
  • Manual test: td folder list <workspace>, td folder create <workspace> --name "Test", td folder view <ref>, td folder update <ref> --name "New", td folder delete <ref> --yes

🤖 Generated with Claude Code

@doistbot doistbot requested a review from rmartins90 April 11, 2026 09:25
Copy link
Copy Markdown
Member

@doistbot doistbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR introduces the new td folder command group, providing a complete set of CRUD operations for workspace-scoped folders along with excellent test coverage. These additions thoughtfully extend the CLI's capabilities by seamlessly integrating folder management with workspace auto-detection. A few adjustments are needed to ensure the --cursor flag is properly passed to the pagination function in the list command, and to include the 'folder' entity type argument for formatJson in mutating commands for consistent output formatting.

Share FeedbackReview Logs

scottlovegrove and others added 3 commits April 11, 2026 22:55
Adds `td folder` with list, view, create, update, and delete subcommands,
exposing the SDK's folder CRUD endpoints for workspace folder management.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Pass startCursor to paginate() in folder list so --cursor works
- Add 'folder' to EntityType and pass it to formatJson in create/update
- Define FOLDER_ESSENTIAL_FIELDS for consistent JSON output

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove parseInt() wrappers and update test expectations to match
the string-typed workspaceId from SDK v9.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

2 participants