Skip to content

Search & Replace

The Search & Replace page provides a visual interface for bulk search and replace operations across multiple repositories with automatic merge request creation.

Navigate to the Replace page from the main navigation.

  1. Enter your search pattern and replacement text

  2. Click Preview to see all matches

  3. Review the changes - each match shows the before/after diff

  4. Click Execute to create merge requests with the changes

The search pattern field supports Zoekt query syntax:

oldFunction lang:go repo:myorg/api
FilterExampleDescription
repo:repo:myorg/apiFilter by repository
lang:lang:typescriptFilter by language
file:file:*.goFilter by file pattern
case:yesFOO case:yesCase-sensitive search
case:nofoo case:noCase-insensitive (default)
-repo:-repo:testExclude repository
-file:-file:*_test.goExclude files

Click More options to access additional filtering:

OptionDescription
File patternsGlob patterns to filter files (e.g., *.go, *.ts)
RepositoriesFilter to specific repos (comma-separated)
LimitMaximum number of matches (0 = unlimited)
MR/PR titleCustom title for the merge request

Replace parameters are encoded in the URL for easy sharing:

http://localhost:3000/replace?q=oldFunction&replace=newFunction&files=*.go&repos=myorg/api

Share the URL with teammates to let them preview or execute the same replacement.

If you attempt to execute a replacement with read-only repositories, a modal will prompt you for your personal access token:

  1. Generate a PAT from your code host (GitLab, GitHub, etc.) with api or repository write permissions
  2. Enter the token in the modal
  3. The token is used only for the current session and is not stored in your browser
  4. The token is used to authenticate the MR creation on your behalf

After clicking Preview, you’ll see:

  • Match count - Total number of matches found
  • File count - Number of files with matches
  • Grouped results - Matches organized by repository and file
  • Line preview - Each match with the replacement highlighted

Each match shows:

  • Old text struck through in red
  • New text highlighted in green

Once you’re satisfied with the preview:

  1. Click Execute (N matches) button
  2. Confirm the action in the dialog
  3. A background job is queued
  4. Merge requests are created for each repository with changes
Search: getUserById
Replace: findUserById
Files: *.go, *.ts
Search: github.com/old-org/package
Replace: github.com/new-org/package
Search: "version": "1.0.0"
Replace: "version": "2.0.0"
Files: package.json
Search: FOO case:yes
Replace: BAR