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

x-cmd: A POSIX Shell Toolkit With an On-Demand Package Layer

Shell Superpowers for AI Agents.

4,655 stars165 forksAwkApache-2.0

At a glance

What is it?
x-cmd bundles 300+ shell and awk modules with a curated package system for 600+ CLI tools, and now pitches itself as the runtime for AI agents. It is genuinely portable and genuinely unusual, but the package layer is a second dependency surface you have to accept.
Who is it for?
Adopt x-cmd if you work across bash, zsh, dash and ash on machines where you cannot install packages system-wide, and you accept that x env pulls tools from a curated registry rather than your distro. Do not adopt it if your environment is locked to a single package manager with signed artifacts, or if you need a supply-chain story for every binary on the box.
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 8 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 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The gap x-cmd is aiming at: shell without a standard library

POSIX shell has no package manager, no standard library, and no consistent way to get a modern tool onto a machine that is not yours. The README frames the project's origin as an attempt to build "a standard library for shell", making shell comparable to Python's standard library. That is a large claim, but the shape of the problem is real. If you write a script that needs JSON parsing, a fuzzy finder or a modern grep, your options are to vendor binaries, assume root, or assume a specific distro. x-cmd's answer is two layers: modules written in shell and awk that run on any POSIX shell including BusyBox, Alpine and legacy machines, and a separate package system for the cases where POSIX is not enough. The intended audience is engineers who move between machines and cannot rely on what is preinstalled, plus, per the project's own framing, AI agents that need command-line capability without a heavy runtime.

Two layers: x <module> versus x env for packages

The distinction between modules and packages is the part worth understanding before installing anything. Modules are invoked as x <module> and the README describes them as 300+ shell and awk libraries, listing theme, advise, openai and gemini as examples. Packages are invoked as x <tool> or x env use <tool>, and the README describes them as 600+ curated CLI tools including jq, fzf, node and python. The package layer is managed by the env module. The README's own comparison table maps modules to JavaScript libraries and packages to WebAssembly, which is a loose analogy but captures the intent: modules are code that runs in your shell, packages are external binaries fetched on demand. The README states the core is about 1.1 MB, with non-interactive load under 20 ms and interactive load under 60 ms. Those are the project's figures, not measurements I can confirm. The claim that matters more is structural: no root and no system pollution, meaning tools land somewhere under the user's control rather than in /usr/local/bin.

Installing it and the line you add to your shell

Installation is a single eval of a remote script. The README gives two forms, one for curl and one for wget:

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

It states this works in bash, zsh, dash and ash, with separate documented paths for fish, Nushell, Elvish, Xonsh, tcsh and PowerShell, and for Homebrew, AUR, apt, apk, pacman and dnf. Upgrades run through x upgrade. For agent use, the README suggests sending a prompt that tells the agent to load the environment with `. ~/.x-cmd.root/X` before use, and points at https://x-cmd.com/llms.txt as the reference. That dot-sourcing line is the mechanism to note: it is how a non-interactive shell, such as one spawned by an agent or a CI step, gets access to the x command and the packages x env has installed. If a script works in your terminal but fails under an agent, the missing source line is the first thing to check.

Where this design gets awkward

The package layer is a second dependency surface, and the README is explicit that it is curated by the project's team rather than by your distribution. That is the trade. On one side, you get jq, fzf, fd and ripgrep on a machine where you cannot run apt, and you get them without root. On the other side, you have introduced a registry that is not your distro's, with its own review process, its own download path, and its own update cadence independent of x upgrade. Nothing in the supplied material describes signature verification, mirror pinning or an offline install path for x env, so treat those as open questions rather than solved ones. The awk-heavy implementation is also a constraint in itself: it is what makes the POSIX portability claim credible, and it is also why contributors face a narrower skill pool than a Go or Rust CLI would attract. The release cadence in the supplied data, three releases in the first week of September 2026, suggests active churn; whether that is a benefit or a stability concern depends on how tightly you pin.

How it differs from a plain package manager or a dotfiles framework

The obvious comparison is a system package manager, and the difference is not speed, it is the permission model. apt, apk, pacman and dnf install into system paths and generally want elevated privileges; x env installs user-side and per-environment, which is why the README can claim no system pollution. The second comparison is a dotfiles or shell framework that manages configuration. Those typically ship functions and aliases and leave binary acquisition to you. x-cmd instead bundles both, which is the reason the two-layer split exists in the first place. A third comparison, which the README invites directly, is against heavier agent runtimes: it claims a pure-shell agent under 2 MB with capabilities comparable to OpenClaw and Claude Code. I cannot verify that comparison from the material, and capability parity between a shell agent and a full coding agent is exactly the kind of claim that needs independent testing before you build on it. What is verifiable is the footprint difference and the fact that x-cmd needs only shell plus curl to reach OpenAI, Gemini, DeepSeek, Zhipu and MiniMax.

Maintenance, licensing and what to check before rollout

x-cmd is Apache-2.0, which permits commercial and private use and includes an explicit patent grant, with the usual obligations around preserving notices and stating changes. That is a permissive licence and not a barrier for most teams; it is not legal advice, and if you redistribute modified modules you should read the licence text rather than this summary. Maintenance cost splits along the same two-layer line. The x upgrade command handles the toolkit itself, so that side is a single command. The package side is the ongoing work: every tool fetched through x env is a binary you now track, and the README does not describe a lockfile or a pinned-version manifest, so reproducibility across machines is something you would have to establish yourself. Before rolling this out beyond one machine, install it in a container, inspect which shell startup file the installer modifies, and check where x env writes downloaded tools and whether that directory is backed up or wiped on rebuild.

Editorial conclusion

Adopt x-cmd if you work across bash, zsh, dash and ash on machines where you cannot install packages system-wide, and you accept that x env pulls tools from a curated registry rather than your distro. Do not adopt it if your environment is locked to a single package manager with signed artifacts, or if you need a supply-chain story for every binary on the box. Before committing, run the installer in a throwaway container, check which shell startup file it edits, and confirm where x env places downloaded tools on disk.

Official sources

  1. License: Apache-2.0
  2. Project website
  3. README
  4. Releases
  5. x-cmd/x-cmd on GitHub
Community notes

Community notes