Installation
brew install cablehead/tap/cross-streamOptionally start the store as a background service. This creates a store at the default location that xs.nu commands will use automatically:
brew services start cablehead/tap/cross-streameget downloads prebuilt binaries from GitHub releases. We use dagger to run pipelines that generate binaries for macOS (ARM64), Linux (AMD64), and Linux (ARM64). See our build pipeline if you’re interested in adding more platforms.
If you don’t have eget yet:
curl https://zyedidia.github.io/eget.sh | shThen install xs:
eget cablehead/xscargo install cross-stream --lockedRun xs in a container with a pre-built image:
docker pull ghcr.io/cablehead/xs:latestStart a container with a persistent store:
docker run -d --init --name cross-stream -p 3021:3021 -v xs-store:/app/store ghcr.io/cablehead/xs:latestThe container exposes the HTTP API on port 3021. You can connect to the store in several ways:
Using curl for HTTP API access:
curl http://localhost:3021/Or run commands directly inside the container:
docker exec cross-stream xs cat /app/storeFor an interactive Nushell session with xs.nu commands available:
docker exec -it cross-stream nuYou can now run xs.nu commands like:
.catInstall directly using the xs flake:
nix profile install github:cablehead/xsOr use the development shell with all Rust tooling, the xs executable, and Nushell pre-configured:
nix develop github:cablehead/xsThis starts an interactive Nushell session with the xs command and xs.nu commands available. Press Ctrl+D or type exit to return to your previous shell.
For bash users who prefer not to auto-start Nushell:
nix develop github:cablehead/xs#bashThis provides the same xs executable and Rust tooling without auto-starting Nushell.
You can also add xs to your own flake:
{ inputs.xs.url = "github:cablehead/xs";
outputs = { self, nixpkgs, xs }: { # Use xs.packages.${system}.default };}Verifying Installation
For most installation methods:
xs --versionFor Docker installations, verify the container is running:
curl http://localhost:3021/versionImport xs.nu
If you’ve never used Nushell before, you’re in for a treat. Visit the
Nushell site to install it, then install the xs.nu helper module:
xs nu --installThis copies xs.nu into your Nushell scripts directory and creates an
autoload stub so the commands are available in every session. You can also run
xs nu without options to print the module contents and install it manually.
After installation, import the module:
use xs.nu *The commands default to working with a store at ~/.local/share/cross.stream/store.
You can point commands at another location by setting $env.XS_ADDR.
For quick, ad-hoc changes use with-env:
with-env {XS_ADDR: "./store"} { .cat }The xs command-line tool still requires the store path to be specified
explicitly (for example xs serve ./store).
Troubleshooting
- Need help? Join our Discord