重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
npx skills add https://github.com/siviter-xyz/dot-agent --skill cli-building使用现代模式和最佳实践构建命令行界面的指南。
stricli (@bloomberg/stricli,推荐用于现代异步优先 CLI):
oclif(替代方案):
cyclopts(推荐用于异步优先):
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
typer(当完全支持异步时):
将命令设计为可重用模块:
使用策略模式处理:
NO_COLOR 环境变量所有 I/O 都应为异步:
正确处理异步错误:
// stricli 示例
import { createCli } from '@bloomberg/stricli';
async function myCommand() {
// 异步实现
}
const cli = createCli({
name: 'my-cli',
commands: {
'my-command': myCommand
}
});
cli.run();
# cyclopts 示例
from cyclopts import App
app = App()
@app.default
async def my_command():
# 异步实现
pass
if __name__ == '__main__':
app()
详细指南请参阅:
references/async-patterns.md - Async/await 最佳实践references/composable-commands.md - 命令组合模式references/strategy-pattern.md - 工作流策略模式references/output-formatting.md - 输出格式化指南references/frameworks.md - 框架比较和选择每周安装次数
67
仓库
GitHub 星标数
8
首次出现
2026年1月20日
安全审计
已安装于
codex46
claude-code45
cursor45
gemini-cli37
opencode37
github-copilot34
Guidelines for building command-line interfaces with modern patterns and best practices.
stricli (@bloomberg/stricli, recommended for modern async-first CLIs):
oclif (alternative):
cyclopts (recommended for async-first):
typer (when fully async support available):
Design commands as reusable modules:
Use strategy pattern for:
NO_COLOR environment variableAll I/O should be async:
Handle async errors properly:
// stricli example
import { createCli } from '@bloomberg/stricli';
async function myCommand() {
// Async implementation
}
const cli = createCli({
name: 'my-cli',
commands: {
'my-command': myCommand
}
});
cli.run();
# cyclopts example
from cyclopts import App
app = App()
@app.default
async def my_command():
# Async implementation
pass
if __name__ == '__main__':
app()
For detailed guidance, see:
references/async-patterns.md - Async/await best practicesreferences/composable-commands.md - Command composition patternsreferences/strategy-pattern.md - Strategy pattern for workflowsreferences/output-formatting.md - Output formatting guidelinesreferences/frameworks.md - Framework comparisons and selectionWeekly Installs
67
Repository
GitHub Stars
8
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex46
claude-code45
cursor45
gemini-cli37
opencode37
github-copilot34
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
122,000 周安装
Tailwind CSS v4 最佳实践:Vite插件、@theme指令、OKLCH颜色格式详解
501 周安装
医疗器械质量文档管理专家 | ISO 13485文档控制、FDA法规文档、变更管理
501 周安装
Exa Search API 技能:语义搜索、内容提取与结构化研究,优化AI搜索功能
498 周安装
SaaS营销创意库:140个实战策略与SEO优化技巧,助您快速获客增长
503 周安装
加密货币交易策略生成器 - 整合Binance数据、技术分析与市场情绪
505 周安装
AntV Infographic 信息图创建器 - 数据可视化与视觉设计工具
503 周安装