Files
claude-dev-container/setup-credentials.sh

55 lines
1.6 KiB
Bash
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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
echo "🔐 Claude Credentials Setup"
echo "============================"
echo ""
# Check if running on Mac
if [[ "$OSTYPE" == "darwin"* ]]; then
echo "✅ Running on Mac"
# Check if ~/.claude exists
if [ -d "$HOME/.claude" ]; then
echo "✅ Found Claude credentials at ~/.claude"
# Create target directory
mkdir -p ./claude-credentials
# Copy credentials
echo ""
echo "Copying credentials..."
cp -r "$HOME/.claude/"* ./claude-credentials/ 2>/dev/null
if [ $? -eq 0 ]; then
echo "✅ Credentials copied to ./claude-credentials/"
echo ""
echo "Next steps:"
echo "1. If deploying to Synology, upload this folder"
echo "2. Or build and run locally: make build && make up"
else
echo "❌ Failed to copy credentials"
exit 1
fi
else
echo "❌ No Claude credentials found at ~/.claude"
echo ""
echo "Please login to Claude Code first:"
echo " 1. Install Claude Code CLI: npm install -g @anthropic-ai/claude-code"
echo " 2. Run: claude"
echo " 3. Complete the login flow"
echo " 4. Run this script again"
exit 1
fi
else
echo " Not running on Mac"
echo ""
echo "To copy credentials from your Mac:"
echo ""
echo " scp -r ~/.claude/ user@this-machine:$(pwd)/claude-credentials"
echo ""
echo "Or manually copy the ~/.claude folder from your Mac"
fi
echo ""
echo "============================"