llms.txt Content
# X-CMD
> X-CMD is a POSIX shell toolkit: 333+ modules, 500+ portable packages, 1200+ software installation recipes.
## 1. Installation & Setup
### Installation
**Quick install (Linux/macOS/BSD/Windows WSL/GitBash, bash/zsh):**
- curl: `eval "$(curl https://get.x-cmd.com)"`
- wget: `eval "$(wget -O- https://get.x-cmd.com)"`
**Non-POSIX shells (Fish, Elvish, Nushell, xonsh, tcsh):**
- Fish docs: https://x-cmd.com/start/fish.md
- Elvish docs: https://x-cmd.com/start/elvish.md
- Nushell docs: https://x-cmd.com/start/nushell.md
- xonsh docs: https://x-cmd.com/start/xonsh.md
- tcsh docs: https://x-cmd.com/start/tcsh.md
**System package managers:**
- Homebrew: `brew install x-cmd`, then run `x-cmd` to activate
- AUR: `sudo yay -S x-cmd`, then run `x-cmd` to activate
**Windows PowerShell:**
- PowerShell docs: https://x-cmd.com/start/powershell.md
**Docker containers (minimal environments without curl/wget):**
- From host: `x docker run -x -it <container>` or `x docker setup <container>`
**Verify installation**: check `~/.x-cmd.root/X` and `~/.x-cmd.root/bin/x-cmd` exist.
**Update**: `x upgrade` or re-run the install script.
**Uninstall**: `x uninstall self`
### Loading & Fallback
1. **Load**: Before using `x` commands, run:
```sh
[ -f ~/.x-cmd.root/X ] || eval "$(curl https://get.x-cmd.com)"
. ~/.x-cmd.root/X
```
2. **Fallback**: If `x` is not available (non-persistent shell session), use standalone command `x-cmd <module> [args]` (located at `~/.x-cmd.root/bin/x-cmd`, no shell function loading required).
3. **Final Fallback**: If `x-cmd` is also not found, use absolute path: `~/.x-cmd.root/bin/x-cmd <module> [args]`
## 2. AI Usage Rules
- **Tool Availability**: `x <tool>` (e.g., `x jq`, `x python`) auto-detects whether the tool is installed; if missing, silently installs a portable version. Use when you need to ensure a tool is available.
- **Enhanced Modules**: Some modules provide enhanced functionality and behave differently from native