A powerful MCP (Model Context Protocol) application for generating shell completion scripts for any CLI tool using AI.
- 🔧 Universal CLI Support: Generate completions for any command-line tool
- 🐚 Multi-Shell Support: Supports Bash, Zsh, and Fish shells
- 🤖 AI-Powered: Uses Claude 3.7 via MCP to analyze command documentation
- 📖 Smart Analysis: Extracts options and subcommands from help text and man pages
- 🚀 Easy Installation: One-click installation to appropriate shell directories
- 🔌 MCP Architecture: Built with modern Model Context Protocol for extensibility
npm install -g tabulous# Generate bash completion for git
tabulous git --shell bash
# Generate for all shells
tabulous docker --all-shells
# Generate and install automatically
tabulous kubectl --shell zsh --installimport { createAndConnectClient } from 'tabulous';
const { client, service } = await createAndConnectClient();
const completion = await service.generateCompletion({
targetCommand: 'git',
shellType: 'bash'
});
console.log(completion.script);Tabulous uses the Model Context Protocol (MCP) architecture:
- MCP Server: Hosts tools for help extraction, man page parsing, and completion generation
- MCP Client: Connects to server and orchestrates completion generation
- Tools: Specialized tools for different aspects of completion generation
- Middleware: Cross-cutting concerns like logging, caching, and rate limiting
help-extractor: Extracts help text from CLI commandsman-page-parser: Parses manual pages for additional contextcommand-analyzer: Analyzes command structure and optionscompletion-generator: Generates shell-specific completion scripts
Environment variables:
TABULOUS_LOG_LEVEL: Set logging level (debug, info, warn, error)TABULOUS_DEFAULT_SHELL: Default shell type (bash, zsh, fish)TABULOUS_OUTPUT_DIR: Default output directory
See the examples/ directory for usage examples:
basic-usage.ts: Simple completion generationmulti-shell.ts: Generate for multiple shells
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm test
# Start development server
npm run devMIT