X Cmd

X Cmd (X-CMD): shell superpowers for AI agents — 100+ modules, 1,000+ CLI tools, POSIX shell.

Last verified:

Visit X Cmd

What is X Cmd?

X Cmd (X-CMD) is a modular command-line toolkit and POSIX Shell library designed to make shell as powerful as Python's standard library. X Cmd provides 100+ modules and access to 1,000+ CLI tools in seconds through its built-in lightweight package manager, written primarily in POSIX Shell and AWK for portability across bash, zsh, ash, and dash.

X Cmd includes enhanced versions of traditional commands (x ls, x ps, x docker with interactive TUI), on-demand installation of 570+ tools including jq, yq, fd, bat, eza, and language runtimes, plus CLI modules for cloud and AI services (GitHub, GitLab, OpenAI, Gemini, Mistral, AWS, Cloudflare), fzf-based interactive UI-ization, and LLM integration for command-line workflows. Open-source under Apache 2.0, no root required, 1.1 MB core, compatible with Linux, macOS, and Windows including Alpine and BusyBox — and positioned as a best buddy for AI agents, giving assistants 1,000+ CLI insights.

X Cmd pricing

Pricing model: Freemium

X-CMD core tool is completely free and open-source under Apache 2.0 license with no paid plans for the main toolkit. The lightweight package manager and all 570+ tools are free. There is a separate Hub service (hub.x-cmd.com) with pricing tiers: Free tier at $0 for experience/trial/getting started, Starter tier at $5/month for personal/light automation/full experience, and Pro tier for agent/workflow/long-running use cases. The Hub service facilitates quick script publishing and deployment for users and teams.

X Cmd pros

  • Open-source under Apache 2.0 license
  • No root privilege required for installation
  • Extremely lightweight core size of 1.1 MB
  • 1000+ CLI tools available in seconds
  • 570+ tools in package manager including jq, yq, fd, bat
  • Works on Linux, macOS, Windows, BusyBox, and Alpine
  • Compatible with bash, zsh, ash, dash, fish, and more
  • On-demand tool download without manual installation
  • Interactive TUI with fzf integration for tools like x jq
  • CLI modules for GitHub, GitLab, Gitee, Codeberg
  • AI integration with OpenAI, Gemini, Mistral, Kimi
  • Cloud service CLI for AWS, Aliyun, Cloudflare, BandwagonHost
  • Shorter aliases like img for image and xd for x docker
  • Enhanced visualization for ps, docker, and other commands
  • Language runtime switching for Python, Node, Java, Perl, Go
  • Transparent shell/awk code easy to audit and modify
  • Best buddy for AI agents with 1000+ CLI insights
  • Network resources hosted in China and internationally

X Cmd cons

  • Library backward compatibility not guaranteed before v1
  • Does not cover all features of native commands
  • Cannot fully replicate stability of system-installed commands
  • Not recommended to use as library before v1 release
  • Some cloud CLI modules marked as WIP not fully tested
  • Hub service for script publishing not yet released
  • WS project environment module still in integration
  • Focus on common 20% of features not complete replication

Frequently asked questions about X Cmd

What is X-CMD?

X-CMD is an open-source, extensive command-line toolkit primarily functioning as a POSIX Shell library with a built-in package manager. It provides over 100 modules and enables access to 1000+ CLI tools in seconds. Written in POSIX Shell and AWK, it enhances traditional commands, offers on-demand tool installation, and provides CLI access to cloud services and AI APIs.

How do I install X-CMD?

The quickest installation method is using the official script: eval "$(curl https://get.x-cmd.com)". Alternatively, use wget: eval "$(wget -O- https://get.x-cmd.com)". It can also be installed via Homebrew (brew install x-cmd), AUR (sudo yay -S x-cmd), or system package managers like apt, apk, pacman, dnf. No root privilege is required.

Why is X-CMD written in Shell/AWK instead of Rust/Go?

Shell/AWK is pre-installed on almost all systems, has faster startup time than Python/Node/JS, and offers better compatibility on musl-based Linux. For tools like tping, the bottleneck is network connection speed, not data processing. Shell/awk code is also more transparent and easier to audit than binary files. X-CMD uses a multilingual strategy when needed, downloading Deno/Node/binaries as appropriate.

Does X-CMD replace native commands like docker or git?

No, X-CMD enhances rather than replaces native commands. It focuses on improving the experience of commonly used features (roughly 20%) with shorter aliases, richer visualizations, and interactive TUI. For scripting scenarios, native commands remain preferred for reliability. x docker and docker are distinct tools that collaborate rather than one replacing the other.

How many tools does X-CMD support?

X-CMD provides access to 1000+ command-line tools in seconds. The package manager currently includes approximately 570 tools including common CLI tools (jq, busybox, ffmpeg, sqlite, mysql), modern tools (yq, exa/eza, duf, bat), and programming language runtimes (Python, Perl, Node, Java). More tools continue to be added.

Is X-CMD compatible with Windows?

Yes, X-CMD is compatible with Windows, Linux, and macOS. On Windows, installation can be done via the x-cmd.bat batch script (double-click to run) or PowerShell using Invoke-WebRequest. It works with PowerShell, Nushell, Elvish, Xonsh, fish, and tcsh in addition to bash and zsh.

How does X-CMD integrate with AI agents?

X-CMD is designed as the 'best buddy for AI agents.' Users can send a prompt to AI assistants like Clawdbot, Claude Code, Codex, Gemini CLI, or Kimi Code referencing https://x-cmd.com/llms.txt to unlock 1000+ CLI insights. The x claw module listens for IM messages and triggers local AI Agents to execute autonomous tasks.

What is the x pkg module?

x pkg is X-CMD's lightweight package manager that installs and manages tools without root access. It handles common CLI tools (jq, ffmpeg, sqlite), modern tools (yq, bat, eza), language runtimes (Python, Node, Java, Perl), and applications built on these runtimes. Tools are downloaded on-demand and ready to use immediately.

How do I upgrade X-CMD?

Run the command 'x upgrade' to upgrade X-CMD to the latest version. Alternatively, you can run the installation script again: eval "$(curl https://get.x-cmd.com)". The current version is v0.9.5.

What cloud services and AI APIs does X-CMD support?

X-CMD provides CLI modules for Git services (GitHub via x gh, GitLab via x gl, Gitee via x gt, Codeberg via x cb, Forgejo, Gitea), AI services (OpenAI via @gpt, Gemini via @gemini, Kimi via @kimi, Mistral via @mistral, Jina, Whisper, Ollama), and cloud services (AWS via x aws, Aliyun via x ali, Cloudflare, BandwagonHost via x bwh, Shodan via x shodan).

Categories

Use cases

Browse all AI tools on NeedAnAI