Cli Tool Generator

# cligen - CLI Tool Generator

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Cli Tool Generator" with this command: npx skills add zhaog100/cli-tool-generator

cligen - CLI Tool Generator

Fast CLI tool scaffolding generator for Bash & Python

Overview

Generate production-ready CLI tool skeletons with proper argument parsing, help docs, error handling, and shell completions — in seconds.

Usage

For the AI Agent

When the user asks to "create a CLI tool" or "generate a command-line tool":

  1. Run cligen create with the appropriate parameters
  2. If the user specifies requirements, translate them into --commands
  3. Validate the generated tool with cligen validate
  4. Report results to the user

CLI Commands

# Generate a new CLI tool (Bash)
cligen create --name mytool --lang bash --commands "status,deploy,config" --desc "My deployment tool"

# Generate a new CLI tool (Python)
cligen create --name mytool --lang python --commands "build,test" --desc "Build tool"

# Validate an existing CLI tool
cligen validate ./mytool/

# Generate shell completions
cligen completions --shell bash --commands "build,test,deploy"

# Check development environment
cligen doctor

Options

OptionDescriptionDefault
--name NAMETool name (required)-
--desc DESCTool description""
--lang LANGLanguage: bash|pythonbash
--commands CMDsComma-separated commandshelp,version
--output DIROutput directory./<name>
--non-interactiveSkip promptsfalse

What Gets Generated

  • Main script — executable entry point with full arg parsing & dispatch
  • README.md — usage documentation
  • .gitignore — language-appropriate ignores
  • requirements.txt — (Python only) dependency file

Best Practice Checks

The validate command checks 10 criteria:

  1. Executable main script
  2. Valid shebang
  3. Strict mode (Bash: set -euo pipefail)
  4. Error handling
  5. Argument parsing
  6. Help documentation
  7. Version information
  8. README.md
  9. .gitignore
  10. Copyright header

File Structure

skills/cli-tool-generator/
├── SKILL.md              # This file
├── cligen                # CLI entry point
├── src/
│   ├── generator.sh      # Core generation logic
│   ├── preflight.sh      # Environment checks
│   ├── validator.sh      # Best practice validation
│   ├── templates/        # (reserved for future templates)
│   └── completions/      # (reserved for future completions)
├── tests/
│   └── test_all.sh       # Full test suite
└── package.json

Trigger Phrases

  • "create a CLI tool"
  • "generate a command-line tool"
  • "CLI scaffold"
  • "新建命令行工具"
  • "生成CLI工具"

📄 许可证与版权声明

MIT License Copyright (c) 2026 思捷娅科技 (SJYKJ) 免费使用、修改和重新分发时,需注明出处。 出处:GitHub: https://github.com/zhaog100/xiaomili-skills | ClawHub: https://clawhub.com | 创建者: 思捷娅科技 (SJYKJ) 商业使用授权:个人免费 | 小微¥999/年 | 中型¥4,999/年 | 大型¥19,999/年

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Claw Insights Install

Install and run Claw Insights, a read-only observability dashboard that monitors your OpenClaw agent with zero intrusion — no code changes, no cloud dependen...

Registry SourceRecently Updated
Coding

QR Campaign Studio

Generate marketing QR codes with batch output, UTM tracking links, logo embedding, and poster composition. Use when users ask 生成二维码/批量二维码/渠道追踪码/带logo二维码. Sup...

Registry SourceRecently Updated
Coding

Seerr server manager

CLI for the Seerr media request management API. Search movies and TV shows, create and manage media requests, manage users, track issues, and administer a se...

Registry SourceRecently Updated
Coding

AI Corporate Training Video Factory — Build a Complete Employee Training Program in 2 Hours

Automates creation of complete corporate training programs with up-to-date curricula, professional videos, assessments, and automated employee delivery in 2...

Registry SourceRecently Updated