Overview
The Trix CLI includes several utility commands for diagnostics, system health checks, version management, and quick access to documentation. These tools help you troubleshoot issues, keep your CLI up to date, and access help when needed.
doctor
Run comprehensive diagnostics to verify your Trix CLI installation and configuration. This command checks your setup and identifies potential issues.
# Run diagnostics
trix doctorThe doctor command checks:
- CLI Version: Current version and available updates
- Configuration File: Verifies config file exists and is readable
- Authentication: Checks if API key or token is configured
- API Connection: Tests connectivity to Trix API with latency measurement
- Default Space: Verifies default space configuration
- Account & Credits: Displays plan and credit balance
- Shell Completion: Checks if tab completion is installed
Example output:
Trix Doctor
Checking your setup...
✓ CLI Version: trix 1.2.3
Go 1.21.5, linux/amd64 (latest)
✓ Config File: Found
/home/user/.trix/config.yaml
✓ Authentication: API key configured
Source: config file
✓ API Connection: Connected (45ms)
https://api.trixdb.com
✓ Default Space: Configured
space_abc123
✓ Account: Pro
Status: active
✓ Credits: 8,500 available
Used this period: 1,500 / 10,000
! Shell Completion: Not installed
Run 'trix completion --help' for setup instructions
Everything looks good!Run trix doctor when troubleshooting issues or after installation to
verify everything is set up correctly.
version
Display version information for the Trix CLI, including build details and platform.
# Show version information
trix version
# Show just the version number (for scripting)
trix version --short
# Check if a newer version is available
trix version --checkVersion output includes:
- CLI version number
- Git commit hash
- Build timestamp
- Go version used to build
- Platform (OS/architecture)
- Available update notification (if newer version exists)
version Options
| Option | Description |
|---|---|
--short | Print just the version number |
--check | Check if a newer version is available |
update
Update the Trix CLI to the latest version. The update process automatically downloads, verifies, and installs the new version.
# Update to latest version
trix update
# Check for updates without installing
trix update --check
# Force update (even if already on latest)
trix update --force
# Skip confirmation prompt
trix update --yesThe update process:
- Checks GitHub for the latest release
- Compares with your currently installed version
- Downloads the appropriate binary for your platform
- Verifies the download with SHA256 checksum
- Installs the new version
- Confirms successful update
The update command may require elevated permissions (sudo) if the CLI is installed
in a system directory like /usr/local/bin.
update Options
| Option | Description |
|---|---|
--check | Only check for updates, don't install |
--force | Force update even if on latest version |
--yes | Skip confirmation prompt |
stats
Display statistics about your memory collection, including counts, tag frequencies, and metrics.
# Show overall stats
trix stats
# Show stats for specific space
trix stats --space work
# Show detailed tag breakdown
trix stats --tagsStatistics include:
- Total number of memories
- Number of private memories
- Unique tags count
- Average memory priority
- Number of spaces (if viewing all)
- Tag frequency breakdown (with
--tags)
Example output with tag breakdown:
Memory Statistics
Total memories: 1,523
Private memories: 234
Unique tags: 67
Avg priority: 5.3
Spaces: 8
Tag Breakdown
work 342 ████████████████████
meeting-notes 187 ███████████
important 142 ████████
project 98 █████
personal 76 ████
...and 62 more tagswhoami
Display the currently authenticated user and account information.
# Show current user
trix whoami
# Output as JSON
trix whoami -o jsonDisplays:
- Account name
- Account ID
- API URL being used
Use whoami to verify which account you're currently authenticated with,
especially useful when working with multiple accounts.
open
Open Trix web pages in your default browser for quick access to documentation, dashboard, and settings.
# Open home page
trix open
# Open documentation
trix open docs
# Open API keys management
trix open keys
# Open pricing page
trix open pricingAvailable Pages
| Page | URL |
|---|---|
| (none) | https://trixdb.com |
docs | https://docs.trixdb.com |
keys | https://trixdb.com/dashboard/keys |
pricing | https://trixdb.com/pricing |
help
Get help for any command with detailed usage information, options, and examples.
# Show help for main command
trix help
# Show help for a specific command
trix help remember
trix help recall
trix help billing
# Use --help flag (equivalent)
trix remember --help
trix billing credits --help
# List all available commands
trix --helpEvery command and subcommand supports --help to show detailed usage
information. This is the fastest way to learn about command options and examples.
Configuration Commands
View and manage CLI configuration settings.
# Show all configuration 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
# Show config file location
trix config path
# View default values for new memories
trix config defaults
# Set default tags for all new memories
trix config defaults tags "work,notes"
# Set default expiration
trix config defaults expire 30dCommon configuration options:
api_url- Trix API endpointdefault_space- Default space for operationsoutput- Default output format (table, json, yaml)defaults.tags- Tags to add to all new memoriesdefaults.expire- Default expiration for new memories
Shell Completion
Generate shell completion scripts for Bash, Zsh, Fish, and PowerShell to enable tab completion for commands, flags, and dynamic values.
# Add to ~/.bashrc
source <(trix completion bash)
# Or install permanently
trix completion bash > /etc/bash_completion.d/trixShell completion provides:
- Command and subcommand completion
- Flag completion (
--flag) - Dynamic suggestions for spaces, memory IDs, and tags
- File path completion where applicable
Proactive Knowledge Management
The CLI includes proactive commands that help you maintain and improve your knowledge base by identifying issues, suggesting improvements, and finding stale content.
trix suggest
Get AI-powered suggestions for improving your knowledge base. The command analyzes your memories and provides actionable recommendations.
# Get suggestions for improving your knowledge base
trix suggest
# JSON output for automation
trix suggest -o jsonSuggestions are grouped by priority:
- High Priority - Critical issues requiring immediate attention
- Medium Priority - Important improvements to consider
- Low Priority - Nice-to-have enhancements
Types of suggestions include:
- Topics with sparse coverage (knowledge gaps)
- Areas that need more documentation
- Organizational improvements
- Quality enhancement recommendations
trix contradictions
Find memories that contain potentially conflicting information. This helps maintain consistency in your knowledge base.
# Find contradictions across all memories
trix contradictions
# Limit results
trix contradictions --limit 20
# Focus on specific tags
trix contradictions --tags "api-design"
# Check project-specific contradictions
trix contradictions --tags "deployment"The command finds:
- Memories with explicit "contradicts" relationships
- Semantically similar memories with different conclusions
- Information that may need reconciliation
When contradictions are found, review the memories and either update them to be consistent, or add clarifying context about why the information differs (e.g., different time periods, different contexts).
trix stale
Identify memories that haven't been accessed recently and may need review or archival. Stale memories can clutter your knowledge base and may contain outdated information.
# Find memories not accessed in 14+ days (default)
trix stale
# Custom threshold (30 days)
trix stale --days 30
# Find very old memories
trix stale --days 90
# Limit results
trix stale --limit 50Output includes:
- Memory ID and truncated content
- Associated tags
- Days since last access (color-coded by severity)
Stale doesn't mean obsolete. Some memories (like reference documentation or infrequently needed facts) may remain relevant despite low access. Review before deleting.
Proactive Command Flags
| Command | Flag | Description | Default |
|---|---|---|---|
suggest | --format | Output format: table, json | table |
contradictions | --limit | Maximum results to return | 10 |
contradictions | --tags | Filter by tags | all |
stale | --days | Days since last access threshold | 14 |
stale | --limit | Maximum results to return | 20 |
Command Reference
Utility Commands
| Command | Description |
|---|---|
doctor | Run diagnostics and verify setup |
version | Show version information |
update | Update CLI to latest version |
stats | Show memory statistics |
whoami | Show current user |
open | Open Trix pages in browser |
help | Show help for commands |
completion | Generate shell completion scripts |
suggest | Get AI suggestions for improving your knowledge base |
contradictions | Find potentially conflicting information |
stale | Find memories that may be outdated |
Common Examples
Troubleshooting Setup
# Check if everything is working
trix doctor
# Verify authentication
trix whoami
# Test API connection
trix account info
# Check configuration
trix config listUpdate Workflow
# Check current version
trix version
# Check if update available
trix version --check
# Update to latest
trix update
# Verify new version
trix versionStatistics Monitoring
# Overall stats
trix stats
# Stats for specific space
trix stats --space work
# Detailed tag analysis
trix stats --tags
# Export stats for analysis
trix stats -o json > stats-$(date +%Y%m%d).jsonQuick Access
# Open documentation
trix open docs
# Manage API keys
trix open keys
# View pricing
trix open pricing
# Get help
trix help rememberBest Practices
Regular Maintenance
- Run
trix doctormonthly to check system health - Keep the CLI updated with
trix update - Enable shell completion for better productivity
- Review
trix statsto understand your usage patterns
Troubleshooting Tips
- Always run
trix doctorfirst when encountering issues - Check
trix versionto ensure you're on a supported version - Use
-vvflag for debug output on any command - Verify authentication with
trix whoami - Check API connectivity:
trix account info
Productivity
- Install shell completion for faster command entry
- Use
trix open docsfor quick documentation access - Set up aliases for frequently used commands
- Use
--helpto discover command options
Next Steps
- CLI Overview - Main CLI documentation
- Memory Commands - Core memory operations
- Configuration - Detailed configuration guide
- Support - Get help from the Trix team