Search your code and 2M+ public repositories on Sourcegraph directly within Raycast.

Overview

sourcegraph

Sourcegraph for Raycast

Search your code and 2M+ public repositories on Sourcegraph directly within Raycast.

Install · Setup · Commands · Issues · Changelog · Contributing

demo


Install

To get started, install Raycast and install the Sourcegraph extension from the Raycast extensions store.

Alternatively, you can install this extension from source.


Setup

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 Sourcegraph Self-Hosted, though you can get started with Sourcegraph Cloud commands without any additional setup.

Sourcegraph Cloud

No setup is required to connect to Sourcegraph Cloud! To search your private code, configure your own search contexts, create your own search notebooks, and more, sign up for a Sourcegraph Cloud account!

Once you have an account, you can create an access token under the "Access tokens" tab in your user settings on Sourcegraph Cloud. Copy that access token to the "Sourcegraph Cloud: Access token" field in the Sourcegraph Raycast extension preferences to authenticate your search queries.

Sourcegraph Self-Hosted

To start searching code on a self-hosted Sourcegraph instance, you can set up access to any Sourcegraph instance by configuring the "Sourcegraph Self-Hosted: Instance URL" and "Sourcegraph Self-Hosted: Access token" fields in the Sourcegraph Raycast extension preferences. You can create an access token under the "Access tokens" tab in your user settings on your Sourcegraph instance.


Commands

Search Code

Get results as you type on code search over your code and 2M+ public repositories.

Search contexts

Search contexts allow you to narrow down your search to code you care about. To get started, you can try the public Sourcegraph Cloud contexts, or configure your own in your Sourcegraph Cloud account or Sourcegraph instance's "Contexts" page!

The Sourcegraph Raycast extension allows you to set a default context for your searches in the "Search Code" command preferences. To override it for a search, just include a context: parameter in your query.

Find Search Notebooks

Browse and preview search notebooks.


Changelog

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.


Contributing

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!


Comments
  • improve validation and error messages for self-hosted config

    improve validation and error messages for self-hosted config

    Looks like when a non-auth error happens, JSON.stringify prints nothing - this was caused by a trailing slash, can improve validation on that too and maybe cleaning

    https://sourcegraph.com/github.com/bobheadxi/raycast-sourcegraph/-/blob/src/hooks/checkAuthEffect.tsx?L18-28

    bug 
    opened by bobheadxi 3
  • symbol match URL is incorrect

    symbol match URL is incorrect

    With this query: repo:github.com/sourcegraph/sourcegraph@rockskip-symbols type:symbol queryBlobs

    CleanShot 2022-02-15 at 20 21 35@2x

    After I hit enter, I get taken to https://sourcegraph.com/github.com/sourcegraph/sourcegraph@rockskip-symbols/-/blob/enterprise/internal/rockskip/lib.go/github.com/sourcegraph/sourcegraph@rockskip-symbols/-/blob/enterprise/internal/rockskip/lib.go#L918:6-918:16

    CleanShot 2022-02-15 at 20 21 55@2x bug 
    opened by chrismwendt 1
  • search: add support for chunkMatches

    search: add support for chunkMatches

    This hasn't landed upstream yet (https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/client/shared/src/search/stream.ts?L45-55) but this is WIP support for chunkMatches that will replace lineMatches eventually: https://github.com/sourcegraph/sourcegraph/pull/37582#issuecomment-1205438695

    Closes #17

    opened by bobheadxi 0
  • gql: migrate to graphql codegen

    gql: migrate to graphql codegen

    Looks like the apollo codegen tool is getting officially deprecated: https://github.com/apollographql/apollo-tooling/pull/2619

    This new tooling is much nicer to use (https://www.graphql-code-generator.com/) but generates a very large file. Unfortunately I don't think there's a way around it, except to wait for https://github.com/dotansimha/graphql-code-generator/issues/4562

    opened by bobheadxi 0
  • prefs: remove trailing slash of self-hosted instance URL

    prefs: remove trailing slash of self-hosted instance URL

    Fixes #8

    Test

    CleanShot 2022-02-25 at 16 59 09@2x

    Lint

    λ raycast-sourcegraph → λ git main) ✗ → npm run fmt
    
    > fmt
    > ray lint --fix
    
    ready - run ESLint
    ready - run Prettier
    ready - no ESLint or Prettier issues found
    λ raycast-sourcegraph → λ git main) ✗ → npm run lint
    
    > lint
    > ray lint
    
    ready - run ESLint
    ready - run Prettier
    ready - no ESLint or Prettier issues found
    

    Followup

    • [ ] Make a new release to the Raycast store
    opened by unknwon 0
  • search: fix symbol match URLs

    search: fix symbol match URLs

    As reported in https://github.com/bobheadxi/raycast-sourcegraph/issues/6 . Symbol match URL is a full path, e.g.

    /github.com/sourcegraph/sourcegraph@rockskip-symbols/-/blob/enterprise/internal/rockskip/lib.go#L918:6-918:16
    

    The getMatchURL copied from stream.ts gives us most of the same thing, and I was appending this URL to the match URL, creating an invalid URL. I could append this to src.instance instead, but for consistency with content matches which append ?${lineNumber}, I've added a preprocessor to turn url into just the anchor link and append it to the match URL.

    Closes https://github.com/bobheadxi/raycast-sourcegraph/issues/6

    Tested:

    • single result match, e.g. repo:github.com/sourcegraph/sourcegraph@rockskip-symbols type:symbol queryBlobs
    • multi result symbol match, e.g. context:@sourcegrapha/all monitoring type:symbol f:gcp
    opened by bobheadxi 0
  • notebooks: add find search notebooks command

    notebooks: add find search notebooks command

    Add support for Sourcegraph Search Notebooks

    • [x] initial/no query: show starred
    • [x] initial/no query: show suggestion to create a notebook
    • [x] search: order by stars descending
    • [x] results: peek a simple render of notebook blocks
    • [x] support custom Sourcegraph instance
    image image
    opened by bobheadxi 0
