Files
claude/scripts/claude-help.sh
2025-07-05 13:48:50 +09:00

184 lines
6.3 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Claude Code拡張ヘルプコマンド
# カラー定義
BLUE='\033[0;34m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
CYAN='\033[0;36m'
NC='\033[0m'
# ヘルプカテゴリを表示
show_category() {
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
echo -e "${GREEN}$1${NC}"
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
}
# メインヘルプ関数
claude_help() {
clear
echo -e "${CYAN}🤖 Claude Code 拡張ヘルプ${NC}\n"
show_category "📝 テキスト入力ショートカット"
cat << 'EOF'
^A (Ctrl+A) ・・・行頭に移動
^E (Ctrl+E) ・・・行末に移動
^B (Ctrl+B) ・・・1文字前に戻る
^F (Ctrl+F) ・・・1文字後に進む
^W (Ctrl+W) ・・・単語単位で削除
^K (Ctrl+K) ・・・カーソル位置から行末まで削除
^U (Ctrl+U) ・・・カーソル位置から行頭まで削除
^J (Ctrl+J) ・・・改行Enter代替
^R (Ctrl+R) ・・・履歴検索
EOF
show_category "🎮 Claude Code特有の操作"
cat << 'EOF'
ESC×1 ・・・入力中のテキストを全消去
ESC×2 ・・・前のメッセージに戻る
\ + Enter ・・・複数行入力(確実に動作)
Tab ・・・オートコンプリート
↑/↓ ・・・コマンド履歴
EOF
show_category "🚀 起動オプション"
cat << 'EOF'
claude --resume ・・・前回のセッションを復元
claude --dangerously-skip-permissions ・・・許可確認をスキップ(危険)
claude --thinking ・・・思考プロセスを表示
claude --model MODEL_NAME ・・・特定のモデルを使用
claude IMAGE.png ・・・画像を含めて起動
EOF
show_category "💭 思考モード"
cat << 'EOF'
think ・・・標準的な思考モード
think hard ・・・より深い思考モード
ultrathink ・・・最も深い思考モード(時間がかかる)
EOF
show_category "📚 公式ドキュメント"
cat << 'EOF'
概要 : https://docs.anthropic.com/en/docs/claude-code/overview
クイックスタート: https://docs.anthropic.com/en/docs/claude-code/quickstart
メモリ管理 : https://docs.anthropic.com/en/docs/claude-code/memory
ワークフロー: https://docs.anthropic.com/en/docs/claude-code/common-workflows
設定 : https://docs.anthropic.com/en/docs/claude-code/settings
トラブルシューティング: https://docs.anthropic.com/en/docs/claude-code/troubleshooting
EOF
show_category "🛠️ スラッシュコマンド"
cat << 'EOF'
/help ・・・ヘルプを表示
/clear ・・・会話をクリア
/init ・・・CLAUDE.mdを生成
/web ・・・Web検索を有効化
/exit ・・・セッションを終了
EOF
show_category "⚡ Tips"
cat << 'EOF'
• 画像はクリップボードから直接ペースト可能
• #で始まるメッセージはCLAUDE.mdに追加される
• ~/.claude/settings.jsonで詳細設定が可能
• ~/.claude/CLAUDE.mdでグローバル設定を記述
EOF
echo -e "${YELLOW}詳細は 'claude-help [カテゴリ]' で確認できます${NC}"
echo -e "${YELLOW}カテゴリ: shortcuts, options, thinking, docs, slash, tips${NC}"
}
# カテゴリ別ヘルプ
case "$1" in
"shortcuts"|"s")
show_category "📝 テキスト入力ショートカット詳細"
cat << 'EOF'
基本移動:
^A (Ctrl+A) - カーソルを行頭に移動
^E (Ctrl+E) - カーソルを行末に移動
^B (Ctrl+B) - 1文字左へ移動
^F (Ctrl+F) - 1文字右へ移動
単語移動:
Alt+B - 1単語左へ移動
Alt+F - 1単語右へ移動
削除・編集:
^W (Ctrl+W) - 単語単位で後方削除
^K (Ctrl+K) - カーソル位置から行末まで削除
^U (Ctrl+U) - カーソル位置から行頭まで削除
^D (Ctrl+D) - カーソル位置の文字を削除
^Y (Ctrl+Y) - 最後に削除したテキストを貼り付け
履歴・検索:
^R (Ctrl+R) - インクリメンタル履歴検索
^G (Ctrl+G) - 履歴検索をキャンセル
↑/↓ - コマンド履歴を順番に表示
EOF
;;
"options"|"o")
show_category "🚀 起動オプション詳細"
cat << 'EOF'
セッション管理:
--resume 前回のセッションを復元
--dangerously-skip-permissions 許可確認をスキップ(注意)
思考モード:
--thinking 思考プロセスを表示
モデル選択:
--model claude-3-opus-20240229 特定のモデルを使用
設定:
--settings path/to/settings.json カスタム設定ファイルを使用
その他:
claude IMAGE.png 画像を含めて起動
claude "質問内容" 直接質問を投げる
EOF
;;
"docs"|"d")
show_category "📚 公式ドキュメントリンク"
cat << 'EOF'
基本:
概要: https://docs.anthropic.com/en/docs/claude-code/overview
クイックスタート: https://docs.anthropic.com/en/docs/claude-code/quickstart
機能:
メモリ管理: https://docs.anthropic.com/en/docs/claude-code/memory
ワークフロー: https://docs.anthropic.com/en/docs/claude-code/common-workflows
IDE統合: https://docs.anthropic.com/en/docs/claude-code/ide-integrations
MCP: https://docs.anthropic.com/en/docs/claude-code/mcp
設定・管理:
設定: https://docs.anthropic.com/en/docs/claude-code/settings
フック: https://docs.anthropic.com/en/docs/claude-code/hooks
セキュリティ: https://docs.anthropic.com/en/docs/claude-code/security
トラブルシューティング:
トラブルシューティング: https://docs.anthropic.com/en/docs/claude-code/troubleshooting
その他:
GitHub Issues: https://github.com/anthropics/claude-code/issues
EOF
;;
"")
claude_help
;;
*)
echo "不明なカテゴリ: $1"
echo "利用可能: shortcuts, options, thinking, docs, slash, tips"
;;
esac