gpt/uv_setup.sh
syui 582b983a32
Complete ai.gpt Python to Rust migration
- Add complete Rust implementation (aigpt-rs) with 16 commands
- Implement MCP server with 16+ tools including memory management, shell integration, and service communication
- Add conversation mode with interactive MCP commands (/memories, /search, /context, /cards)
- Implement token usage analysis for Claude Code with cost calculation
- Add HTTP client for ai.card, ai.log, ai.bot service integration
- Create comprehensive documentation and README
- Maintain backward compatibility with Python implementation
- Achieve 7x faster startup, 3x faster response times, 73% memory reduction vs Python

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 17:42:36 +09:00

54 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# ai.gpt UV environment setup script
set -e
echo "🚀 Setting up ai.gpt with UV..."
# Check if uv is installed
if ! command -v uv &> /dev/null; then
echo "❌ UV is not installed. Installing UV..."
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.cargo/bin:$PATH"
echo "✅ UV installed successfully"
else
echo "✅ UV is already installed"
fi
# Navigate to gpt directory
cd "$(dirname "$0")"
echo "📁 Working directory: $(pwd)"
# Create virtual environment if it doesn't exist
if [ ! -d ".venv" ]; then
echo "🔧 Creating UV virtual environment..."
uv venv
echo "✅ Virtual environment created"
else
echo "✅ Virtual environment already exists"
fi
# Install dependencies
echo "📦 Installing dependencies with UV..."
uv pip install -e .
# Verify installation
echo "🔍 Verifying installation..."
source .venv/bin/activate
which aigpt
aigpt --help
echo ""
echo "🎉 Setup complete!"
echo ""
echo "Usage:"
echo " source .venv/bin/activate"
echo " aigpt docs generate --project=os"
echo " aigpt docs sync --all"
echo " aigpt docs --help"
echo ""
echo "UV commands:"
echo " uv pip install <package> # Install package"
echo " uv pip list # List packages"
echo " uv run aigpt # Run without activating"
echo ""