Installation Guide
Installation Guide
This guide will walk you through installing Sentinel AI in your PHP project. The installation process is designed to be simple and automatic with cross-platform support.
System Requirements
Minimum Requirements
- PHP: 8.2 or higher
- Platform: Linux, macOS, or Windows
- Memory: 256MB RAM
- Storage: 50MB free space
- Extensions: PHAR extension enabled
Recommended Requirements
- PHP: 8.4 or higher
- Memory: 512MB RAM (1GB+ for large projects)
- Storage: 100MB free space
- Extensions: JSON, Mbstring, OpenSSL
Quick Installation by Operating System
🍎 macOS Installation
Method 1: Automated Installation (Recommended)
# One command installation
curl -sSL https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/install.sh | bash
Method 2: Manual Installation (If automated fails)
# Download files to a temporary directory
cd /tmp
curl -L https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/sentinel-macos-x86_64 -o sentinel-macos-x86_64
curl -L https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/sentinel.phar -o sentinel.phar
curl -L https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/install.sh -o install.sh
# Run installation
chmod +x install.sh
./install.sh
Method 3: Direct PHAR Usage (No installation)
# Download and use directly
curl -L https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/sentinel.phar -o sentinel.phar
chmod +x sentinel.phar
./sentinel.phar --version
🐧 Linux Installation
Method 1: Automated Installation (Recommended)
# One command installation
curl -sSL https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/install.sh | bash
Method 2: Manual Installation (If automated fails)
# Download files to a temporary directory
cd /tmp
curl -L https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/sentinel-linux-x86_64 -o sentinel-linux-x86_64
curl -L https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/sentinel.phar -o sentinel.phar
curl -L https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/install.sh -o install.sh
# Run installation
chmod +x install.sh
./install.sh
Method 3: Direct PHAR Usage (No installation)
# Download and use directly
curl -L https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/sentinel.phar -o sentinel.phar
chmod +x sentinel.phar
./sentinel.phar --version
Ubuntu/Debian Package Manager
# Install PHP if not already installed
sudo apt update
sudo apt install php8.2-cli php8.2-mbstring php8.2-json php8.2-phar
# Then use any of the methods above
🪟 Windows Installation
Method 1: PowerShell Installation (Recommended)
# Run PowerShell as Administrator
Invoke-Expression (Invoke-WebRequest -Uri "https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/install.ps1" -UseBasicParsing).Content
Method 2: Manual Installation
# Download files
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/sentinel-windows-x86_64.bat" -OutFile "sentinel.bat"
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/sentinel.phar" -OutFile "sentinel.phar"
# Add to PATH or use directly
.\sentinel.bat --version
Method 3: Direct PHAR Usage
# Download and use directly
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/sentinel.phar" -OutFile "sentinel.phar"
php sentinel.phar --version
Using Windows Subsystem for Linux (WSL)
# If you have WSL installed, use the Linux commands
curl -sSL https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/install.sh | bash
Installation Methods
Sentinel AI offers different installation options based on your needs:
- Automated Installation (Recommended)
- Manual Download
- Global Installation
- Project-Specific Installation
- Docker Usage
Automated Installation (Recommended)
This is the easiest way to install Sentinel AI:
Note: If the automated installation fails, it's usually because the script expects the binary files to be in the same directory. Use the manual installation method instead.
Linux/macOS
# One command installation
curl -sSL https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/install.sh | bash
Windows
# Run PowerShell as Administrator
Invoke-Expression (Invoke-WebRequest -Uri "https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/install.ps1" -UseBasicParsing).Content
This command will:
- ✅ Download the latest version
- ✅ Install Sentinel AI globally
- ✅ Set up proper permissions
- ✅ Verify installation
- ✅ Add to your PATH
Manual Download
For users who prefer manual installation or when automated installation fails:
Download Latest Version
Platform-Specific Binaries
Platform | File | Description |
---|---|---|
Universal | sentinel.phar |
Cross-platform PHAR executable |
Linux | sentinel-linux-x86_64 |
Native Linux binary |
macOS | sentinel-macos-x86_64 |
Native macOS binary |
Windows | sentinel-windows-x86_64.bat |
Windows batch file wrapper |
Global Installation
Install Sentinel AI globally so it's available from any directory:
Project-Specific Installation
Install Sentinel AI in a specific project directory:
# Create project directory
mkdir my-php-project
cd my-php-project
# Download Sentinel AI to project
curl -L https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/sentinel.phar -o sentinel.phar
chmod +x sentinel.phar
# Use from project directory
./sentinel.phar analyze src/
Docker Usage
Use Sentinel AI in a Docker container:
# Dockerfile
FROM php:8.4-cli
# Install required extensions
RUN docker-php-ext-install phar mbstring json
# Download Sentinel AI
RUN curl -L https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/sentinel.phar -o /usr/local/bin/sentinel \
&& chmod +x /usr/local/bin/sentinel
# Set working directory
WORKDIR /app
# Run Sentinel AI
CMD ["sentinel", "analyze", "."]
Docker Compose
# docker-compose.yml
version: '3.8'
services:
sentinel:
build: .
volumes:
- .:/app
command: sentinel analyze .
Verification
After installation, verify everything is working:
# Test the installation
sentinel --version
# Run a quick analysis
sentinel analyze src/
# Check help
sentinel --help
Update Instructions
Linux/macOS
# Check current version
sentinel --version
# Update to latest version
curl -sSL https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/install.sh | bash
Windows
# Check current version
sentinel --version
# Update to latest version
Invoke-Expression (Invoke-WebRequest -Uri "https://raw.githubusercontent.com/abdulbaquee/sentinel-ai-releases/main/releases/v1.0.6/install.ps1" -UseBasicParsing).Content
Uninstallation
Linux/macOS
# Remove global installation
sudo rm /usr/local/bin/sentinel
# Or remove from ~/bin
rm ~/bin/sentinel
Windows
# Remove from PATH directory
del C:\tools\sentinel.phar
del C:\tools\sentinel.bat
Troubleshooting
Common Issues:
- Permission Denied: Make sure the binary is executable:
chmod +x sentinel
- Not Found: Ensure Sentinel AI is in your PATH or use the full path
- PHP Version: Make sure you have PHP 8.2+ installed
- PHAR Extension: Ensure PHAR extension is enabled in PHP
- Memory Issues: Increase PHP memory limit for large projects
- Automated Installation Fails: Use manual installation method instead
PHAR Configuration
Ensure proper PHAR configuration in your PHP settings:
// php.ini settings
phar.readonly = 0
phar.require_hash = 1
phar.cache_list = []
Next Steps
Once installation is complete:
- Learn how to use Sentinel AI
- Create custom analysis rules
- Configure your project-specific settings
- Set up CI/CD integration