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 trix2. Authenticate
# Interactive login
trix auth login
# Or use your API key
export TRIX_API_KEY=your-api-key3. 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 listYou'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
| Section | Key Commands | Documentation |
|---|---|---|
| Installation & Setup | trix init, trix version, trix update | View Docs → |
| Authentication | auth login, auth register, whoami | View Docs → |
| Configuration | config set, config get, config list | View Docs → |
Core Commands
| Section | Key Commands | Documentation |
|---|---|---|
| Memory Commands | remember, recall, forget, reinforce, weaken | View Docs → |
| Spaces & Organization | spaces create, spaces list, spaces default | View Docs → |
Productivity Tools
| Section | Key Commands | Documentation |
|---|---|---|
| Context & AI Utilities | context, watch | View Docs → |
| Templates | templates list, templates create, templates edit | View Docs → |
| Shortcuts | Command aliases: mem, sp, tpl | View Docs → |
AI Integration
| Section | Key Commands | Documentation |
|---|---|---|
| AI-CLI Integration | integrations ai-cli setup, process-session, inject-context | View Docs → |
| AI-CLI Setup | Hook configuration for Claude Code & Gemini CLI | View Docs → |
| AI-CLI Commands | Session processing and context injection | View Docs → |
| AI-CLI Advanced | Troubleshooting, custom workflows, best practices | View Docs → |
Integrations & Services
| Section | Key Commands | Documentation |
|---|---|---|
| Email Integration | email setup, email history, email rotate | View Docs → |
| Third-Party Integrations | integrations connect, integrations sync | View Docs → |
| Daemon | daemon install, daemon start, daemon logs | View Docs → |
Account & Billing
| Section | Key Commands | Documentation |
|---|---|---|
| Account Management | account info, account update, account members | View Docs → |
| API Keys | keys create, keys list, keys update | View Docs → |
| Billing & Subscription | billing status, billing usage, billing upgrade | View Docs → |
Data Management
| Section | Key Commands | Documentation |
|---|---|---|
| Import & Export | export, import | View Docs → |
| Background Jobs | jobs list, jobs stats, jobs retry | View Docs → |
Utilities & Diagnostics
| Section | Key Commands | Documentation |
|---|---|---|
| Utilities | doctor, stats, open, help | View 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 | shVerify the installation:
trix versionAuthentication
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-XXXXXXEnvironment 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_abc123Auth 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~/.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 pathSmart 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:
| Option | Description |
|---|---|
-o, --output | Output format: table (default), json, yaml |
-q, --quiet | Suppress informational output |
-v, --verbose | Increase verbosity (-v=verbose, -vv=debug, -vvv=trace) |
--config | Path to custom config file |
--space | Override default space |
--help | Show 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-onlyShell Completion
Enable tab completion for your shell:
# Add to ~/.bashrc
source <(trix completion bash)
# Or install permanently
trix completion bash > /etc/bash_completion.d/trixUtility 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 uninstallExplore the Documentation
Comprehensive guides covering every aspect of the Trix CLI:
Getting Started
Install on macOS, Linux, Windows
Login, register, manage accounts
Settings, defaults, environment
Core Commands
remember, recall, forget, reinforce
Organize memories into workspaces
Productivity Tools
LLM context formatting, watch mode
Reusable memory structures
Command aliases and quick access
AI Integration
Auto-capture from AI assistants
Configure hooks and integration
Session processing and injection
Troubleshooting and best practices
Integrations & Services
Capture memories via email
GitHub, Notion, Google, N8N, Zapier
Background service and caching
Account & Billing
Profile, settings, team members
Create and manage API keys
Plans, credits, usage, transactions
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 setupThird-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
- Installation & Setup - Get the CLI installed on your system
- Authentication - Login and connect to your account
- Memory Commands - Learn remember, recall, and core commands
Boost Your Productivity
- AI-CLI Integration - Auto-capture from Claude Code & Gemini CLI
- Templates - Create reusable memory structures
- Context & AI Utilities - Format memories for LLM prompts
- Shortcuts - Faster access with command aliases
Advanced Features
- Third-Party Integrations - Connect GitHub, Notion, Google
- Import & Export - Bulk operations and data portability
- Daemon - Background service for caching and sync
- Utilities & Diagnostics - Troubleshoot and optimize
Related Documentation
- MCP Server - Connect to AI assistants like Claude Desktop
- Python SDK - Build with Python
- TypeScript SDK - Build with TypeScript