Skip to content

Quick Start

This guide will have you searching code in just 5 minutes. We’ll set up Code Search, connect to GitHub, and run your first search.

  • Docker and Docker Compose installed
  • A GitHub account with at least one repository
  • A GitHub Personal Access Token (we’ll create one)
  1. Start Code Search

    Download and start all services:

    Terminal window
    # Download docker-compose.yml
    curl -O https://raw.githubusercontent.com/techquestsdev/code-search/main/docker-compose.yml
    # Start services
    docker compose up -d

    Wait about 30 seconds for all services to start.

  2. Create a GitHub Token

    Go to GitHub Settings → Developer Settings → Personal Access Tokens → Tokens (classic)

    Create a new token with these scopes:

    • repo (Full control of private repositories)
    • read:org (Read organization membership - optional, for org repos)

    Copy the generated token.

  3. Open the Web UI

    Open http://localhost:3000 in your browser.

    You’ll see the Code Search dashboard, ready to configure.

  4. Add a GitHub Connection

    Click Connections in the sidebar, then Add Connection.

    Fill in:

    • Name: GitHub (or any name you prefer)
    • Type: GitHub
    • URL: https://api.github.com
    • Token: Paste your GitHub token

    Click Test Connection to verify, then Create.

  5. Sync Repositories

    Click Sync on your new connection to discover repositories.

    The system will fetch your repositories and queue them for indexing.

  6. Wait for Indexing

    Click Repositories to see the indexing progress.

    Initial indexing takes a few minutes depending on repository size. You’ll see status change from “pending” → “indexing” → “indexed”.

  7. Search!

    Click Search in the sidebar or use the search bar.

    Try searching for:

    foo

    Or with filters:

    func main lang:go

Now let’s try the CLI:

Terminal window
# Configure the CLI
code-search config set server.url http://localhost:8080
# Search for code
code-search search "foo"
# Search with filters
code-search search "func" --lang go --file "*.go"
# List repositories
code-search repo list
QueryDescription
fooSimple text search
func mainSearch for phrase
"exact phrase"Exact match with quotes
repo:myorg/repoFilter by repository
lang:goFilter by language
file:*.tsFilter by file pattern
case:yesCase-sensitive search
Terminal window
# Search
code-search search "pattern" --repo "org/*"
# Find files
code-search find files "*.proto"
# Find symbol definitions
code-search find symbols "UserService"
# Preview replace (dry run)
code-search replace "oldFunc" "newFunc" --dry-run
# Execute replace with MR creation
code-search replace "v1.0" "v2.0" --execute --create-mr

You’re now up and running! Here’s what to explore next:

Connect additional platforms:

Customize your deployment:

Learn advanced CLI features:

Build integrations:

Check the logs:

Terminal window
docker compose logs -f
  1. Verify your token has the correct scopes
  2. Check the token hasn’t expired
  3. Test connection in the UI to see the error message
  1. Ensure repositories are indexed (status: “indexed”)
  2. Check the Zoekt service is running: curl http://localhost:6070/health
  3. Wait for indexing to complete for new repos