x-cmd separates modules from packages, and only one of the two is written in shell
Shell Superpowers for AI Agents.
At a glance
- What is it?
- X-CMD is a POSIX shell toolkit that splits into 300 plus shell and awk modules and 600 plus curated CLI packages. The distinction matters: one half runs anywhere, the other half downloads binaries on demand.
- Who is it for?
- Use x-cmd if you work on machines where you cannot install a modern CLI, or if you want an agent to reach many tools through one consistent `x` prefix on a BusyBox box or an Alpine container. Do not use it if you want a hermetic environment, since the package system deliberately writes into your home directory with no root and no system pollution, which also means nothing is isolated from your user account.
- 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 16 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 November 15, 2026, and from our analysis. They are not legal advice.
Star history
- x-cmd/x-cmd4,753 ★ · +104
| Repository | 2026-09-12 | 2026-11-15 |
|---|---|---|
| x-cmd/x-cmd | 4.6k | 4.8k |
104 Stars in the last 64 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The eval installer sources a remote script into your current shell
Installation is one line, and it is worth reading what that line does before running it.
eval "$(curl https://get.x-cmd.com)"The `eval` is the part to notice. The command substitution fetches a script over the network and hands it straight to the shell as commands, so nothing lands on disk first and there is nothing to inspect. If you prefer wget, the equivalent is also provided.
eval "$(wget -O- https://get.x-cmd.com)"Both routes target the same host, `get.x-cmd.com`, and the README links the installation script to a separate `x-cmd/get` repository. The README names the shells this works in: bash, zsh, dash and ash.
Shells outside that list get their own guides rather than being dropped. There is a separate page each for fish, Nushell, Elvish, Xonsh, tcsh and PowerShell, and platform pages for Linux, macOS, Windows and BSD. There are also package manager routes through brew, aur, apt, apk, pacman and dnf, which is the route to prefer if your machine already has a package manager and you would rather not curl a shell script.
Upgrading is a subcommand rather than a reinstall.
x upgradeModules are shell and awk, packages are third-party binaries, and the two are invoked differently
The single most useful thing to understand about x-cmd is that it is two systems sharing one command name.
Modules are the project's own work: 300+ libraries written in shell and awk, invoked as `x <module>`. The analogy the project draws is JavaScript libraries. Modules cover agent launchers, AI providers, OS and process management, file system and storage, git and package managers.
Packages are 600+ curated modern CLI tools, jq, fzf, fd, ripgrep among them, reviewed and packaged by the project's team. The analogy offered is WebAssembly. They are invoked as `x <tool>`, or installed into the environment with `x env use <tool>`.
That difference is not cosmetic. A module is shell code that runs on a BusyBox box with nothing installed. A package is a compiled binary the project downloads on demand, which means the module half inherits POSIX and the package half inherits whatever the target machine can execute.
The reason the package layer exists at all is compatibility. Rather than asking you to install jq through a package manager, x-cmd fetches a reviewed build when you first use it. The stated properties are lightweight download, on-demand loading, no root and no system pollution.
So the honest summary is that a module such as `x cd` works anywhere a POSIX shell runs, while `x fzf` requires a machine that can run the fzf binary.
The env module owns installs, uninstalls and garbage collection
Every package operation goes through one module, `env`, and the subcommand set is small enough to remember.
x env
x env ls
x env unuse
x env gc`x env` on its own opens an interactive view of the installable packages. `x env ls` lists what is already installed. `x env use <package>` installs one. `x env unuse <package>` uninstalls it, and `x env gc <package>` reclaims the space.
That split between uninstall and garbage collect is the design decision worth noting. Removing a package from the active environment and reclaiming its bytes on disk are treated as two operations, which means `x env unuse` alone can leave something behind that `x env gc` is there to clean.
Where those files go matters for anyone with a disk quota or a shared home directory. The installation prompt given to AI agents loads with `. ~/.x-cmd.root/X`, so the tool's root lives under the home directory rather than under a system path. The stated figures are a core of roughly 1.1 MB, a non-interactive load under 20 ms and an interactive load under 60 ms, with the pure-shell agent itself under 2 MB.
Packages accumulate, which is why `gc` exists as a first-class command rather than an afterthought.
AWK does the streaming work, which is why an LLM CLI is a natural fit
The primary language of the repository is Awk, and the project's own explanation is about streaming rather than about text processing.
The stated argument is that after five years they found shell's sweet spot to be AI agents, because in that setting network latency and LLM throughput dominate. Where those dominate, shell's flexibility, native system integration and tool chaining pay off, and awk handles streaming output well.
That is a coherent reason. An LLM command produces output incrementally, line by line, over a network connection, and awk is good at transforming a stream without holding it in memory. The same property that makes awk awkward for record processing makes it right for piping a model's response through a formatter, a filter or a rewriter.
The AI-facing modules reflect the same idea. Agent launchers are `x claude`, `x codex` and `x opencode`. Model providers are `x openai`, `x gemini` and `x deepseek`, with Zhipu and MiniMax also named. The claim is that with just shell plus curl you can reach those providers, which is a low bar on purpose: curl is the only hard requirement for an HTTP call.
Worth holding lightly is the comparison to other coding agents made in the README. Treat it as the project's framing of its own scope rather than a measured claim.
Cross-shell themes, completions and githook exist because POSIX shells leave gaps
Several modules exist to paper over differences between shells rather than to add new capability.
`theme` handles cross-shell themes, which is a real problem when your .bashrc and your .zshrc drift apart. `advise` provides completions for more than six shells. `githook` is described as a husky alternative, meaning it installs hooks without the Node dependency husky pulls in.
The rest are situational. `free` is for macOS missing commands. `ccal` is a Chinese calendar. `weixin` is WeChat integration. Each is a small domain wrapper rather than part of a coherent whole.
The module catalogue is grouped the same way in the README. Agent and AI modules sit together, then OS management with `x mac`, `x cd`, `x top` and `x ps`, then file system and storage with `x zuz`, `x ls`, `x path` and `x df`, then git with `x gh`, `x gt`, `x gl` and `x cb`, then package managers with `x env`, `x install`, `x brew` and `x apt`.
Those overlapping names are the practical friction. `x ls` and `x cd` shadow commands you already have, `x brew` and `x apt` exist alongside system `brew` and `apt`, and `x env` is both a module and the package manager entry point. Nothing is broken by this.
The project hands agents a URL instead of documentation, and expects them to curl it
There is a section of the README written for the agent rather than the human, which is unusual enough to quote directly.
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 pattern is a single prompt line that points at an `llms.txt` file. Nothing is bundled into the prompt; the agent is expected to fetch the reference at runtime and source the shell file from `~/.x-cmd.root/X` before running anything.
That works because the deliverable is a shell function set, so loading it is a source operation rather than a binary invocation. It also means the agent's knowledge of the 600+ packages depends on a network fetch succeeding at that moment.
The licensing arrangement is worth noting for anyone planning to redistribute. The repository carries `LICENSE.txt`, a `LICENSES/` directory and a `NOTICE.md`, and the declared licence is Apache-2.0. A `LICENSES/` directory alongside a single root license file is the convention used when a repository ships code under more than one licence, and with 600+ packaged third-party tools that is a plausible arrangement rather than a surprise.
Other files at the root include `SECURITY.md`, `CODE_OF_CONDUCT.md`, a `.x-cmd/` directory, `adv/`, `mod/`, and an `X` file that is the entry point the sourcing line refers to.
Editorial conclusion
Use x-cmd if you work on machines where you cannot install a modern CLI, or if you want an agent to reach many tools through one consistent `x` prefix on a BusyBox box or an Alpine container. Do not use it if you want a hermetic environment, since the package system deliberately writes into your home directory with no root and no system pollution, which also means nothing is isolated from your user account. Verify first that your shell is one of bash, zsh, ash or dash, since fish, Nushell, Elvish, Xonsh, tcsh and PowerShell each need a separate installation route rather than the eval line.
Frequently asked questions
What is x-cmd?
X-CMD is a modern toolkit for POSIX shell, covering bash, zsh, ash and dash, and it is described as making shell as powerful as Python's standard library. It is split into 300+ modules written in shell and awk, invoked as `x <module>`, and 600+ curated CLI packages invoked as `x <tool>`.
How do I install x-cmd?
Run the official installation script in a common POSIX shell: `eval "$(curl https://get.x-cmd.com)"`, or `eval "$(wget -O- https://get.x-cmd.com)"`. fish, Nushell, Elvish, Xonsh, tcsh and PowerShell each have a separate installation guide, and package manager routes exist for brew, aur, apt, apk, pacman and dnf.
How do I manage x-cmd packages?
The `env` module handles it. `x env` opens an interactive view of installable packages, `x env ls` lists installed ones, `x env use <package>` installs, `x env unuse <package>` uninstalls, and `x env gc <package>` reclaims the space. Packages load on demand and are installed without root.
Does x-cmd work on Windows and on shells other than bash?
There are separate installation guides for Windows and for BSD, plus guides for each non-POSIX shell including fish, Nushell, Elvish, Xonsh, tcsh and PowerShell. The single eval line is for bash, zsh, dash and ash, so the other shells need their own route rather than that command.
Official sources
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.
[](https://hysenlabs.com/projects/x-cmd-x-cmd)Star history chart for your README
[](https://hysenlabs.com/projects/x-cmd-x-cmd)Was this useful?