Installation
# Homebrew now asks you to trust a third-party tap before installing from it
# or if you use a few of cablehead's projects, and trust me 😆, the whole tap
# brew trust cablehead/tap
Optionally start the store as a background service. This creates a store at the default location that xs.nu commands will use automatically:
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:
|
Then install xs:
mise installs the same prebuilt binaries from GitHub releases:
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:
Or build from source:
Run xs in a container with a pre-built image:
Start a container with a persistent store:
The container exposes the HTTP API on port 3021. You can connect to the store in several ways:
Using curl for HTTP API access:
Or run commands directly inside the container:
For an interactive Nushell session with xs.nu commands available:
You can now run xs.nu commands like:
.cat
Install directly using the xs flake:
Or use the development shell with all Rust tooling, the xs executable, and Nushell pre-configured:
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:
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:
For Docker installations, verify the container is running:
Import xs.nu
optional
xsis 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:
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:
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