# Getting Started

{% embed url="<https://github.com/sourcescapeio/sourcescape>" %}

{% embed url="<https://www.npmjs.com/package/sourcescape>" %}

### Starting

Install with npm

```
npm install -g sourcescape

npm update -g sourcescape
```

Start Sourcescape with the directories that you want to load code from. This step is required to mount the directory as a volume in the Docker images.

```
sourcescape start ~/Projects/lychee
```

Scan the directory and then run an index on the repos you want to code search

```
sourcescape scan ~/Projects/lychee

sourcescape list:repos

sourcescape run-index sourcescapeio/sourcescape
```

### Running

Data directory is created in ${HOME}/.sourcescape/data

This is used for cloning repos.

### Stopping

```
# stops everything
sourcescape stop

# destroys docker images
sourcescape clean
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sourcescape.io/basics/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
