CLI Options Reference ===================== .. note:: **Detailed reference for all HoneyHive CLI options and parameters** This document provides comprehensive details for every option available in the HoneyHive CLI. This reference covers all command-line options, their accepted values, defaults, and usage patterns across all HoneyHive CLI commands. Global Options -------------- These options are available for all commands: Authentication Options ~~~~~~~~~~~~~~~~~~~~~~ .. option:: --api-key **Description**: HoneyHive API key for authentication **Environment Variable**: ``HH_API_KEY`` **Format**: String starting with ``hh_`` **Required**: Yes (unless set via environment variable or config) **Example**: ``--api-key hh_1234567890abcdef...`` **Notes**: - Can be obtained from HoneyHive dashboard - Should be kept secure and not committed to code .. option:: --base-url **Description**: Base URL for HoneyHive API **Environment Variable**: ``HH_BASE_URL`` **Default**: ``https://api.honeyhive.ai`` **Format**: Valid URL **Examples**: - ``--base-url https://api-staging.honeyhive.ai`` - ``--base-url https://api.honeyhive.ai`` **Use Cases**: - Staging environment testing - Self-hosted HoneyHive instances - Development environments .. option:: **Description**: Default project name for operations **Notes**: - Used as default when commands require a project - Can be overridden by command-specific project options Output Options ~~~~~~~~~~~~~~ .. option:: --output **Description**: Output format for command results **Environment Variable**: ``HH_OUTPUT_FORMAT`` **Default**: ``table`` **Values**: - ``table`` - Human-readable table format - ``json`` - JSON format for programmatic use - ``yaml`` - YAML format - ``csv`` - Comma-separated values - ``tsv`` - Tab-separated values **Examples**: .. code-block:: bash # Table output (default) honeyhive project list # JSON output honeyhive project list --output json # CSV output for spreadsheets honeyhive event list --output csv .. option:: --verbose, -v **Description**: Enable verbose output **Default**: ``false`` **Behavior**: - Shows additional debugging information - Displays API request/response details - Includes timing information - Shows progress indicators **Example**: ``honeyhive eval run --evaluators quality -v`` .. option:: --quiet, -q **Description**: Suppress non-essential output **Default**: ``false`` **Behavior**: - Only shows critical information and errors - Suppresses progress indicators - Reduces output verbosity - Useful for scripting **Example**: ``honeyhive event export -q`` .. option:: --no-color **Description**: Disable colored output **Default**: ``false`` **Use Cases**: - CI/CD environments - File output redirection - Terminals without color support **Example**: ``honeyhive trace analyze --no-color > analysis.txt`` .. option:: --config-file **Description**: Path to configuration file **Environment Variable**: ``HH_CONFIG_FILE`` **Default**: ``~/.honeyhive/config.yaml`` **Formats Supported**: YAML, JSON **Example**: ``--config-file ./my-config.yaml`` Help and Information ~~~~~~~~~~~~~~~~~~~~ .. option:: --help, -h **Description**: Show help information **Behavior**: - Shows command usage - Lists available options - Provides examples **Examples**: .. code-block:: bash # General help honeyhive --help # Command-specific help honeyhive eval run --help .. option:: --version **Description**: Show version information **Output**: Version number and build information **Example**: ``honeyhive --version`` Command-Specific Options ------------------------ Project Commands ~~~~~~~~~~~~~~~~ **honeyhive project list** .. option:: --limit **Description**: Maximum number of projects to return **Default**: ``50`` **Range**: 1-1000 **Example**: ``--limit 100`` .. option:: --offset **Description**: Number of projects to skip (pagination) **Default**: ``0`` **Range**: 0+ **Example**: ``--offset 20`` .. option:: --sort **Description**: Sort projects by field **Values**: ``name``, ``created_at``, ``updated_at`` **Default**: ``name`` **Example**: ``--sort created_at`` .. option:: --order **Description**: Sort order **Values**: ``asc``, ``desc`` **Default**: ``asc`` **Example**: ``--order desc`` **honeyhive project create** .. option:: --name **Description**: Project name **Required**: Yes **Format**: 1-100 characters, alphanumeric with hyphens/underscores **Example**: ``--name my-new-project`` .. option:: --description **Description**: Project description **Format**: Up to 500 characters **Example**: ``--description "Production LLM application for customer support"`` .. option:: --settings **Description**: Project settings as JSON **Format**: Valid JSON object **Example**: ``--settings '{"retention_days": 90, "auto_eval": true}'`` .. option:: --team **Description**: Team to assign project to **Format**: Team name string **Example**: ``--team ml-engineering`` Session Commands ~~~~~~~~~~~~~~~~ **honeyhive session list** .. option:: --start-date **Description**: Filter sessions from this date **Format**: ISO 8601 date (YYYY-MM-DD) or datetime **Examples**: - ``--start-date 2024-01-01`` - ``--start-date 2024-01-15T10:30:00Z`` .. option:: --end-date **Description**: Filter sessions until this date **Format**: ISO 8601 date (YYYY-MM-DD) or datetime **Example**: ``--end-date 2024-01-31`` .. option:: --user-id **Description**: Filter by user ID **Format**: User identifier string **Example**: ``--user-id user_12345`` .. option:: --source **Description**: Filter by session source **Format**: Source identifier string **Example**: ``--source chat-bot`` .. option:: --status **Description**: Filter by session status **Values**: ``active``, ``completed``, ``error`` **Example**: ``--status completed`` Event Commands ~~~~~~~~~~~~~~ **honeyhive event list** .. option:: --session-id **Description**: Filter events by session ID **Format**: Session UUID **Example**: ``--session-id session_abc123def456`` .. option:: --event-type **Description**: Filter by event type **Values**: ``llm``, ``tool``, ``chain``, ``retrieval``, ``embedding``, ``evaluation``, ``custom`` **Example**: ``--event-type llm`` .. option:: --event-name **Description**: Filter by event name **Format**: Event name string **Example**: ``--event-name openai-chat-completion`` .. option:: --user-id **Description**: Filter by user ID **Example**: ``--user-id user_98765`` .. option:: --model **Description**: Filter by LLM model **Examples**: - ``--model gpt-4`` - ``--model claude-3-sonnet-20240229`` .. option:: --provider **Description**: Filter by LLM provider **Values**: ``openai``, ``anthropic``, ``google``, ``azure``, ``local`` **Example**: ``--provider openai`` .. option:: --status **Description**: Filter by event status **Values**: ``success``, ``error``, ``cancelled``, ``timeout`` **Example**: ``--status error`` .. option:: --min-duration **Description**: Filter events with minimum duration **Format**: Duration in milliseconds **Example**: ``--min-duration 1000`` .. option:: --max-duration **Description**: Filter events with maximum duration **Format**: Duration in milliseconds **Example**: ``--max-duration 5000`` .. option:: --start-time **Description**: Filter events from this timestamp **Format**: ISO 8601 timestamp **Example**: ``--start-time 2024-01-15T10:30:00Z`` .. option:: --end-time **Description**: Filter events until this timestamp **Format**: ISO 8601 timestamp **Example**: ``--end-time 2024-01-15T11:30:00Z`` **honeyhive event search** .. option:: --query **Description**: Search query with field filters **Format**: Lucene-style query syntax **Field Filters**: - ``event_type:model`` - Filter by event type - ``model:gpt-4`` - Filter by model - ``status:error`` - Filter by status - ``user_id:user_123`` - Filter by user - ``duration:>1000`` - Duration greater than 1000ms - ``start_time:>2024-01-15`` - Events after date **Operators**: - ``AND`` - Both conditions must match - ``OR`` - Either condition can match - ``NOT`` - Exclude matching conditions - ``()`` - Group conditions **Examples**: .. code-block:: bash # Find errors in GPT-4 calls --query "model:gpt-4 AND status:error" # Find slow LLM calls --query "event_type:model AND duration:>5000" # Complex query --query "(model:gpt-4 OR model:claude-3) AND status:success AND user_id:user_123" .. option:: --fields **Description**: Comma-separated list of fields to include in results **Default**: All fields **Available Fields**: ``event_id``, ``event_type``, ``event_name``, ``model``, ``status``, ``duration_ms``, ``start_time``, ``user_id`` **Example**: ``--fields event_id,model,status,duration_ms`` **honeyhive event export** .. option:: --format **Description**: Export file format **Values**: - ``json`` - Single JSON object with array of events - ``jsonl`` - JSON Lines (one event per line) - ``csv`` - Comma-separated values - ``tsv`` - Tab-separated values - ``parquet`` - Apache Parquet format - ``excel`` - Excel spreadsheet (.xlsx) **Default**: ``jsonl`` **Example**: ``--format csv`` .. option:: --output-file **Description**: Output file path **Required**: Yes **Format**: Valid file path **Examples**: - ``--output-file events.jsonl`` - ``--output-file /tmp/export/events.csv`` .. option:: --compress **Description**: Compress output file **Default**: ``false`` **Formats**: Automatically detects based on file extension (.gz, .bz2, .xz) **Example**: ``--output-file events.jsonl.gz --compress`` .. option:: --batch-size **Description**: Number of events per batch during export **Default**: ``1000`` **Range**: 1-10000 **Use Case**: Memory optimization for large exports **Example**: ``--batch-size 500`` .. option:: --include-metadata **Description**: Include event metadata in export **Default**: ``true`` **Example**: ``--no-include-metadata`` (to exclude) .. option:: --flatten-json **Description**: Flatten nested JSON objects in CSV/TSV exports **Default**: ``false`` **Example**: ``--flatten-json`` Evaluation Commands ~~~~~~~~~~~~~~~~~~~ **honeyhive eval run** .. option:: --evaluators **Description**: Comma-separated list of evaluators to run **Required**: Yes **Available Evaluators**: - ``quality`` - Overall response quality - ``factual_accuracy`` - Factual correctness - ``relevance`` - Query relevance - ``toxicity`` - Content safety - ``length`` - Response length appropriateness - ``coherence`` - Response coherence - ``custom_evaluator_name`` - Custom evaluators **Example**: ``--evaluators quality,factual_accuracy,relevance`` .. option:: --target-events **Description**: Query to select target events for evaluation **Format**: Same syntax as event search query **Examples**: .. code-block:: bash # Evaluate recent LLM events --target-events "event_type:model AND start_time:>2024-01-15" # Evaluate specific session --target-events "session_id:session_abc123" # Evaluate GPT-4 events with errors --target-events "model:gpt-4 AND status:error" .. option:: --max-events **Description**: Maximum number of events to evaluate **Default**: ``1000`` **Range**: 1-10000 **Example**: ``--max-events 500`` .. option:: --parallel **Description**: Run evaluators in parallel **Default**: ``true`` **Example**: ``--no-parallel`` (to disable) .. option:: --max-workers **Description**: Maximum number of parallel workers **Default**: ``4`` **Range**: 1-20 **Example**: ``--max-workers 8`` .. option:: --timeout **Description**: Timeout for individual evaluations **Default**: ``30`` **Range**: 1-300 **Example**: ``--timeout 60`` .. option:: --retry-failed **Description**: Retry failed evaluations **Default**: ``false`` **Example**: ``--retry-failed`` .. option:: --max-retries **Description**: Maximum number of retries for failed evaluations **Default**: ``3`` **Range**: 1-10 **Example**: ``--max-retries 5`` .. option:: --dry-run **Description**: Show what would be evaluated without actually running **Default**: ``false`` **Use Case**: Testing evaluation queries **Example**: ``--dry-run`` .. option:: --save-results **Description**: Save evaluation results to HoneyHive **Default**: ``true`` **Example**: ``--no-save-results`` (for testing) .. option:: --output-file **Description**: Save evaluation results to local file **Format**: JSON or CSV based on file extension **Example**: ``--output-file evaluation_results.json`` **honeyhive eval list** .. option:: --evaluator **Description**: Filter by evaluator name **Example**: ``--evaluator quality`` .. option:: --target-event-id **Description**: Filter by target event ID **Example**: ``--target-event-id evt_abc123`` .. option:: --min-score **Description**: Filter by minimum score **Format**: Numeric value (depends on evaluator scale) **Example**: ``--min-score 0.8`` .. option:: --max-score **Description**: Filter by maximum score **Example**: ``--max-score 0.5`` .. option:: --status **Description**: Filter by evaluation status **Values**: ``completed``, ``failed``, ``pending``, ``skipped`` **Example**: ``--status completed`` Trace Analysis Commands ~~~~~~~~~~~~~~~~~~~~~~~ **honeyhive trace analyze** .. option:: --time-window **Description**: Time window for analysis **Values**: - ``1h`` - Last 1 hour - ``6h`` - Last 6 hours - ``24h`` - Last 24 hours - ``7d`` - Last 7 days - ``30d`` - Last 30 days - ``custom`` - Use start-time/end-time **Default**: ``24h`` **Example**: ``--time-window 7d`` .. option:: --start-time **Description**: Custom start time for analysis **Format**: ISO 8601 timestamp **Example**: ``--start-time 2024-01-01T00:00:00Z`` .. option:: --end-time **Description**: Custom end time for analysis **Format**: ISO 8601 timestamp **Example**: ``--end-time 2024-01-31T23:59:59Z`` .. option:: --include-metrics **Description**: Include detailed performance metrics **Default**: ``false`` **Example**: ``--include-metrics`` .. option:: --groupby **Description**: Group analysis results by field **Values**: ``model``, ``provider``, ``event_type``, ``user_id``, ``session_id``, ``status`` **Example**: ``--groupby model`` .. option:: --output-file **Description**: Save analysis results to file **Formats**: JSON, YAML, CSV based on extension **Example**: ``--output-file analysis_results.json`` **honeyhive trace performance** .. option:: --percentiles **Description**: Comma-separated percentiles to calculate **Default**: ``50,90,95,99`` **Format**: Numbers between 0-100 **Example**: ``--percentiles 25,50,75,90,95,99`` .. option:: --metrics **Description**: Performance metrics to analyze **Values**: ``latency``, ``tokens_per_second``, ``cost``, ``error_rate``, ``throughput`` **Default**: All metrics **Example**: ``--metrics latency,error_rate`` Configuration Options ~~~~~~~~~~~~~~~~~~~~~ **honeyhive config set** .. option:: **Description**: Configuration key-value pair **Available Keys**: - ``api_key`` - Default API key - ``base_url`` - Default base URL - ``default_project`` - Default project name - ``output_format`` - Default output format - ``verbose`` - Default verbose setting - ``timeout`` - Default timeout in seconds **Examples**: .. code-block:: bash # Set default project honeyhive config set default_project my-project # Set output format honeyhive config set output_format json # Set timeout honeyhive config set timeout 60 Advanced Options ---------------- Filtering and Search ~~~~~~~~~~~~~~~~~~~~ **Date/Time Formats**: The CLI accepts various date and time formats: - **ISO 8601**: ``2024-01-15T10:30:45Z`` - **ISO Date**: ``2024-01-15`` - **Relative**: ``-1h``, ``-24h``, ``-7d``, ``-30d`` - **Unix Timestamp**: ``1642253445`` **Examples**: .. code-block:: bash # ISO 8601 format --start-time 2024-01-15T10:30:45Z # Simple date --start-date 2024-01-15 # Relative time --start-time -24h **Query Syntax**: Advanced query syntax for filtering: - **Field Filters**: ``field:value`` - **Range Queries**: ``field:>value``, ``field:=value``, ``field:<=value`` - **Wildcard**: ``field:pattern*`` - **Regex**: ``field:/pattern/`` - **Arrays**: ``field:[value1,value2]`` - **Null Checks**: ``field:null``, ``field:!null`` **Examples**: .. code-block:: bash # Range query --query "duration:>1000 AND duration:<5000" # Wildcard search --query "model:gpt* AND status:success" # Array filter --query "event_type:[model,tool]" # Null check --query "error:null" Output Formatting ~~~~~~~~~~~~~~~~~ **Table Format Options**: .. option:: --table-style