Table of Contents

  1. Search syntax
  2. Filters

You can search for code on git.sr.ht within your repositories by using the search bar found on the upper left corner of the page.

Heads up: Code search for git.sr.ht is still in development. There are some limitations, its performance may be slow, and we intend to expand it with more features in the future. The search syntax may also change in the future.

Search syntax

Search terms can be modified as follows:

  • -term: negation; don't include matching results
  • (terms...): group terms, for use with other modifiers
  • key:value: filter by "key" using "value". See Filters below.
  • term OR term: logical OR. Logical AND is implicit.

Filters

You can use the following search filters:

Field Aliases Values Description Examples
case: c: yes, no, or auto Matches case-sensitive or insensitive text. case:yes content:"Foo"
content: c: Text (string or regex) Searches content of files. content:"search term"
file: f: Text (string or regex) Searches file names. file:"main.go"
lang: l: Text Filters by programming language. lang:python
regex: Regex pattern Matches content using a regular expression. regex:/foo.*bar/

About this wiki

commit 5b5b08b3b287db6b0180d0092943d1afb04b8852
Author: Drew DeVault <drew@ddevault.org>
Date:   2026-08-27T10:32:53+02:00

terms.md: limit LLM use
Clone this wiki ("master" branch)
https://git.sr.ht/~sircmpwn/sr.ht-docs (read-only)
git@git.sr.ht:~sircmpwn/sr.ht-docs (read/write)