Module credentials

Module credentials 

Source
Expand description

Credential management module for Claude Code Switcher

This module provides functionality to save and retrieve API keys for different AI providers. Credentials are stored in plain text since they’re typically managed through environment variables.

Version management strategy:

  • Current version: v2 (simplified from previous encryption-based approach)
  • Future versions should increment the version number when format changes are needed

Structs§

CredentialData
Core credential data structure
CredentialStore
High-level credential management
SavedCredentialStore
Storage backend for credential files

Constants§

CURRENT_CREDENTIAL_VERSION
Current credential data format version

Functions§

get_api_key_interactively
Get API key interactively using simple selector
prompt_save_credential
Prompt user to save a credential interactively
select_credential
Helper function to select a credential from a list

Type Aliases§

SavedCredential
Result type for credential operations