Configuration
Configure Metaphori CLI to match your workflow with persistent settings and environment variables.
Config Management
View Configuration
Show all settings:
metaphori config showShow specific value:
metaphori config show default_modelSet Configuration Values
Set default model:
metaphori config set default_model gpt-4o-miniSet compression level:
metaphori config set default_compression_level highestEnable verbose output:
metaphori config set verbose trueUnset Configuration Values
metaphori config unset default_modelAvailable Configuration Options
api_key
Your Metaphori API key
metaphori config set api_key mph-sk-xxxxxapi_url
API endpoint URL (default: https://api.metaphori.dev)
metaphori config set api_url https://custom.api.urldefault_model
Default AI model for operations
metaphori config set default_model claude-3-5-sonnetAvailable models: gpt-4o, gpt-4o-mini, claude-3-5-sonnet, etc.
default_compression_level
Default compression level
metaphori config set default_compression_level highestOptions: high, higher, highest
verbose
Enable detailed output
metaphori config set verbose trueoutput_dir
Directory for saving compressions
metaphori config set output_dir ~/Documents/compressionsEnvironment Variables
Environment variables override config file settings:
# Core settings
export METAPHORI_API_KEY=mph-sk-xxxxx
export METAPHORI_API_URL=https://custom.api.url
# Defaults
export METAPHORI_DEFAULT_MODEL=claude-3-5-sonnet
export METAPHORI_DEFAULT_COMPRESSION_LEVEL=highest
# Behavior
export METAPHORI_VERBOSE=true
export METAPHORI_OUTPUT_DIR=~/compressionsTip: Add these to your shell profile (~/.bashrc, ~/.zshrc) for persistence.
Configuration File Location
The configuration file is stored at:
~/.config/metaphori/config.json%APPDATA%\metaphori\config.jsonPriority Order
Settings are applied in this order (highest priority first):
- Command-line flags (e.g.,
--api-key) - Environment variables
- Config file settings
- Default values
Global Flags
These flags work with all commands and override other settings:
--api-key
metaphori compress --api-key mph-sk-different-key document.txt--verbose
metaphori list --verbose--help
metaphori compress --helpExample Configurations
Development Setup
# Verbose output for debugging
metaphori config set verbose true
metaphori config set default_model gpt-4o-mini
metaphori config set default_compression_level highProduction Setup
# Optimized for quality
metaphori config set verbose false
metaphori config set default_model gpt-4o
metaphori config set default_compression_level highestCI/CD Setup
# Use environment variables
export METAPHORI_API_KEY=$SECRET_METAPHORI_KEY
export METAPHORI_VERBOSE=false
export METAPHORI_DEFAULT_MODEL=gpt-4o-miniReady to use the OpenAI-compatible API?
Learn how to integrate Metaphori with any OpenAI-compatible tool.
Continue to OpenAI API Drop-in →