cross.stream / docs
GitHub Discord

Installation

# Homebrew now asks you to trust a third-party tap before installing from it
brew trust --formula cablehead/tap/cross-stream
# or if you use a few of cablehead's projects, and trust me 😆, the whole tap
# brew trust cablehead/tap
brew install cablehead/tap/cross-stream

Optionally 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-stream

eget 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 | sh

Then install xs:

eget cablehead/xs

mise installs the same prebuilt binaries from GitHub releases:

mise use -g github:cablehead/xs

Without -g, it pins xs in the current project's mise.toml instead.

Works on Linux, macOS, and Windows.

For fast installation using pre-built binaries:

cargo binstall cross-stream

Or build from source:

cargo install cross-stream --locked

Run xs in a container with a pre-built image:

docker pull ghcr.io/cablehead/xs:latest

Start 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:latest

The 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/store

For an interactive Nushell session with xs.nu commands available:

docker exec -it cross-stream nu

You can now run xs.nu commands like:

.cat

Install directly using the xs flake:

nix profile install github:cablehead/xs

Or use the development shell with all Rust tooling, the xs executable, and Nushell pre-configured:

nix develop github:cablehead/xs

This 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#bash

This 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 --version

For Docker installations, verify the container is running:

curl http://localhost:3021/version

Import xs.nu

optional

xs is designed to be orchestrated with Nushell, but it also works great with any POSIX shell, so this step is optional.

For Docker installations, this is already done for you.

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 --install

This 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