DISCOVER THE FUTURE OF AI AGENTSarrow_forward

X-CMD

calendar_todayAdded Apr 22, 2026
categoryAgent & Tooling
codeOpen Source
PythonAI AgentsCLIAgent & ToolingDeveloper Tools & CodingAutomation, Workflow & RPA

Shell Superpowers for AI Agents — A modern modular toolkit for POSIX shell providing Python-standard-library-like capabilities.

Overview#

X-CMD is a modern modular toolkit designed for POSIX Shell, implemented purely in Shell and AWK, aiming to provide command-line environments with capabilities comparable to Python's standard library. The project is currently at v0.8.14, open-sourced under Apache License 2.0, created by lj h.sh (edwinjhlee) and backed by MiraclePlus.

Core Systems#

Module System — 300+ Shell/AWK Function Libraries#

  • Maximum portability across BusyBox, Alpine, legacy machines
  • Invocation: x <module>
  • Coverage areas:
    • AI Integration: openai, gemini, deepseek, kimi, ollama, mistral, whisper
    • Agent Wrappers: claude, codex, opencode
    • OS Management: Enhanced mac, top, ps, df, free, stat, hash
    • File System: ls, path, zuz (smart extraction)
    • Git Enhancement: gh, gt, gl, cb
    • Cloud Services: bwh, shodan, aws ec2 (WIP), ali ecs (WIP)
    • Messaging: feishu, dingtalk, telegram, discord, weixin
    • Information Lookup: tldr, man, cht, rfc, wkp (Wikipedia), osv
    • UX Enhancement: theme (cross-shell themes), advise (6+ shell completions)
    • Utilities: githook (husky alternative), ccal (lunar calendar), str, csv

Package System — 600+ Portable CLI Tools#

  • Curated third-party CLI tools (jq, fzf, fd, ripgrep, node, python, etc.)
  • Pre-compiled binaries (Go, Rust, C), on-demand download, no root required, no system pollution
  • Three usage modes:
    • x <tool>: Direct use (auto-detect, silent install of portable version if missing)
    • x env use <tool>: Global user environment installation
    • x env try <tool>: Temporary installation (current shell session only)

Unified Software Installation#

  • Abstracts 1200+ software installation recipes, shielding differences across brew/apt and other package managers
  • Single command x install <soft> auto-selects the best installation path

AI-Native Shell & Agent Capabilities#

  • Access multiple LLM providers (OpenAI, Gemini, DeepSeek, Zhipu, MiniMax, Kimi, Mistral, Jina, Ollama) with just shell + curl
  • Built-in pure Shell AI Agent under 2MB
  • 200+ AI Skills for enhanced context awareness (x skill ll / x skill suggest / x skill add)
  • AWK-based streaming LLM output processing, with native Shell integration advantages for network latency and throughput bottlenecks
  • Provides 1000+ CLI tool knowledge for AI Agents (Claude Code, Codex, Gemini CLI, etc.), auto-installing missing tools

Architecture#

  • Core Dependency: Purely POSIX Shell + AWK, zero external dependencies
  • Repository Structure: Entry file X (core Shell functions), modules in mod/, add-ons in adv/
  • Smart Detection: Checks system PATH first when executing x <tool>, silently downloads portable version if missing
  • Graceful Degradation: Falls back to POSIX Shell + AWK core when advanced tools or network are unavailable
  • Adaptive Output: TTY mode outputs interactive TUI or colored structured text; Pipe mode outputs TSV or JSON (--json flag)
  • Design Philosophy: Modules ≈ JS (native, lightweight, runs everywhere), Packages ≈ WebAssembly (pre-compiled, powerful, on-demand loading)

Performance#

  • Core size: ~1.1 MB
  • Non-interactive load: < 20 ms, Interactive load: < 60 ms

Platform Support#

  • Linux, macOS, Windows (WSL/Git Bash/PowerShell), BSD
  • Also supports Fish, Nushell, Elvish, Xonsh, tcsh and other non-POSIX shells

Installation & Usage#

# Quick install
eval "$(curl https://get.x-cmd.com)"

# Package manager install
brew install x-cmd
sudo yay -S x-cmd

# Upgrade & Uninstall
x upgrade
x uninstall self

# Load
. ~/.x-cmd.root/X

Windows PowerShell requires downloading x-cmd.bat; Fish/Nushell users should refer to official guides.

Use Cases#

  • AI Agent Shell Enhancement: Instant tool empowerment for Claude Code, Codex, etc.
  • Minimal Environment Deployment: Zero-config operation in BusyBox, Alpine, Docker containers
  • Cross-Platform Consistency: Unified CLI experience across Linux/macOS/Windows
  • System Operations: Enhanced docker, ps, top, df with TUI and structured output
  • Quick Information Lookup: x tldr, x rfc, x wkp for docs and specs
  • Notification Integration: Feishu, DingTalk, Telegram, Discord, WeChat messaging

Unverified Claims#

  • Exact first release date unclear; official site mentions "5 years of shell best practices"
  • Full contributor count requires GitHub Insights
  • AWS/Aliyun ECS modules marked WIP with unknown completion status
  • Complete 600+ package list requires running x env ll
  • "Pure shell agent < 2MB comparable to OpenClaw and Claude Code" is a project claim without independent third-party benchmarks

Related Projects

View All arrow_forward

STAY UPDATED

Get the latest AI tools and trends delivered straight to your inbox. No spam, just intelligence.

rocket_launch