Skip to main content

Configuration

Customize CLI settings, defaults, and behavior.

Configuration Commands

# Show all configuration
trix config list

# Get specific value
trix config get output
trix config get default_space

# Set configuration value
trix config set output json
trix config set default_space space_abc123

# Show config file location
trix config path

Common Settings

SettingDescriptionDefault
outputOutput format: table, json, yamltable
default_spaceDefault space for operationsdefault
api_urlTrix API URLhttps://api.trixdb.com
quietSuppress informational outputfalse
no_colorDisable colored outputfalse
color_blindUse color-blind friendly palettefalse
# Configure common settings
trix config set output json
trix config set default_space project_alpha
trix config set no_color true
trix config set color_blind true

Configuration File

Configuration is stored in ~/.trix/config.yaml:

# ~/.trix/config.yaml
api_url: https://api.trixdb.com
api_key: your-api-key
default_space: space_abc123
output: table
quiet: false
no_color: false

defaults:
  tags: "work"
  private: false
  expire: "30d"

You can edit the config file directly, but using trix config commands is safer as they validate values.

Smart Defaults

Set defaults that automatically apply to new memories:

# 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

# View all defaults
trix config defaults

# Clear a default
trix config defaults tags ""

Defaults save time by automatically applying common settings to new memories. You can still override them on a per-command basis.

Global Flags

These flags work with any command and override config settings:

FlagDescription
-o, --outputOutput format (table, json, yaml)
-q, --quietSuppress informational output
-v, --verboseIncrease verbosity (-v, -vv, -vvv)
--configPath to custom config file
--spaceOverride default space
NO_COLOR=1Disable colored output (env var or trix config set no_color true)
# Use JSON output for one command
trix memories list -o json

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

# Very verbose for debugging
trix recall "query" -vvv

# Use custom config file
trix --config ./custom-config.yaml memories list

# Override default space
trix --space project_beta recall "auth"

Environment Variables

Environment variables override config file settings:

# API Configuration
export TRIX_API_KEY=your-api-key
export TRIX_API_URL=https://api.trixdb.com

# Behavior
export TRIX_OUTPUT=json
export TRIX_DEFAULT_SPACE=space_abc123

# Disable color
export NO_COLOR=1

Next Steps