Created
March 5, 2026 02:03
-
-
Save uphy/6cb193d8de14180378feac43e4ff14d5 to your computer and use it in GitHub Desktop.
Claude Codeのモデルを切り替えるRaycast Script Command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/zsh | |
| # @raycast.schemaVersion 1 | |
| # @raycast.title Set Claude Code Model | |
| # @raycast.mode compact | |
| # @raycast.icon 🤖 | |
| # @raycast.packageName Claude | |
| # @raycast.argument1 { "type": "dropdown", "placeholder": "Model", "data": [{"title": "opusplan", "value": "opusplan"}, {"title": "opus", "value": "opus"}, {"title": "sonnet", "value": "sonnet"}, {"title": "haiku", "value": "haiku"}] } | |
| MODEL="$1" | |
| SETTINGS="$HOME/.claude/settings.json" | |
| if sed -i '' "s/\"model\": \"[^\"]*\"/\"model\": \"$MODEL\"/" "$SETTINGS"; then | |
| echo "Model set to $MODEL" | |
| else | |
| echo "Error: failed to update $SETTINGS" | |
| exit 1 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment