# sophnet-sophon-key > Use when SOPH_API_KEY is missing, invalid, or not persisted across sessions, and the caller needs credential resolution from environment variables or Moltbot config. - Author: shutong.shan - Repository: DuffyCoder/awesome-sophnet-skills - Version: 20260206121643 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/DuffyCoder/awesome-sophnet-skills - Web: https://mule.run/skillshub/@@DuffyCoder/awesome-sophnet-skills~sophnet-sophon-key:20260206121643 --- --- name: sophnet-sophon-key description: Use when SOPH_API_KEY is missing, invalid, or not persisted across sessions, and the caller needs credential resolution from environment variables or Moltbot config. --- # Sophnet Sophon Key ## Overview Resolve and persist `SOPH_API_KEY` for Sophnet-authenticated scripts. ## When to Use - A script fails with missing/invalid API key errors. - `SOPH_API_KEY` exists in config but is not exported in current shell. - Key works in one terminal but disappears in new sessions. - Do not use when key is already present and valid in environment. ## Quick Reference | Goal | Command | | --- | --- | | Check and resolve key | `bash {baseDir}/scripts/get-key.sh` | | Print key only (for scripts) | `bash {baseDir}/scripts/get-key.sh --output-quiet` | | Interactive persistent setup | `bash {baseDir}/scripts/setup-key.sh` | Resolution order: 1. Existing `SOPH_API_KEY` in environment. 2. Moltbot config (`MOLTBOT_CONFIG` or `~/.clawdbot/moltbot.json`). 3. Interactive setup flow. ## Implementation 1. Run `get-key.sh` first. 2. If unresolved, run `setup-key.sh` and reload shell profile. 3. Retry the original caller command. ## Common Mistakes - Expecting persistence without reloading shell profile. - Using normal output mode in automation that expects raw key value only.