Skip to main content

Requirements

Before installing Retina, ensure you have the following installed:

PHP 8.1+

Required for running Retina

Composer

For dependency management

Git

For installation script
Retina requires PHP 8.1 or higher. Check your version with php --version

Install on macOS and Linux

The easiest way to install Retina on macOS and Linux is using the automated installation script:
1

Run the installation script

Execute the following command in your terminal:
curl -sSL https://raw.githubusercontent.com/chinmay505/retina/main/install.sh | bash
This script will:
  • Clone the Retina repository
  • Install dependencies via Composer
  • Add Retina to your system PATH
2

Verify installation

Check that Retina is installed correctly:
retina --version
You should see output similar to:
Retina version 1.0.0 - PocketMine-MP Plugin Static Analyzer

Install on Windows

Windows users should manually install Retina using the following steps:
1

Clone the repository

Open Command Prompt or PowerShell and clone the Retina repository:
git clone https://github.com/chinmay505/retina.git
cd retina
2

Install dependencies

Install the required Composer dependencies:
composer install --no-dev --optimize-autoloader
The --no-dev flag excludes development dependencies, and --optimize-autoloader improves performance.
3

Add to PATH

You have two options to make Retina accessible from anywhere:Option 1: Add bin directory to PATH
  1. Copy the full path to the bin directory (e.g., C:\retina\bin)
  2. Open System Properties → Advanced → Environment Variables
  3. Edit the Path variable and add the bin directory path
Option 2: Create a batch file wrapperCreate a file named retina.bat in a directory that’s already in your PATH:
@echo off
php "C:\path\to\retina\bin\retina" %*
Replace C:\path\to\retina with your actual installation path.
4

Verify installation

Open a new Command Prompt window and verify the installation:
retina --version
You should see the Retina version information.

Manual installation (all platforms)

If you prefer to install Retina manually or the automated scripts don’t work:
1

Clone the repository

git clone https://github.com/chinmay505/retina.git
cd retina
2

Install dependencies

composer install --no-dev --optimize-autoloader
3

Configure PATH

Add the bin directory to your system PATH, or create a symlink:
# Linux/macOS - create symlink
sudo ln -s /full/path/to/retina/bin/retina /usr/local/bin/retina

# Or add to PATH in ~/.bashrc or ~/.zshrc
export PATH="/full/path/to/retina/bin:$PATH"
4

Verify installation

retina --version

Troubleshooting

If you get a “command not found” error:
  1. Verify the bin directory is in your PATH:
    echo $PATH  # Linux/macOS
    echo %PATH%  # Windows
    
  2. For shell configuration changes, reload your shell:
    source ~/.bashrc  # or ~/.zshrc
    
  3. Try running Retina directly:
    php /path/to/retina/bin/retina --version
    
If you see “Composer autoloader not found”:
  1. Ensure you ran composer install in the Retina directory:
    cd /path/to/retina
    composer install --no-dev --optimize-autoloader
    
  2. Verify the vendor directory exists and contains an autoload.php file
If you get PHP version errors:
  1. Check your PHP version:
    php --version
    
  2. Retina requires PHP 8.1 or higher. Update PHP if needed:
    • macOS: brew upgrade php
    • Linux: Use your package manager (apt, yum, etc.)
    • Windows: Download from php.net
Retina sets a 2GB memory limit by default. If you encounter memory issues:
  1. Edit bin/retina and increase the limit:
    ini_set('memory_limit', '4G');
    
  2. Or set it via PHP configuration:
    php -d memory_limit=4G /path/to/retina/bin/retina run
    
Retina allocates 2GB of memory by default (see bin/retina:6). This ensures large plugins can be analyzed without running out of memory.

Next steps

Quick start guide

Learn how to run your first scan and configure Retina for your project

Build docs developers (and LLMs) love