-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·59 lines (50 loc) · 1.83 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·59 lines (50 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# LLMCommit Installation Script
# Usage: curl -sSL https://raw.githubusercontent.com/0xkaz/llmcommit/main/install.sh | bash
set -e
echo "🚀 Installing LLMCommit..."
# Check if Python is installed
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 is required but not installed."
echo "Please install Python 3.8+ and try again."
exit 1
fi
# Check Python version
python_version=$(python3 -c "import sys; print('.'.join(map(str, sys.version_info[:2])))")
required_version="3.8"
if python3 -c "import sys; exit(0 if sys.version_info >= (3, 8) else 1)" 2>/dev/null; then
echo "✅ Python $python_version detected"
else
echo "❌ Python 3.8+ is required, but $python_version is installed."
exit 1
fi
# Check if pip is installed
if ! command -v pip3 &> /dev/null; then
echo "❌ pip3 is required but not installed."
echo "Please install pip3 and try again."
exit 1
fi
# Install LLMCommit
echo "📦 Installing LLMCommit from PyPI..."
pip3 install --user llmcommit
# Check if installation was successful
if command -v llmcommit &> /dev/null; then
echo "✅ LLMCommit installed successfully!"
echo ""
echo "🎉 Ready to use! Try running:"
echo " llmcommit --help"
echo ""
echo "Quick start:"
echo " cd your-git-repo"
echo " llmcommit # Generate and commit"
echo " llmcommit -a # Auto-add files and commit"
echo " llmcommit --dry-run # Preview commit message"
echo ""
echo "For more information, visit:"
echo " https://github.com/0xkaz/llmcommit"
else
echo "⚠️ Installation completed, but 'llmcommit' command not found."
echo "You may need to add ~/.local/bin to your PATH:"
echo " export PATH=\"\$HOME/.local/bin:\$PATH\""
echo "Add this line to your ~/.bashrc or ~/.zshrc to make it permanent."
fi