English | 简体中文
A decentralized, intent-driven CLI command registry and offline search infrastructure built for AI Agents and modern developers.
CmdHub provides standardized, machine-readable ACI (Agent-Computer Interface) contracts for CLI tools, enabling AI Agents to discover and execute terminal commands with zero hallucination, millisecond latency, and full security guardrails.
cmdhub-oss/ # This repository (open-source)
├── cmdhub-cli/ # cmdh — local CLI client (Rust)
├── cmdhub-mcp/ # MCP server for IDE/Agent integration
├── cmdhub-shared/ # Shared types and ACI schema definitions
├── cmdhub-skills/ # Plugin/skill system
└── schemas/ # ACI JSON Schema definitions
- Offline Hybrid Search: FTS5 full-text + sqlite-vec vector search with RRF fusion (< 1ms)
- MCP Server: Native Model Context Protocol for Claude Code, Cursor, etc.
- Safety Guardrail: Risk-level blocking for dangerous commands
- XDG Compliant: Strict adherence to XDG Base Directory Specification
- Ed25519 Signed DB: Cryptographic verification of all distributed databases
# Install from source
cargo install cmdhub-cli
# Or build locally
cargo build --release -p cmdhub-cli
# Update the local database
cmdh update
# Search for a command
cmdh search "extract tar excluding node_modules"
# Start MCP server
cmdh mcp --transport stdioFull architecture, API, and design specifications are in the cmdhub-docs directory.
Key documents:
# Format check
cargo fmt --all -- --check
# Lint
cargo clippy --all-targets --all-features -- -D warnings
# Test
cargo test --all-features --workspace
# Pre-commit
pre-commit run --all-filesMIT License — see LICENSE