Skip to main content

CLI

A powerful command-line interface for managing memories, spaces, and more with Trix.

Overview

The Trix CLI is a powerful command-line tool for managing your memories, spaces, and integrations. It's designed for both interactive use and scripting, with rich output options and shell completion support.

New to Trix? Jump to Quick Start to get up and running in 2 minutes, or explore the Command Reference to see everything you can do.

Key Features

  • Full memory management - remember, recall, reinforce, weaken, and forget
  • Space organization - Create and manage isolated memory spaces
  • AI-CLI integration - Auto-capture from Claude Code CLI & Gemini CLI
  • Third-party integrations - Connect to GitHub, Notion, Google, N8N, Zapier
  • Shell completion - Tab completion for Bash, Zsh, Fish, and PowerShell
  • Multiple output formats - Table, JSON, YAML, and raw output
  • Scripting support - Designed for pipelines and automation
  • Import/Export - Bulk operations and data portability

If you prefer working with code, check out the Python SDK, TypeScript SDK, or REST API.

Quick Start

Get started with Trix CLI in 2 minutes:

1. Install

# macOS (Homebrew)
brew install trixdb/taps/trix

# Linux/macOS (curl)
curl -sSL https://install.trixdb.com | sh

# Windows (Scoop)
scoop bucket add trix https://github.com/trixdb/scoop-bucket
scoop install trix

2. Authenticate

# Interactive login
trix auth login

# Or use your API key
export TRIX_API_KEY=your-api-key

3. Start Using

# Store your first memory
trix remember "The CLI is amazing and easy to use"

# Search for it
trix recall "cli easy"

# See all memories
trix memories list

You're ready! Explore all commands or jump to Memory Commands to learn more.

Complete Command Reference

The Trix CLI provides comprehensive commands organized into functional groups. Click any section to explore detailed documentation.

Getting Started

SectionKey CommandsDocumentation
Installation & Setuptrix init, trix version, trix updateView Docs →
Authenticationauth login, auth register, whoamiView Docs →
Configurationconfig set, config get, config listView Docs →

Core Commands

SectionKey CommandsDocumentation
Memory Commandsremember, recall, forget, reinforce, weakenView Docs →
Spaces & Organizationspaces create, spaces list, spaces defaultView Docs →

Productivity Tools

SectionKey CommandsDocumentation
Context & AI Utilitiescontext, watchView Docs →
Templatestemplates list, templates create, templates editView Docs →
ShortcutsCommand aliases: mem, sp, tplView Docs →

AI Integration

SectionKey CommandsDocumentation
AI-CLI Integrationintegrations ai-cli setup, process-session, inject-contextView Docs →
AI-CLI SetupHook configuration for Claude Code & Gemini CLIView Docs →
AI-CLI CommandsSession processing and context injectionView Docs →
AI-CLI AdvancedTroubleshooting, custom workflows, best practicesView Docs →

Integrations & Services

SectionKey CommandsDocumentation
Email Integrationemail setup, email history, email rotateView Docs →
Third-Party Integrationsintegrations connect, integrations syncView Docs →
Daemondaemon install, daemon start, daemon logsView Docs →

Account & Billing

SectionKey CommandsDocumentation
Account Managementaccount info, account update, account membersView Docs →
API Keyskeys create, keys list, keys updateView Docs →
Billing & Subscriptionbilling status, billing usage, billing upgradeView Docs →

Data Management

SectionKey CommandsDocumentation
Import & Exportexport, importView Docs →
Background Jobsjobs list, jobs stats, jobs retryView Docs →

Utilities & Diagnostics

SectionKey CommandsDocumentation
Utilitiesdoctor, stats, open, helpView Docs →

Use trix <command> --help to see detailed help for any command, including all available options and examples.

Installation

The Trix CLI is available for macOS, Linux, and Windows. Choose your platform:

# Using Homebrew (recommended)
brew install trixdb/taps/trix

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

Verify the installation:

trix version

Authentication

Before using the CLI, you need to authenticate. There are several ways to do this:

Interactive Login

# Login with email and password (interactive)
trix auth login

# Login with API key directly
trix auth login --api-key gdb_xxx