A Raycast Extension to view your replicate.com image collection

Replicate API Raycast Extension View your prediction history and search for predictions by prompt. Create an account and get an API token here (requir

Kevin Batdorf 3 Sep 18, 2022
"Jira Search Helper" is a project to search more detail view and support highlight than original jira search

Jira Search Helper What is Jira Search Helper? "Jira Search Helper" is a project to search more detail view and support highlight than original jira s

null 41 Dec 23, 2022
A Leaderboard that shows who has given your stars to your repositories

A Leaderboard that shows who has given your stars to your repositories

Victor Peralta 6 Mar 22, 2022
Instant spotlight like search and actions in your browser with Sugu Search.

Sugu Search Instant spotlight like search and actions in your browser with Sugu Search. Developed by Drew Hutton Grab it today for Firefox and Chrome

Drew Hutton (Yoroshi) 9 Oct 12, 2022
Make your repositories and READMEs more beautiful!

Dynamic Image Renderer API easy to use - open source Make your repositories and READMEs more beautiful! This API generate an image dynamically with yo

Thiago 12 Nov 19, 2022
A personal semantic search engine capable of surfacing relevant bookmarks, journal entries, notes, blogs, contacts, and more, built on an efficient document embedding algorithm and Monocle's personal search index.

Revery ?? Revery is a semantic search engine that operates on my Monocle search index. While Revery lets me search through the same database of tens o

Linus Lee 215 Dec 30, 2022
Run Python code directly in the browser.

Run Python code directly in the browser. Try it out! Quickstart Install react-py with: npm i react-py Then, wrap your app in a PythonProvider componen

Eli Lamb 29 Dec 31, 2022
Use signature-based minting to allow users who have contributed to your github repositories to claim an NFT!

GitHub contributors NFT rewards This project demonstrates how you can build a full-stack web3 application that allows github contributors of certain r

thirdweb templates 8 Nov 5, 2022
An efficient (and the fastest!) way to search the web privately using Brave Search Engine

Brave Search An efficient (and the fastest) way to search the web privately using Brave Search Engine. Not affiliated with Brave Search. Tested on Chr

Jishan Shaikh 7 Jun 2, 2022
🍭 search-buddy ultra lightweight javascript plugin that can help you create instant search and/or facilitate navigation between pages.

?? search-buddy search-buddy is an open‑source ultra lightweight javascript plugin (* <1kb). It can help you create instant search and/or facilitate n

Michael 4 Jun 16, 2022
🟢 Music player app with a modern homepage, fully-fledged music player, search, lyrics, song exploration features, search, popular music around you, worldwide top charts, and much more.

Music-player-app see the project here. 1. Key Features 2. Technologies I've used Key Features: ?? Fully responsive clean UI. ?? Entirely mobile respo

suraj ✨ 3 Nov 16, 2022
JSON Visio is data visualization tool for your json data which seamlessly illustrates your data on graphs without having to restructure anything, paste directly or import file.

JSON Visio is data visualization tool for your json data which seamlessly illustrates your data on graphs without having to restructure anything, paste directly or import file.

Aykut Saraç 20.6k Jan 4, 2023
Tesodev-search-app - Personal Search App with React-Hooks

Tesodev-search-app Personal Search App with React-Hooks View on Heroku : [https://tesodev-staff-search-app.herokuapp.com/] Instructions Clone this rep

Rahmi Köse 1 Nov 10, 2022
Node starter kit for semantic-search. Uses Mighty Inference Server with Qdrant vector search.

Mighty Starter This project provides a complete and working semantic search application, using Mighty Inference Server, Qdrant Vector Search, and an e

MAX.IO LLC 8 Oct 18, 2022
Allows users to quickly search highlighted items on Wikipedia. Inspired by the "search Wikipedia" function on the kindle mobile app.

wikipedia-search Allows users to quickly search highlighted items on Wikipedia. Inspired by the "search Wikipedia" function on the kindle mobile app.

Laith Alayassa 18 Aug 15, 2022
A plugin for Obsidian (https://obsidian.md) that adds a button to its search view for copying the Obsidian search URL.

Copy Search URL This plugin adds a button to Obsidian's search view. Clicking it will copy the Obsidian URL for the current search to the clipboard. T

Carlo Zottmann 6 Dec 26, 2022
Node js package makes creating node jd dependincies files like Controllers,Entities and Repositories easier by executing a few instructions

Nodejs Studio Node js package makes creating node js project dependincies files like Controllers,Entities and Repositories easier by executing a few i

Syrian Open Source 9 Oct 12, 2022
GitHub action to automate managing repositories with labels, milestones and projects.

triagecat GitHub action to automate managing repositories with labels, milestones and projects. Link issues and PRs labels. Add issues and PRs to a pr

Oliver Wilkes 6 Jun 14, 2022
Tool for GitHub/GitLab to keep Repositories/Projects you are interested in and their Pull/Merge Requests in desktop Tray Menu

Tool for GitHub/GitLab to keep Repositories/Projects you are interested in and their Pull/Merge Requests in desktop Tray Menu. More info in User Guide.

Oleksii Bilyk 5 Jul 31, 2022