# Build CLIs URL: /milo-cli/docs/build-clis/ Section: build-clis Tags: cli, commands -------------------------------------------------------------------------------- Build human-facing commands and agent-facing tools from the same typed Python functions. Start with commands and groups, then add schemas, context, output formatting, llms.txt, and MCP. Terminal Commands Register typed command handlers and run them from argv Tree Structure Groups Organize commands into nested namespaces List Context and Output Use injected context, global options, and structured returns Cpu MCP Server Expose commands as MCP tools and run the gateway Terminal CLI & Commands AI-native CLI with typed commands, automatic argparse, MCP tools, and llms.txt. Output Formatting Structured output with plain, JSON, table, and template formats. Tree Structure Command Groups Nested command groups for hierarchical CLI structures. Settings Context & Global Options Execution context with verbosity levels, output format, and custom global options. Lazy Loading Deferred command imports for fast CLI startup with large command sets. Cpu MCP Server Expose CLI commands as MCP tools, register CLIs for discovery, and run a unified gateway. File Text llms.txt Generation Generate AI discovery documents from CLI command definitions. Question Help Rendering Drop-in argparse HelpFormatter using Kida templates. -------------------------------------------------------------------------------- Metadata: - Author: lbliii - Word Count: 174 - Reading Time: 1 minutes