1
0
Files
shell/Makefile

49 lines
1.1 KiB
Makefile
Raw Normal View History

2025-06-01 23:35:22 +09:00
.PHONY: all build install setup run-server run-cli test clean
all: build
2025-06-02 00:32:00 +09:00
# Initial setup (creates venv in ~/.config/syui/ai/shell)
2025-06-01 23:35:22 +09:00
setup:
@./scripts/setup.sh
# Build Rust CLI
build:
cargo build --release
# Run MCP server (after setup)
run-server:
2025-06-02 00:32:00 +09:00
@if [ ! -d "$$HOME/.config/syui/ai/shell/venv" ]; then \
2025-06-01 23:35:22 +09:00
echo "Please run 'make setup' first"; \
exit 1; \
fi
2025-06-02 00:32:00 +09:00
@$$HOME/.config/syui/ai/shell/bin/mcp-server
2025-06-01 23:35:22 +09:00
# Run CLI in development mode
run-cli:
cargo run
2025-06-02 00:32:00 +09:00
# Run aishell (after setup)
2025-06-01 23:35:22 +09:00
run:
2025-06-02 00:32:00 +09:00
@if [ ! -d "$$HOME/.config/syui/ai/shell/venv" ]; then \
2025-06-01 23:35:22 +09:00
echo "Please run 'make setup' first"; \
exit 1; \
fi
2025-06-02 00:32:00 +09:00
@$$HOME/.config/syui/ai/shell/bin/aishell
2025-06-01 23:35:22 +09:00
# Run tests
test:
cargo test
2025-06-02 00:32:00 +09:00
@if [ -d "$$HOME/.config/syui/ai/shell/venv" ]; then \
source $$HOME/.config/syui/ai/shell/venv/bin/activate && python -m pytest tests/; \
2025-06-01 23:35:22 +09:00
fi
# Clean build artifacts
clean:
cargo clean
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
# Remove all installed files (complete uninstall)
uninstall:
2025-06-02 00:32:00 +09:00
rm -rf $$HOME/.config/syui/ai/shell
2025-06-01 23:35:22 +09:00
@echo "ai.shell has been uninstalled"