1
0

fix config

This commit is contained in:
2025-06-02 00:32:00 +09:00
parent 0f3776e75e
commit 81ae0037d9
12 changed files with 57 additions and 52 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
# ai.shell setup script for macOS
# Sets up Python venv environment in ~/.config/ai-shell
# Sets up Python venv environment in ~/.config/syui/ai/shell
set -e
@ -12,7 +12,7 @@ YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Directories
CONFIG_DIR="$HOME/.config/ai-shell"
CONFIG_DIR="$HOME/.config/syui/ai/shell"
VENV_DIR="$CONFIG_DIR/venv"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
@ -72,7 +72,7 @@ cat > "$CONFIG_DIR/bin/mcp-server" << 'EOF'
#!/bin/bash
# MCP Server startup script
CONFIG_DIR="$HOME/.config/ai-shell"
CONFIG_DIR="$HOME/.config/syui/ai/shell"
VENV_DIR="$CONFIG_DIR/venv"
# Activate virtual environment
@ -85,12 +85,12 @@ EOF
chmod +x "$CONFIG_DIR/bin/mcp-server"
# Create ai-shell wrapper script
cat > "$CONFIG_DIR/bin/ai-shell" << EOF
# Create aishell wrapper script
cat > "$CONFIG_DIR/bin/aishell" << EOF
#!/bin/bash
# ai-shell wrapper script
# aishell wrapper script
CONFIG_DIR="\$HOME/.config/ai-shell"
CONFIG_DIR="\$HOME/.config/syui/ai/shell"
PROJECT_DIR="$PROJECT_DIR"
# Check if MCP server is running
@ -107,12 +107,12 @@ if ! curl -s http://localhost:8765/health > /dev/null 2>&1; then
done
fi
# Run ai-shell CLI
# Run aishell CLI
cd "\$PROJECT_DIR"
cargo run --release -- "\$@"
EOF
chmod +x "$CONFIG_DIR/bin/ai-shell"
chmod +x "$CONFIG_DIR/bin/aishell"
# Check if Ollama is installed
echo -e "${YELLOW}🦙 Checking Ollama...${NC}"
@ -140,9 +140,9 @@ cargo build --release
echo -e "\n${GREEN}✨ Setup complete!${NC}"
echo -e "\n${BLUE}To use ai.shell:${NC}"
echo -e "1. Add to your PATH: ${YELLOW}export PATH=\"\$HOME/.config/ai-shell/bin:\$PATH\"${NC}"
echo -e "2. Run: ${YELLOW}ai-shell${NC}"
echo -e "\nOr use the full path: ${YELLOW}~/.config/ai-shell/bin/ai-shell${NC}"
echo -e "1. Add to your PATH: ${YELLOW}export PATH=\"\$HOME/.config/syui/ai/shell/bin:\$PATH\"${NC}"
echo -e "2. Run: ${YELLOW}aishell${NC}"
echo -e "\nOr use the full path: ${YELLOW}~/.config/syui/ai/shell/bin/aishell${NC}"
# Deactivate virtual environment
deactivate

View File

@ -1,9 +1,9 @@
#!/bin/bash
# ai.shell startup script (uses ~/.config/ai-shell setup)
# ai.shell startup script (uses ~/.config/syui/ai/shell setup)
set -e
CONFIG_DIR="$HOME/.config/ai-shell"
CONFIG_DIR="$HOME/.config/syui/ai/shell"
# Check if setup has been run
if [ ! -d "$CONFIG_DIR/venv" ]; then
@ -12,5 +12,5 @@ if [ ! -d "$CONFIG_DIR/venv" ]; then
exit 1
fi
# Run ai-shell
exec "$CONFIG_DIR/bin/ai-shell" "$@"
# Run aishell
exec "$CONFIG_DIR/bin/aishell" "$@"