Skip to content

IntelligentSandbox/sniper

Repository files navigation

Sniper

Sniper is an AI-powered GitHub App tool/bot that automates code review and bug detection.

Prerequisites

  • Elixir 1.14+
  • Python 3.12+
  • uv (Python package manager)
  • Docker (for Neo4j)

Installation

1. Install Elixir

macOS (Homebrew):

brew install elixir

Ubuntu/Debian:

sudo apt-get install elixir

Other platforms: See the official Elixir installation guide.

2. Install uv (Python package manager)

macOS/Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

Homebrew:

brew install uv

Other platforms: See the uv installation guide.

3. Start Neo4j

docker compose up -d

This starts Neo4j on bolt://localhost:7687 with the browser UI at http://localhost:7474. Default credentials are neo4j/sniper_dev (configurable via NEO4J_AUTH in .env).

4. Install project dependencies

# Install Elixir dependencies
mix deps.get

# Install Python dependencies
cd python
uv sync

Or use the Makefile:

make install

5. Configure environment variables

Copy the example environment file and add your API key:

cp .env.example .env

Edit .env and set your GROQ_API_KEY.

Usage

Running the Elixir webhook server

# Keep the server running (recommended)
make run

# Or with an interactive Elixir shell (useful for development)
iex -S mix

The webhook server will be available at http://localhost:4000.

Local Development with Webhooks

For local development, use smee to forward GitHub webhooks to your local server:

  1. Create a channel at https://smee.io/
  2. Set the Smee URL as your GitHub App's webhook URL
  3. Run the smee client to forward requests:
smee -u https://smee.io/YOUR_CHANNEL_ID --path /webhook --port 4000

Running the Python bridge (standalone)

make run-python