Deep Search, Code Search, and Batch Changes on Sourcegraph with Raycast.
Install · Setup · Commands · Issues · Changelog · Contributing

To get started, install Raycast and install the Sourcegraph extension from the Raycast extensions store.
Alternatively, you can install this extension from source.
This extension adds a variety of commands for interacting with Sourcegraph. Some configuration is required to use certain features, most notably the variants of each command for custom Sourcegraph Instances, though you can get started with Sourcegraph.com commands without any additional setup.
To start searching code on your own Sourcegraph instance or workspace:
You can set up access through the 'Sourcegraph' variants of this extensions's commands by configuring the "Sourcegraph: URL" in the Sourcegraph Raycast extension preferences, as well as one of the following:
sgp_...) under the "Access tokens" tab in your user settings in Sourcegraph, and set it in the "Sourcegraph Instance: Access token" field in the extension preferences.
example.sourcegraph.app as a URL and go to https://example.sourcegraph.app/user/settings/tokens/new to create an access token for use in this extension.No setup is required to connect to Sourcegraph.com through the 'Sourcegraph.com' variants of this extensions's commands. To configure your own search contexts, sign up for a Sourcegraph.com account!
Once you have an account, you can create an access token under the "Access tokens" tab in your user settings on Sourcegraph.com. Copy that access token to the "Sourcegraph.com: Access token" field in the Sourcegraph Raycast extension preferences to authenticate your search queries.
To search your private code, please reach out get a demo of the single-tenant solution or try out a self-hosted installation of Sourcegraph.

Get results as you type on code search over your code and many public repositories.
Search contexts allow you to narrow down your search to code you care about.
The Sourcegraph Raycast extension allows you to set a default context for your searches in the "Search Code" command preferences.
Browse, manage, and run recent code searches. New searches can also easily be launched from the Code Search History command.
Recent searches are persisted locally through a native Raycast API.


Get answers to natural language questions about your code with Deep Search, Sourcegraph's agentic code search.
Browse, view, and manage your recent Deep Search conversations.
Browse, view, publish, and merge changesets for batch changes straight from Raycast. Batch Changes automate large-scale code changes to keep your code up to date, fix critical security issues, and pay down tech debt across all of your repositories.
[!NOTE] Batch Changes are currently only supported when connected to a self-hosted Sourcegraph instance or Sourcegraph Cloud instance. To use this command, you must also enable it in the Raycast Sourcegraph extension preferences.

The changelog documents all notable updates to the extension.
Updates will be regularly published to the Raycast Extensions repository from the bobheadxi/raycast-sourcegraph repository.
To try out yet-to-be-published changes, you can install this extension from source.
See CONTRIBUTING.md if you're interested in contributing to this extension!
Have ideas or suggestions? Please feel free to open an issue with feedback!
Agentic, natural language code search.
List and manage Deep Search conversations.
Search code on a Sourcegraph instance or workspace.
Browse and launch recent code searches.
Manage Batch Changes in Sourcegraph.
Search public repositories on Sourcegraph.com
Browse and launch recent code searches.
Copy File Path and Open File in Browser actions.Cmd-Enter shortcut used for options like "Open Query in Browser" is now Cmd-Shift-Enter to avoid conflicts with reserved Raycast shortcuts.Sourcegraph Instance: Proxy option; note that HTTP proxies are not yet supported (#21)@ appended.repo:sourcegraph@3.41) now annotate results with which revision the match was on, and drilldowns (Tab on a result) now more consistently apply the appropriate revision to generated searches.repo: filter.graphql-code-generator (#16)Cmd-S shortcut. For example, on a repository result, Cmd-S will start a search with the repo: filter.type:path or select:file) now render a preview of the file contents.repo: or type:repo) now render the repository's README.md.content match results./search/stream endpoint in favour of /.api/search/stream.content and symbol matches, if there is more than 1 result in the match, the default command when pressing Enter is now a revamped peek view that allows you to filter and jump to specific results. (#4)Cmd-Shift-O. (#3)