Profile represents one named LangSmith CLI profile.
type Profile structProfile represents one named LangSmith CLI profile.
Instead of storing the API key, a profile can name where it lives: APIKeyEnv is an environment variable and APIKeyCmd a shell command that prints the key. APIKey wins over APIKeyEnv, which wins over APIKeyCmd.
A SecretStore of "keychain" keeps APIKey in the OS keychain instead of the file, along with OAuth tokens the Go SDK moved there. Load reads them into the profile and Save writes them back where they came from, so the rest of the CLI sees them wherever they are stored. OAuth tokens in the file stay there: the Go SDK release the CLI uses refreshes tokens only from the file.
HasOAuthTokens reports whether the profile holds OAuth tokens from a login.
AccessToken returns the OAuth access token to use for bearer auth.
HasAPIKey reports whether the profile stores an API key or names where one.
APIKeySource describes where the profile's API key comes from, for display:.
ResolveAPIKey returns the profile's API key, reading api_key_env or running.
TokenExpiresAtTime parses oauth.expires_at.