cli-design
Skill0 starsChanged 3 months agoMITView on GitHub
CLI设计:Click/Typer/argparse、进度条、彩色输出、交互式.
20 other projects use a version of this.
Adopted by
Most recently taken up by
- davisbuilds/dojotheir own version, first seen Nov 29, 2026
- porada/domfilestheir own version, first seen Nov 29, 2026
- notque/vexjoy-agenttheir own version, first seen Nov 27, 2026
- drinkspiller/skillstheir own version, first seen Nov 23, 2026
- Sequela02/canastatheir own version, first seen Nov 15, 2026
- danielsitek/skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use writing, research and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
alxyrginSkillwriting
Создание контента для личного бренда — статьи, посты, туториалы. Use when user asks to "напиши статью", "создай пост", "подготовь контент", "write article", "create content", or when task requires content creation for blogging, LinkedIn, Medium, or other publishing platforms.
Also in 3 projects that use this
NVIDIASkillresearch
Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.
Also in 4 projects that use this
SentrySkillreview
Fixture review skill.
Also in 3 projects that use this
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 3 projects that use this
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- vm0-ai/vm0★ 1.2ksame name
- notque/claude-code-toolkit★ 452same name
- notque/vexjoy-agent★ 452same name
- joelhooks/joelclaw★ 68same name
- tenstorrent/tt-studio★ 52same name
- z-Zihan/Evir★ 11same name
- porada/domfiles★ 7same name
- markphelps/agent-plugins★ 6same name
- magarcia/skills★ 4same name
- yahyabedirhan/skills★ 3same name
10 more not listed
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.

