cross.stream / docs
GitHub Discord

xs docs

xs is an event stream store for personal, local-first use. New to it? Read Installation, then Your First Stream.

Getting Started

Start here: install xs, then append and read your first frames.

  • Installation Install cross.stream using cargo or homebrew
  • Your First Stream Create and interact with your first event stream
  • Core Concepts Understanding the fundamental concepts behind cross.stream's architecture and operation

Tutorials

Build something with xs, a step at a time.

  • Threaded Conversations A tutorial for using cross-stream to maintain threaded conversations with an LLM.
  • Integrating MCP Servers Learn how to interact with Model Context Protocol (MCP) servers directly and through cross.stream
  • Actor State Learn the streaming form of Nushell's generate command, then use the same closure shape to build a stateful actor on cross.stream.
  • Service Lifecycle Walk through the lifecycle of a cross.stream service, create, auto-restart, hot reload, terminate, and graceful shutdown.

How-to Guides

Recipes for a particular job.

  • TodoMVC with Datastar Learn to build reactive web apps using the hypermedia approach where backend drives UI updates via immediate mode HTML streaming
  • Undefine an action Remove an action so subsequent calls no longer execute it.
  • Hot-replace a script safely Replace an actor, service, or action's script while it's running and recover gracefully if the new version is broken.
  • Determine why a process stopped Decode the lifecycle frame an actor, service, or action emits when it stops, so you know whether it crashed, was terminated, was replaced, or is just waiting for xs to come back.

Explanation

Why xs works the way it does.

  • Architecture A technical overview of cross.stream's decoupled architecture, explaining how it separates event metadata and content storage to optimize stream processing and content retrieval
  • Lifecycle design Why xs uses a unified xs.<kind>.<name>.<event> vocabulary and how the compaction algorithm preserves system state across restarts.
  • Markdown as data Why the docs are plain Markdown, read as data and laid out by the server

Reference

Every command, option and built-in.

  • cli
  • xs.nu Nushell convenience functions that wrap the xs CLI with pipeline-friendly interfaces
  • Exposing Streams
  • Services How to use Nushell closures to spawn external processes and stream their output into cross.stream, with optional duplex communication
  • Actors Detailed reference for writing Nushell actors that react to frames, manage state, and emit new events
  • Actions Stateless, parallelizable operations that can be called on-demand
  • Topics Topic naming, hierarchy, wildcards, and the xs.* namespace
  • Lifecycle The unified xs.<kind>.<name>.<event> vocabulary and the compaction algorithm it drives
  • Read Options The options that select, bound, filter, and follow frames when reading the stream
  • Import & Export How to export and import data between cross.stream stores
  • Store API Complete reference for the cross.stream store HTTP API, that's exposed by the supervisor process
  • TTL Frame retention policies: forever, ephemeral, time, and last