MCPcopy Create free account
hub / github.com/RightNow-AI/rightnow-cli / save_api_key

Method save_api_key

rightnow_cli/cache.py:99–106  ·  view source on GitHub ↗

Save API key to config (prevents saving placeholder keys).

(self, api_key: str)

Source from the content-addressed store, hash-verified

97 return api_key
98
99 def save_api_key(self, api_key: str):
100 """Save API key to config (prevents saving placeholder keys)."""
101 # Don't save placeholder keys
102 if api_key == "sk-temp-placeholder":
103 return
104 config = self.get_config()
105 config['openrouter_api_key'] = api_key
106 self.save_config(config)
107
108 def clear_placeholder_api_key(self):
109 """Remove placeholder API key from config if it exists."""

Callers 7

_setup_api_keyMethod · 0.80
handle_commandFunction · 0.80
interactive_modeFunction · 0.80
_setup_api_keyMethod · 0.80
_setup_api_keyMethod · 0.80
_setup_api_keyMethod · 0.80
test_save_api_keyMethod · 0.80

Calls 2

get_configMethod · 0.95
save_configMethod · 0.95

Tested by 1

test_save_api_keyMethod · 0.64