# 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
```
