> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qlty.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Sources

Sources provide reusable Plugin definitions packaged as a Git repository.

## Adding Sources

Sources are added to the `qlty.toml` configuration file in your repository using the following syntax:

```toml qlty.toml lines theme={"system"}
[[source]]
name = "default"
default = true
```

Each Source declaration can point to the `default` source that comes bundled with the cli or an external repository with either a `tag` or a `branch`. If you target a tag, Qlty will fetch and checkout that tag when it first runs, and will never try to update it. If you target a branch, Qlty will check for updates to the named branch each time it runs.

```toml qlty.toml lines theme={"system"}
[[source]]
name = "custom"
repository = "https://github.com/example/qlty-plugins.git"
tag = "v1.2.3"
# OR
# branch = "main"
```

## Default Source

Qlty maintains a default source with linters, formatters, and security scanners which is automaticaly added to `qlty.toml` when initializing a new project:

```toml qlty.toml lines theme={"system"}
# ...

[[source]]
name = "default"
default = true

# ...
```

## Custom Sources

You are not limited to the default source provided by Qlty. You can create your own custom Sources and reuse them across multiple projects.

To do this, simply create a public Git repository with the following structure:

```shell lines theme={"system"}
  your-source-repository/
  └─ linters/
     └─ [linter-name]/
        └─ plugin.toml
```
