Skip to main content

Module paths

Module paths 

Source
Expand description

Filesystem path resolution: the per-provider session directories under the user’s home, the tool’s own cache directory, and the dated pricing-cache file naming scheme.

Structs§

HelperPaths
Resolved on-disk locations for every provider’s session logs plus the tool’s cache directory.

Functions§

find_pricing_cache_for_date
Returns the pricing cache path for date only if that file exists.
find_pricing_cache_for_date_in
Returns the pricing cache path for date under an explicit cache dir, only if that file exists.
get_cache_dir
Returns the tool’s cache directory (~/.vct), creating it (and any missing parents) if it does not already exist.
get_claude_credentials_path
Returns the Claude OAuth credentials path (~/.claude/.credentials.json).
get_claude_usage_cache_path
Returns the Claude usage cache path (~/.vct/claude_usage.json).
get_codex_usage_cache_path
Returns the Codex usage cache path (~/.vct/codex_usage.json).
get_config_path
Returns the persistent settings file path (~/.vct/config.toml).
get_copilot_config_path
Returns the Copilot CLI config path (~/.copilot/config.json).
get_copilot_usage_cache_path
Returns the Copilot usage cache path (~/.vct/copilot_usage.json).
get_current_user
Returns the current username from the environment (cached after first call).
get_cursor_auth_path
Returns the Cursor CLI OAuth credentials path ($XDG_CONFIG_HOME/cursor/auth.json or ~/.config/cursor/auth.json).
get_cursor_usage_cache_path
Returns the Cursor usage cache path (~/.vct/cursor_usage.json).
get_machine_id
Returns a unique machine identifier (cached after first call)
get_pricing_cache_path
Returns the pricing cache file path for date.
get_pricing_cache_path_in
Returns the pricing cache file path for date under an explicit cache dir.
get_self_version_cache_path
Returns this tool’s own version record path (~/.vct/version.json).
list_pricing_cache_files
Lists every model_pricing_*.json file in the cache directory.
list_pricing_cache_files_in
Lists every model_pricing_*.json file in an explicit cache dir.
network_disabled
Whether all network access is disabled via VCT_OFFLINE.
resolve_paths
Builds a HelperPaths from the current user’s home directory.
resolve_paths_from_home
Builds a HelperPaths rooted at an explicit home directory, ignoring the environment entirely.