Skip to main content

Daemon Overview

Run Trix as a background service for offline access, automatic sync, and file watching.

Overview

The Trix Daemon (trixd) is a background service that provides persistent connectivity between your local machine and the Trix API. It enables offline access through local caching, real-time synchronization, and automatic memory ingestion from files you're working on.

Why Use the Daemon?

  • Offline Access - Query your memories even when you're offline. The daemon maintains a local cache that's always available.
  • Faster Queries - Local cache means sub-millisecond response times for cached memories.
  • Automatic Sync - Changes sync bidirectionally in the background without manual intervention.
  • File Watching - Automatically create memories from files in watched directories.
  • Local Integration - Other tools on your machine can connect via IPC for seamless integration.

How It Works

The daemon runs as a background service (or in the foreground for development). It periodically syncs with the Trix API, caches memories locally, watches configured directories for changes, and exposes an IPC socket for local tools to connect.

Documentation

Installation

Install the Trix Daemon on your platform:

macOS
# Using Homebrew (current)
brew install devghost/taps/trix

# Planned rename (ADR-144): brew install trixdb/taps/trix

# Or download directly
curl -sSL https://install.trixdb.com/daemon | sh
Linux
# Download and install
curl -sSL https://install.trixdb.com/daemon | sh

# Or download manually
wget https://github.com/trix/trix-daemon/releases/latest/download/trixd-linux-amd64
chmod +x trixd-linux-amd64
sudo mv trixd-linux-amd64 /usr/local/bin/trixd
Windows
# Using Scoop (current)
scoop bucket add trix https://github.com/devghost/scoop-bucket
scoop install trix-daemon

# Planned rename (ADR-144): https://github.com/trixdb/scoop-bucket

# Or download the installer from:
# https://github.com/trix/trix-daemon/releases
From Source
# Requires Go 1.21+
go install github.com/trix/trix-daemon/cmd/trixd@latest

Verify the installation:

trixd version

Quick Start

Get the daemon running in under 2 minutes:

1. Create Configuration

Create a minimal configuration file at ~/.trix/daemon.yaml:

# ~/.trix/daemon.yaml
api:
  url: https://api.trixdb.com
  key: your-api-key-here   # Get from trix keys create --name daemon

Get an API key by running trix keys create --name "Daemon" or from the Trix dashboard.

2. Run Diagnostics

Verify everything is configured correctly:

trixd doctor

3. Start the Daemon

Foreground (Dev)
# Run in foreground to see output
trixd run

# With verbose logging
trixd run -vv
As Service
# Install as system service
trixd install

# Start the service
trixd start

# Check status
trixd status

4. Verify It's Working

# Check daemon status
trixd status

# Should show:
# Status: running
# API: connected
# Cache: 42 memories cached
# Uptime: 5m32s

You're all set! The daemon is now running and syncing your memories in the background. See Configuration for advanced options.

Next Steps