Skip to content

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

VariableDescription
LITELLM_PRICING_URLURL for LiteLLM's model pricing and context window data
DEFAULT_RECENT_DAYSDefault number of recent days to include when filtering blocks Used in both session blocks and commands for consistent behavior
BLOCKS_WARNING_THRESHOLDThreshold percentage for showing usage warnings in blocks command (80%) When usage exceeds this percentage of limits, warnings are displayed
BLOCKS_COMPACT_WIDTH_THRESHOLDTerminal width threshold for switching to compact display mode in blocks command Below this width, tables use more compact formatting
BLOCKS_DEFAULT_TERMINAL_WIDTHDefault terminal width when stdout.columns is not available in blocks command Used as fallback for responsive table formatting
DEBUG_MATCH_THRESHOLD_PERCENTThreshold percentage for considering costs as matching (0.1% tolerance) Used in debug cost validation to allow for minor calculation differences
USER_HOME_DIRUser's home directory path Centralized access to OS home directory for consistent path building
DEFAULT_CLAUDE_CODE_PATHDefault Claude data directory path (~/.claude) Used as base path for loading usage data from JSONL files
DEFAULT_CLAUDE_CONFIG_PATHDefault Claude data directory path using XDG config directory Uses XDG_CONFIG_HOME if set, otherwise falls back to ~/.config/claude
CLAUDE_CONFIG_DIR_ENVEnvironment variable for specifying multiple Claude data directories Supports comma-separated paths for multiple locations
CLAUDE_PROJECTS_DIR_NAMEClaude projects directory name within the data directory Contains subdirectories for each project with usage data
USAGE_DATA_GLOB_PATTERNJSONL file glob pattern for finding usage data files Used to recursively find all JSONL files in project directories
MCP_DEFAULT_PORTDefault port for MCP server HTTP transport Used when no port is specified for MCP server communication
DEFAULT_REFRESH_INTERVAL_SECONDSDefault refresh interval in seconds for live monitoring mode Used in blocks command for real-time updates
MIN_REFRESH_INTERVAL_SECONDSMinimum refresh interval in seconds for live monitoring mode Prevents too-frequent updates that could impact performance
MAX_REFRESH_INTERVAL_SECONDSMaximum refresh interval in seconds for live monitoring mode Prevents too-slow updates that reduce monitoring effectiveness

Released under the MIT License.