freedomfromfiat / scanline

Expert AI code reviews Catch bugs before they hurt Run Scanline in your CLI to find: - race conditions - logical errors - security risks - optimizations

Home Page:https://scanline.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ScanLine (Alpha)

Catch bugs before they hurt. ScanLine reviews your code with GPT-4 and shows you how to improve it, like having an experienced code reviewer with you 24/7.

ScanLine is an AI-based CLI tool to quickly check your commit, branch, or entire repo for:

  • 🏁 race conditions
  • 🔒 security gaps
  • 💡 inconsistent logic
  • 🚀 performance
  • ☑️ consistency
  • ⚙️ optimization
  • ⚠️ error handling
scanline-bash-2
ScanLine_UI_Web_example

Why use Scanline?

“Scanline already saved us a few weeks on prod outages by catching race conditions” - CTO, ML infrastructure company

“I used to spend 5+ hours a day reviewing my team's code; now it's less than 1, while also uncovering more high-priority updates” - Eng Manager

“My team started complementing the quality of my PRs” - SWE

"Code gen and automatic PRs are still unreliable, but Scanline's code review is immediately useful and actionable." - Friend who's tried a lot of AI tools

Quick Start - Install

For Apple M1+ Silicon (ARM64):

bash -c "$(curl -sSL https://raw.githubusercontent.com/ScanLineDev/scanline/main/install.sh)"

For Apple Intel (x86):

bash -c "$(curl -sSL https://raw.githubusercontent.com/ScanLineDev/scanline/main/install_x86.sh)"

then:

cd into the repo and branch to review. Run scanline.

(If you happen to not to set an OpenAI key during the install guide, then set a local .env file with your OPENAI_API_KEY, or export OPENAI_API_KEY=xxx.)

1-minute Demo

ScanLine.Demo.v0.2.0.mp4

(Click video to play)

How To Use

# see all available commands
scanline --help 

# check all diffed changes on your current branch compared to main or master
scanline

# only review uncommited changes on the current branch 
scanline --scope commit

# review all the code in the whole repo
scanline --scope repo

# in addition you can specify a single file. For example, here's how to see the changes to the file foo.py across only this last commit
scanline --scope repo --file ./path/to/foo.py

Notes

This should not replace you doing good code review--it is meant to assist!

This is the V0 release, so it may be buggy & design may change quickly.

Contributing

  • Feel free to open a PR with your own changes if you'd like to see something added!
  • Open an issue if you find any bugs or have an ideas

Local development for testing (build with pip):

pip3 install -e .

Now you can run the CLI as reviewme above. It should auto-update if you change the python code. You may have to run pip3 install -r requirements first

Experimental: You can add rule templates to /rule_templates directory. This text will be included in the prompt to the LLM, so the LLM can evaluate the code according to the style guide you write.

Experimental: Modify config.yaml to tweak things like temperature, supported filetypes, and how many results to show per category.

Currently supported languages:

Python - .py
JavaScript - .js
TypeScript - .ts
Shell, Bash - .sh, .bash
Rust - .rs
Go - .go
C - .c
C++ - .cpp, .cc, .cxx, .c++
C# - .cs
Objective-C - .m, .mm
R - .r
Ruby - .rb
PHP - .php
Java - .java
Swift - .swift
Kotlin - .kt, .kts
Scala - .scala
Perl - .pl, .pm
Lua - .lua
Groovy - .groovy, .grvy, .gy, .gvy

About

Expert AI code reviews Catch bugs before they hurt Run Scanline in your CLI to find: - race conditions - logical errors - security risks - optimizations

https://scanline.ai


Languages

Language:Python 68.8%Language:CSS 21.0%Language:Shell 5.4%Language:JavaScript 2.6%Language:HTML 2.2%