ccusage / _consts
_consts
Note: These constants are internal implementation details and are not exported in the public API. They are documented here for reference purposes only.
Variables
Variable | Description |
---|---|
LITELLM_PRICING_URL | URL for LiteLLM's model pricing and context window data |
DEFAULT_RECENT_DAYS | Default number of recent days to include when filtering blocks Used in both session blocks and commands for consistent behavior |
BLOCKS_WARNING_THRESHOLD | Threshold percentage for showing usage warnings in blocks command (80%) When usage exceeds this percentage of limits, warnings are displayed |
BLOCKS_COMPACT_WIDTH_THRESHOLD | Terminal width threshold for switching to compact display mode in blocks command Below this width, tables use more compact formatting |
BLOCKS_DEFAULT_TERMINAL_WIDTH | Default terminal width when stdout.columns is not available in blocks command Used as fallback for responsive table formatting |
DEBUG_MATCH_THRESHOLD_PERCENT | Threshold percentage for considering costs as matching (0.1% tolerance) Used in debug cost validation to allow for minor calculation differences |
USER_HOME_DIR | User's home directory path Centralized access to OS home directory for consistent path building |
DEFAULT_CLAUDE_CODE_PATH | Default Claude data directory path (~/.claude) Used as base path for loading usage data from JSONL files |
DEFAULT_CLAUDE_CONFIG_PATH | Default Claude data directory path using XDG config directory Uses XDG_CONFIG_HOME if set, otherwise falls back to ~/.config/claude |
CLAUDE_CONFIG_DIR_ENV | Environment variable for specifying multiple Claude data directories Supports comma-separated paths for multiple locations |
CLAUDE_PROJECTS_DIR_NAME | Claude projects directory name within the data directory Contains subdirectories for each project with usage data |
USAGE_DATA_GLOB_PATTERN | JSONL file glob pattern for finding usage data files Used to recursively find all JSONL files in project directories |
MCP_DEFAULT_PORT | Default port for MCP server HTTP transport Used when no port is specified for MCP server communication |
DEFAULT_REFRESH_INTERVAL_SECONDS | Default refresh interval in seconds for live monitoring mode Used in blocks command for real-time updates |
MIN_REFRESH_INTERVAL_SECONDS | Minimum refresh interval in seconds for live monitoring mode Prevents too-frequent updates that could impact performance |
MAX_REFRESH_INTERVAL_SECONDS | Maximum refresh interval in seconds for live monitoring mode Prevents too-slow updates that reduce monitoring effectiveness |