# Login with email (will prompt for password)
trix auth login --email [email protected]

Registration

# Interactive registration
trix auth register

# With flags
trix auth register --email [email protected] --password yourpass

# With invite code (if required)
trix auth register --invite-code TRIX-XXXXXX

Environment Variables

# Set API key
export TRIX_API_KEY=your-api-key

# Or set JWT token
export TRIX_TOKEN=your-jwt-token

# Optional: Custom API URL
export TRIX_API_URL=https://api.trixdb.com

# Optional: Default space
export TRIX_DEFAULT_SPACE=space_abc123

Auth Commands

# Check authentication status
trix auth status

# View current user
trix whoami

# View/update profile
trix auth profile
trix auth profile --name "John Doe"

# Logout
trix auth logout

# Password management
trix auth change-password
trix auth forgot-password --email [email protected]
trix auth reset-password --token abc123 --password newpass

# Email verification
trix auth verify-email --token <token>
trix auth resend-verification --email [email protected]

# Switch between accounts
trix auth switch-account
Credentials are stored securely in ~/.trix/config.yaml. Use trix config path to see the exact location.

Configuration

Manage CLI settings and configuration:

# Show all settings
trix config list

# Get a specific setting
trix config get default_space
trix config get output

# Set a configuration value
trix config set output json
trix config set default_space space_abc123
trix config set api_url http://localhost:3000

# Show config file location
trix config path

Smart Defaults

Set defaults that are automatically applied to new memories:

# View current defaults
trix config defaults

# Set default tags for all new memories
trix config defaults tags "work,notes"

# Set default expiration
trix config defaults expire 30d

# Set default privacy
trix config defaults private true

# Clear a default
trix config defaults tags ""

Configuration File

The config file is stored at ~/.trix/config.yaml:

# ~/.trix/config.yaml
api_url: https://api.trixdb.com
api_key: your-api-key
default_space: space_abc123
output: table
defaults:
  tags: "work"
  private: false
  expire: "30d"

Global Options

These options are available for all commands:

OptionDescription
-o, --outputOutput format: table (default), json, yaml
-q, --quietSuppress informational output
-v, --verboseIncrease verbosity (-v=verbose, -vv=debug, -vvv=trace)
--configPath to custom config file
--spaceOverride default space
--helpShow help for any command
# Output as JSON
trix memories list -o json

# Quiet mode for scripting
trix remember "data" -q

# Verbose output for debugging
trix recall "query" -vv

# Get only IDs (useful for scripting)
trix memories list --id-only

Shell Completion

Enable tab completion for your shell:

# Add to ~/.bashrc
source <(trix completion bash)

# Or install permanently
trix completion bash > /etc/bash_completion.d/trix
Shell completion includes dynamic suggestions for spaces, memory IDs, and tags.

Utility Commands

# Run diagnostics
trix doctor

# Open documentation in browser
trix docs

# Check version
trix version
trix version --check       # Check for updates

# Update to latest version
trix update

# View memory statistics
trix stats

# Watch memories in real-time
trix watch

# Uninstall CLI
trix uninstall

Explore the Documentation

Comprehensive guides covering every aspect of the Trix CLI:

Getting Started

Core Commands

Productivity Tools

AI Integration

Integrations & Services

Account & Billing

Data Management & Utilities

Common Workflows

Daily Memory Management

# Morning: Review what you remember
trix recall "yesterday" --limit 10

# During work: Save important thoughts
trix remember "Meeting notes: Q1 planning discussion"

# End of day: Reinforce key learnings
trix reinforce <memory-id>

Project Setup

# Create a dedicated space for your project
trix spaces create "project_alpha"

# Set it as default
trix config set default_space space_abc123

# Import project documentation
trix import --file ./docs.json --space project_alpha

# Setup AI-CLI auto-capture
trix integrations ai-cli setup

Third-Party Integration

# Connect GitHub repositories
trix integrations connect github

# Sync repositories to memories
trix integrations sync <connection-id>

# Search across all imported data
trix recall "authentication implementation"

Next Steps

Start with the Essentials

Boost Your Productivity

Advanced Features

Related Documentation