Skip to content

Conversation

@Gaubee
Copy link
Contributor

@Gaubee Gaubee commented Dec 25, 2025

Summary

使用 yargs 重构 pnpm agent CLI,获得:

  • 自动生成帮助信息
  • 类型安全的参数解析
  • 统一的命令结构
  • 更好的错误提示

Changes

  • 添加 yargs 依赖用于命令解析
  • 重组代码结构为 commands/handlers/ 目录
  • 移除旧版 --flag 风格的参数解析
  • 所有命令现在都有子命令帮助 (如 pnpm agent worktree --help)

Testing

pnpm agent --help
pnpm agent worktree --help
pnpm agent epic --help
pnpm agent practice list
pnpm agent toc

类型检查和所有测试均通过。

- Add yargs for command parsing with automatic help generation
- Reorganize code into commands/ and handlers/ directories
- Remove legacy --flag style argument parsing
- Improve type safety with TypeScript CommandModule types
- All commands now have proper subcommand help (e.g. pnpm agent worktree --help)
@Gaubee Gaubee merged commit f186c0e into main Dec 25, 2025
5 checks passed
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