Sourcegraph App

Sourcegraph App is a lightweight single-binary version of Sourcegraph for your local machine.

It runs alongside your IDE, to provide a better way to understand, browse, and search both the local you're working on as well as remote code on GitHub, GitLab, etc. - bringing Sourcegraph's powerful code search and IDE navigation straight to your laptop. Learn more

Discord Twitter GitHub

Installation

Ensure you have git installed / on your path, then install.

macOS: via homebrew:

brew install sourcegraph/app/sourcegraph

Linux: via deb pkg installer:

dpkg -i <file>.deb

Single-binary zip download:

Usage

Start Sourcegraph by running the following in a terminal:

sourcegraph

Sourcegraph will automatically add any repositories found below the directory you run sourcegraph in.

Your browser should automatically open to http://localhost:3080 - this is the address of the Sourcegraph app.

(Optional) batch changes & precise code intel

Batch changes and precise code intel require the following optional dependencies be installed and on your PATH:

Tips

Get help & give feedback

Sourcegraph app is early-stages, if you run into any trouble or have ideas/feedback, we'd love to hear from you!

Upgrading

macOS (app .dmg installer)

Navigate to your Applications directory using Finder, and delete the old version of Sourcegraph. Then download and run the latest version.

macOS (homebrew)

brew uninstall sourcegraph && brew update && brew install sourcegraph/app/sourcegraph

Linux (deb)

We do not have a PPA yet; so you will need to rerun the installation steps above to get the latest .deb version.

Uninstallation

macOS (app .dmg installer)

Navigate to your Applications directory using Finder, and delete the old version of Sourcegraph.

macOS (homebrew)

brew uninstall sourcegraph

Linux

You can simply delete the sourcegraph binary from your system.

Delete all Sourcegraph data

Warning: This will delete all your Sourcegraph data and you will not be able to recover it!

macOS

rm -rf $HOME/.sourcegraph-psql
rm -rf $HOME/Library/Application\ Support/sourcegraph-sp
rm -rf $HOME/Library/Caches/sourcegraph-sp

Linux

We respect $XDG_CACHE_HOME and $XDG_CONFIG_HOME. If not set, we fall back to $HOME/.cache and $HOME/.config. Thus, you can delete all Sourcegraph data using:

rm -rf $HOME/.sourcegraph-psql
rm -rf $XDG_CACHE_HOME/sourcegraph-sp
rm -rf $XDG_CONFIG_HOME/sourcegraph-sp
rm -rf $HOME/.cache/sourcegraph-sp
rm -rf $HOME/.config/sourcegraph-sp