cli-design
Skill0 starsChanged 3 months agoMITView on GitHub
CLI设计:Click/Typer/argparse、进度条、彩色输出、交互式.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- notque/vexjoy-agenttheir own version, first seen Sep 26, 2026
- drinkspiller/skillstheir own version, first seen Sep 16, 2026
- magarcia/skillstheir own version, first seen Jul 23, 2026
- metyatech/skill-cli-designtheir own version, first seen Jul 22, 2026
- shinzoxD/knackboxtheir own version, first seen Jul 10, 2026
- jkeifer/skillstheir own version, first seen Jul 9, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- notque/vexjoy-agent★ 424same name
- magarcia/skills★ 4same name
- damacus/agent-skills★ 2same name
- drinkspiller/skills★ 1same name
- jkeifer/skills★ 0same name
- metyatech/skill-cli-design★ 0same name
- shinzoxD/knackbox★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository219 other files it gives its agents.
- agent-doctrineSkill
- agent-evaluation-frameworkSkill
- agent-visualization-flintSkill
- hermes-agentSkill
- bailian-cliSkill
- edge-browser-automationSkill
- computer-useSkill
- jupyter-live-kernelSkill
- backup-strategiesSkill
- browser-automationSkill
- chinese-ai-free-apiSkill
- cicd-pipeline-templatesSkill
- copybaraSkill
- devops-toolkitSkill
- email-deliverabilitySkill
- monitoring-observabilitySkill
- obsidian-maintenanceSkill
- obsidian-troubleshootingSkill
- openclaw-windowsSkill
- openclaw-workerSkill
- webhook-subscriptionsSkill
- windows-dev-environmentSkill
- windows-masterSkill
- zero-downtime-deploySkill
- codebase-inspectionSkill
- github-workflowSkill
- adaptive-communicationSkill
- agent-cost-dashboardSkill
- agent-evolutionSkill
- agent-governanceSkill
- agent-osSkill
- context-efficient-toolsSkill
- context-loss-awarenessSkill
- creative-synthesisSkill
- hermes-desktop-pluginsSkill
- emotional-intelligenceSkill
- graph-engineering-workflowSkill
- hermes-maintenanceSkill
- hermes-voiceSkill
- hermes-hygieneSkill
- identity-coreSkill
- income-loopSkill
- master-synthesisSkill
- meta-cognitionSkill
- reasoning-engineSkill
- self-preservationSkill
- teaching-abilitySkill
- temporal-awarenessSkill
- hermes-themesSkill
- thinking-visualizationSkill
- user-modelingSkill
- voice-full-restoreSkill
- knowledge-graph-traversalSkill
- mcp-browser-canvasSkill
- free-api-gatewaySkill
- native-mcpSkill
- web-reverse-apiSkill
- ai-edaSkill
- huggingface-hubSkill
- industrial-ai-siemens-mcpSkill
- The first 60 shown.
The file
Files
CLI 设计
工具选型
简单脚本 → argparse(标准库)
中等CLI → Click(装饰器风格)
现代CLI → Typer(类型注解,基于Click)
超复杂 → argparse + 手动分派Typer(推荐,最现代)
import typer
app = typer.Typer()
@app.command()
def hello(name: str = "World", count: int = 1):
"""向某人问好"""
for _ in range(count):
typer.echo(f"Hello {name}!")
@app.command()
def process(input_file: str, output: str = "output.txt"):
"""处理文件"""
typer.echo(f"Processing {input_file} -> {output}")
if __name__ == "__main__":
app()python cli.py hello --name 郑鑫 --count 3
python cli.py process data.csv -o result.jsonClick
import click
@click.group()
def cli():
pass
@cli.command()
@click.option('--name', default='World', help='名字')
@click.option('--count', default=1, help='次数')
def hello(name, count):
for _ in range(count):
click.echo(f'Hello {name}!')
@cli.command()
@click.argument('input_file')
@click.option('-o', '--output', default='output.txt')
def process(input_file, output):
click.echo(f'Processing {input_file} -> {output}')进度条
from rich.progress import Progress
import time
with Progress() as progress:
task = progress.add_task("[cyan]Processing...", total=100)
for i in range(100):
time.sleep(0.02)
progress.update(task, advance=1)
# 或者用 tqdm(最简单)
from tqdm import tqdm
for item in tqdm(items, desc="处理中"):
process(item)彩色输出(Rich)
from rich.console import Console
from rich.table import Table
console = Console()
console.print("[green]成功![/green]")
console.print("[red]错误![/red]")
console.print("[bold yellow]警告![/bold yellow]")
# 表格
table = Table(title="用户列表")
table.add_column("ID")
table.add_column("姓名")
table.add_row("1", "郑鑫")
console.print(table)CLI 设计原则
1. 默认行为合理(不加参数也能跑)
2. --help 清晰完整
3. 错误信息友好(不是堆栈)
4. 进度可观测(进度条/日志)
5. 可组合(管道 | 重定向)
6. 幂等(重复跑不出错)Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

