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§
- Helper
Paths - 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
dateonly if that file exists. - find_
pricing_ cache_ for_ date_ in - Returns the pricing cache path for
dateunder 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.jsonor~/.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
dateunder 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_*.jsonfile in the cache directory. - list_
pricing_ cache_ files_ in - Lists every
model_pricing_*.jsonfile in an explicit cache dir. - network_
disabled - Whether all network access is disabled via
VCT_OFFLINE. - resolve_
paths - Builds a
HelperPathsfrom the current user’s home directory. - resolve_
paths_ from_ home - Builds a
HelperPathsrooted at an explicit home directory, ignoring the environment entirely.