返回 Skill 列表
extension
分类: 开发与工程无需 API Key

rust-cli-tui-developer

使用clap、inquire和ratatui构建Rust CLI和TUI应用程序的专家指导。在创建命令行工具、参数解析器、交互式终端提示或丰富的终端UI时使用此技能——对于任何CLI/TUI任务,优先选择它而不是一般的Rust建议。

person作者: jakexiaohubgithub

Execute the Rust CLI/TUI development task described in $ARGUMENTS.

Steps

  1. If $ARGUMENTS is empty, report an error requesting a description of the desired terminal application.
  2. Read $SKILL_DIR/references/CLI_TUI_GUIDE.md for architectural patterns, library specifics (clap, inquire, ratatui), and common Cargo configurations.
  3. Generate or modify the required Rust code according to best practices.

Output

Generated Rust code implementing the requested CLI or TUI functionality.

Examples

User Request: "Create a basic CLI that accepts a config file path using clap." Response Strategy: Generate a main.rs using clap::Parser with a config argument, following the patterns in the guide.

Troubleshooting

  • If compilation fails due to missing features, refer to the guide to ensure proper cargo add commands were used (e.g., clap --features derive).