Sourcegraph docs Sourcegraph docs

Sections

  • Getting started
    • Product tour
    • Personalization
  • Code search
    • Tutorials
    • How-to guides
    • Explanations
    • Reference
  • Code intelligence
    • Tutorials
    • How-to guides
    • Explanations
    • Reference
  • Batch Changes
    • Quickstart
    • Explanations
    • Tutorials
    • How-to guides
    • References
  • Code Insights
    • Quickstart
    • Explanations
    • How-to guides
    • References
  • Notebooks
    • Quickstart
  • Integrations
    • Browser extension
    • Editors
    • Browser search engine
  • Extensions
  • CLI
    • Quickstart
    • Explanations
    • How-to guides
    • References
  • Cloud
  • Adopting
  • Administration
    • Install
    • Upgrade
    • Configuration
    • Code hosts
    • User authentication
    • Extension registry
    • Observability
    • FAQ
    • Troubleshooting
    • How-to guides
  • Development
    • Setup
    • How-to guides
    • Background information
    • Contributing

  • ★ Quick install
  • ★ Search query syntax
  • ★ API

External

  • About Sourcegraph
  • Sourcegraph.com

CLI

On this page:

  • Getting started
  • Explanations
  • How-tos
  • References
Edit this page
Home / cli

CLI

Interact with Sourcegraph from the command line

src is a command line interface to Sourcegraph that allows you to search code from your terminal, create and apply batch changes, and manage and administrate repositories, users, and more.

★ Quickstart

Getting started

New to src?
Run through the quickstart guide and set up src in minutes.
Command reference
Check the commands available in src and their flags.
Create a batch change
src is the gateway to Sourcegraph's batch change functionality: find out how to create a batch change with it in less than 10 minutes.

Explanations

  • Environment variables
  • Windows support

How-tos

  • Creating an access token

References

  • Command reference
  • About Sourcegraph
  • Sourcegraph.com
  • Code (GitHub)
  • Terms
  • Security
  • Privacy