Sourcegraph extensions have been deprecated with the September 2022 Sourcegraph release. Learn more.
Starting with the September 2022 release of Sourcegraph, search export is a core part of the product.
The repo and the docs below are kept to support older Sourcegraph versions.
A Sourcegraph extension to export a list of search results to CSV.
➕ Add to Sourcegraph (for self-hosted instances: visit the Extensions page)
- Enable the extension at https://sourcegraph.com/extensions/sourcegraph/search-export or on the Extensions page of your self-hosted instance.
- Perform a search query on Sourcegraph.
- Press the Sourcegraph: Export search results button above the list of search results. (Note: This may take a while for large result sets. The extension is not optimized for streaming or paginating results.)
- Click
Download CSV
from the pop-up window to download the CSV file.
The extension can be configured through JSON in user, organization or global settings.
{
// The maximum length of the preview for each match ("Search matches" column).
// By default, the limit is 200.
"searchExport.maxMatchContentLength": 50
}
- Run
yarn && yarn run serve
and keep the Parcel bundler process running. - Sideload the extension (at the URL http://localhost:1234 by default) on your Sourcegraph instance or Sourcegraph.com.
When you edit a source file in your editor, Parcel will recompile the extension. Reload the Sourcegraph web page to use run the updated extension.
Run src extension publish
using the Sourcegraph src
CLI.