Sniffly CLI Reference

July 21, 2025 · View on GitHub

Complete reference for all Sniffly command-line interface commands.

Command Overview

sniffly init          Start the analytics dashboard
sniffly config        Manage configuration
sniffly version       Show version information
sniffly help          Show help and usage examples

Commands

sniffly init

Start the Sniffly analytics dashboard server.

sniffly init [OPTIONS]

Options:

  • --port INTEGER - Port to run server on (default: 8081)
  • --host STRING - Host to run server on (default: localhost)
  • --no-browser - Don't open browser automatically
  • --clear-cache - Clear cached data

Examples:

sniffly init                    # Start with defaults
sniffly init --port 9000        # Use custom port
sniffly init --no-browser       # Don't open browser

sniffly config

Manage configuration settings. This is a command group with subcommands:

config show

Display current configuration values and their sources.

sniffly config show [OPTIONS]

Options:

  • --json - Output in JSON format

Example output:

Current configuration:
  auto_browser: True (default)
  port: 8090 (from config file)
  cache_max_projects: 5 (from environment)

config set

Set a configuration value.

sniffly config set KEY VALUE

Examples:

sniffly config set port 8090
sniffly config set auto_browser false
sniffly config set cache_max_projects 10

config unset

Remove a custom configuration value (revert to default).

sniffly config unset KEY

Example:

sniffly config unset port

sniffly version

Show the current version of Sniffly.

sniffly version

sniffly help

Show detailed help and usage examples.

sniffly help

Configuration Keys

KeyTypeDefaultDescription
portint8081Server port
hoststr127.0.0.1Server host
auto_browserbooltrueAuto-open browser
cache_max_projectsint5Max projects in memory
cache_max_mb_per_projectint500Max MB per project
messages_initial_loadint500Initial messages to load
max_date_range_daysint30Max days for date range
enable_memory_monitorboolfalseShow memory usage
enable_background_processingbooltrueProcess stats in background
cache_warm_on_startupint3Projects to preload

Environment Variables

All configuration keys can be set via environment variables:

# Examples
export PORT=9000
export AUTO_BROWSER=false
export CACHE_MAX_PROJECTS=10

# Or inline
PORT=9000 sniffly init

Mapping:

  • portPORT
  • hostHOST
  • auto_browserAUTO_BROWSER
  • cache_max_projectsCACHE_MAX_PROJECTS
  • cache_max_mb_per_projectCACHE_MAX_MB_PER_PROJECT
  • etc. (uppercase with underscores)

Configuration Priority

Settings are loaded in priority order:

  1. Command-line arguments
  2. Environment variables
  3. Config file (~/.sniffly/config.json)
  4. Built-in defaults

Exit Codes

  • 0 - Success
  • 1 - General error
  • 2 - Invalid command or arguments

File Locations

  • Configuration: ~/.sniffly/config.json
  • Claude logs: ~/.claude/projects/ (auto-detected)
  • Cache: ~/.sniffly/cache/