Have you ever found yourself on a system that's lacking the necessary tools? Maybe it was a rescue or installation environment, an unfamiliar system you were repairing, or a Docker container you were debugging. If you've used Linux for a while, you've likely encountered these scenarios, and installing the required tools can be a hassle when all you want is to finish the job. That's where a convenient toolkit becomes a lifesaver, and I have one that fits the bill perfectly.

X-cmd describes itself in many ways, but at its core, it's portable, convenient, and hassle-free. In keeping with that spirit, you can deploy it to any system with a simple curl command:

curl https://get.x-cmd.com | sh

After that, execute the following command for your particular shell:

x <shell-name> --setup

X-cmd is lightweight and automatically locates and installs any missing commands or dependencies. It provides access to over 500 third-party tools, installs them in a private environment, and keeps the system free from pollution. It runs entirely from your home directory (~/.x-cmd), requires no special privileges, and offers many other benefits.

Modules: Command augmentation and quality of life features

Baby steps

X-cmd modules are a suite of augmented commands, some built directly into the core distribution, others available on demand. Examples include x choco (for Chocolately), x brew (for Homebrew), x fzf, and x jq, among others. These modules enhance the original commands with shell and awk code, offering additional utility and features. The distribution comes with over 300 bundled modules, each with enhanced capabilities.

You can view available modules with x help:

A terminal window displays a three-column help menu. The left column lists modules, the middle shows subcommands, and the right shows documentation.

Or by visiting the website:

A browser window shows the x-cmd website. The sidebar lists available modules, and the main content displays the X LS command documentation.-1

Command augmentation has one simple aim: quality of life improvements. For instance, it extends the ls command to offer preview panes for each directory you visit, providing a comprehensive view of the directory structure as you go.

A terminal window displays a browsable file explorer. It shows a multi-column view of directories and files with metadata for the selected file.

You can navigate these directories using Vim keymaps, which feels like a lightweight terminal-based file manager.

Another example of augmentation is a convenient fuzzy selector for the tldr command:

A terminal window displays a fuzzy finder for tldr pages. A search query filters results on the left, and the selected page is previewed on the right.

Or a fuzzy selector for the ps command:

A terminal window displays a fuzzy finder for running processes. It shows a table with columns for user, PID, CPU, memory, and command.

Fuzzy selectors everywhere, I say. These are much-needed improvements and always welcome.

In addition, some of the commands allow you to produce JSON from the output, like ps:

A terminal window displays json output from the x PS command. Each line shows a process object with fields such as user, PID, CPU, and command.

JSON is more structured than plain text and is very suitable for pipeline processing, which is something you're probably interested in, given the administrative nature of x-cmd.

While command augmentations may seem intrusive, x-cmd functions as a namespace for the commands it "wraps." For example, you'll need to prefix your augmented commands with "x," such as x ls. The binaries also reside in ~/.x-cmd—separate from your primary system. This approach ensures that existing binaries on your PATH remain free from interference, making it easy to reverse all system changes with a simple rm command.

A toolkit like this wouldn't be very useful if it didn't facilitate installation, and x-cmd does exactly that. If the necessary binaries aren't already on your system, they'll be downloaded automatically. This applies to both modules and packages (which we'll cover next).

Packages: Any tool, anywhere

Add any tool to your toolkit

While modules are interesting and useful, the packages I feel provide the most benefit. I won't beat around the bush, and in simple terms, x pkg is a package manager that allows you to install over 500 tools with no need for root privileges. There are hundreds of non-standard commands like procs, socat, bandwhich, yq, and jq. It also includes language-specific tools such as Lua and Python, and even AI-powered applications like Claude Code and Codex. To use any of these, prefix them with "x," for instance: x foo.

On top of the namespace approach (x foo), there are two other installation modes that may interest you. The first allows you to try a command, giving you direct access to it as if it were natively installed. To demo this, execute x env try jq, and it'll install jq and then update the local shell's PATH. This enables you to run it directly (without the "x" prefix)—but only until you exit the current shell. To make it permanent, execute x env use jq, and it becomes available to all other shells permanently.

The magic of permanence occurs because the initial x-cmd installation step modifies your shell environment: x-cmd [your-shell] --setup.

Don't neglect x-cmd

There are too many modules to cover to do x-cmd justice. You may dismiss x-cmd because augmenting the ps or fzf commands doesn't sound impressive, but it offers hundreds of augmentations; for example, I didn't cover the Docker, Git, cloud, or developer-focused modules. If you require an extensive toolkit at hand and often find yourself in an environment that's lacking, x-cmd makes many powerful tools available, without fuss or leaving a mess.

If a toolkit isn't what you want because you manage a single computer, then modules still provide hundreds of useful augmentations that are worth exploring.

I also didn't mention the AI integration or sandboxing features, but x-cmd allows you to control your system through AI-generated commands. That may sound like insanity to some, but it's why the sandboxing feature exists.

X-cmd has many features to explore, and if you're interested, visit their installation page for instructions and run the provided curl command to get started. If not, you can check out my UBI guide to install it directly from GitHub.