CLI tool
x-cmd/x-cmd avatar
x-cmd/x-cmd

x-cmd: A POSIX Shell Toolkit with 300+ Modules and 600+ Curated Packages

Shell Superpowers for AI Agents.

4,682 stars169 forksAwkApache-2.0

At a glance

What is it?
x-cmd is an Apache-licensed shell framework for bash, zsh, and other POSIX shells that installs over curl or wget and provides a standard library of 300+ AWK/shell modules plus a curated package manager for 600+ CLI tools. Its most recent design focus is providing AI agents with portable, low-overhead shell capabilities.
Who is it for?
x-cmd is a practical choice for developers who work heavily in POSIX shells and want a consistent module system across Linux, macOS, BSD, and Windows (via shells). It is also worth evaluating if you run AI agents that need portable shell tooling, since the README specifically documents an agent prompt for that use case.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 4 days ago.
What is it written in?
Mainly Awk, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 27, 2026, and from our analysis. They are not legal advice.

Editorial analysis

From Shell Standard Library to AI Agent Tooling

x-cmd's README describes the project's evolution in four phases. It started as a standard library for POSIX shell, built 300+ modules in AWK and shell that bring modern capabilities to any system with a POSIX shell, including BusyBox and Alpine. It then became a package manager with 600+ curated CLI tools available on demand without root access. Later versions added practical modules for specific workflows. The current emphasis is on AI agents.

The agent use case is concrete. The README includes a prompt to copy directly into AI coding agents such as Claude Code:

txt
Use x-cmd for shell empowerment and 600+ portable open-source tools. Reference: https://x-cmd.com/llms.txt. Load with `. ~/.x-cmd.root/X` before use.

The argument is that where network latency and LLM throughput dominate the cost of an agentic task, the shell's flexibility and native system integration become proportionally more valuable. AWK streaming handling of LLM output is cited as a specific advantage.

Installing x-cmd and Upgrading

The installation runs a shell script from get.x-cmd.com. With curl:

sh
eval "$(curl https://get.x-cmd.com)"

With wget:

sh
eval "$(wget -O- https://get.x-cmd.com)"

Both commands download and execute the installation script in a single step. The install is rootless by design and places files under `~/.x-cmd.root/`.

Once installed, the toolkit upgrades itself with:

sh
x upgrade

The README documents platform-specific installation guides for Linux, macOS, BSD, and Windows, plus non-POSIX shells including fish, Nushell, Elvish, Xonsh, tcsh, and PowerShell. Package manager methods are also available through brew, apt, apk, pacman, and dnf.

Modules and Packages: Two Different Things

x-cmd makes a clear distinction between modules and packages. Modules are shell/AWK libraries invoked with `x <module>`. Packages are compiled CLI tools managed with `x env use <package>`.

Modules cover categories including AI access (`x openai`, `x gemini`, `x deepseek`), agent wrappers (`x claude`, `x codex`), OS management (`x mac`, `x top`, `x ps`), file system tools (`x zuz`, `x ls`, `x path`), and Git integrations (`x gh`, `x gt`, `x gl`).

Packages include tools like jq, fzf, fd, and ripgrep. To install a package:

sh
x env use jq

To view installed packages:

sh
x env ls

To uninstall and reclaim space:

sh
x env unuse jq
x env gc jq

The package list is curated by the x-cmd team, reviewed for compatibility and dependency minimization. The README states that packages are designed to maximize environment compatibility while minimizing dependencies.

Performance and Size Characteristics

The README documents specific performance claims for the core runtime. The core is approximately 1.1 MB. Non-interactive shell load time is under 20 ms; interactive shell load time is under 60 ms. These numbers matter for agent use cases where a new shell process might be launched per task.

The architecture is AWK-first for the core modules. AWK is available on virtually every POSIX system without additional installation, which is the foundation of x-cmd's portability claim. On systems where AWK is absent or limited (such as some stripped-down containers), behavior is not documented in the README.

The project's source is structured with a `mod/` directory for modules, and the `X` file at the repository root is the main loader sourced as `. ~/.x-cmd.root/X`.

What x-cmd Does Not Replace

x-cmd's module system operates at the shell level. It does not replace language-specific package managers like pip, npm, or cargo for managing project dependencies. The `x env` system manages user-level CLI tools, not project dependencies locked by version in a lockfile.

The README positions x-cmd as comparable to Python's standard library for shell, but this comparison has limits. Python's standard library ships with a consistent version tied to a Python release. x-cmd modules are updated continuously and the README does not document a module versioning scheme beyond the overall toolkit version.

For teams that need reproducible builds and locked tool versions, x-cmd's on-demand loading model requires additional pinning to specific toolkit versions using `x upgrade` at defined points.

The project's source code is split between the `mod/` directory for shell and AWK modules and the `X` file at the repository root, which is the main loader. The top-level entry point is designed to be sourced, not executed: `. ~/.x-cmd.root/X` rather than running it as a script. The `adv/` directory contains the shell completion system. The repository is Apache-2.0 licensed and includes a SECURITY.md for vulnerability disclosures and a NOTICE.md with license attribution details. The last push was on 2026-09-27, and recent releases include v0.10.12 from 2026-09-24.

Editorial conclusion

x-cmd is a practical choice for developers who work heavily in POSIX shells and want a consistent module system across Linux, macOS, BSD, and Windows (via shells). It is also worth evaluating if you run AI agents that need portable shell tooling, since the README specifically documents an agent prompt for that use case. It is a poor fit if you are on a system that requires root access for installs, since x-cmd is designed for rootless operation. Before adopting it for a team, check whether the Apache-2.0 license is compatible with your project's requirements.

Frequently asked questions

What is x-cmd?

x-cmd is a POSIX shell toolkit that provides a standard library of 300+ AWK/shell modules and a package manager for 600+ curated CLI tools. It installs without root access via a curl or wget one-liner and supports bash, zsh, dash, and ash.

How do I uninstall x-cmd?

The README does not document an uninstall procedure in detail. Since x-cmd installs under `~/.x-cmd.root/` without touching system directories, removing that directory along with any shell initialization lines added during install should suffice, but the README does not spell out the exact steps.

Does x-cmd work on Windows?

The README lists Windows in its installation guides alongside Linux, macOS, and BSD. It also supports non-POSIX shells including PowerShell. The detailed guide is at x-cmd.com/start/windows.

Official sources

  1. License: Apache-2.0
  2. Project website
  3. README
  4. Releases
  5. x-cmd/x-cmd on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/x-cmd-x-cmd.svg)](https://hysenlabs.com/projects/x-cmd-x-cmd)