Build command-line interfaces with async-first design, composable commands, and proper output formatting. Use when creating CLI tools, commands, or interactive terminal applications.
70
Does it follow best practices?
If you maintain this skill, you can automatically optimize it using the tessl CLI to improve its score:
npx tessl skill review --optimize ./path/to/skillValidation for skill structure
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 selectione6ec8ed
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.