Skip to content

Instantly share code, notes, and snippets.

@uphy
Created March 5, 2026 02:03
Show Gist options
  • Select an option

  • Save uphy/6cb193d8de14180378feac43e4ff14d5 to your computer and use it in GitHub Desktop.

Select an option

Save uphy/6cb193d8de14180378feac43e4ff14d5 to your computer and use it in GitHub Desktop.
Claude Codeのモデルを切り替えるRaycast Script Command
#!/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