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

# init

```bash lines theme={"system"}
qlty init [OPTIONS]
```

Set up Qlty in the current repository

This command will generate an initial project configuration file based on the contents of the repository and write it to `.qlty/qlty.toml` at the repository root.

When run without the `--skip-plugins` command, initialization will try to determine a reasonable set of linters and formatters to enable. Certain linters and formatters are enabled based on the detection of a linter configuration file. Others are enabled just based on the presence of target files of the programming language.

Following initialization, the command will print a summary of the configuration.

After generating a configuration file, the command will ask if you want to *sample* the results of the enabled plugins. Sampling runs each plugin against a small set of targets.

If Qlty is already initialized in the current repository, this command will exit with an error.

## Arguments

<AccordionGroup>
  <Accordion title="-y, --yes">Answer yes to all prompts</Accordion>
  <Accordion title="-n, --no">Answer no to all prompts</Accordion>
  <Accordion title="--skip-plugins">Skip enabling plugins</Accordion>

  <Accordion title="--dry-run">
    Print the generated configuration to stdout instead of saving to disk
  </Accordion>

  <Accordion title="--skip-default-source">Initialize without default source</Accordion>

  <Accordion title="--source <SOURCE>">
    A custom source to use for plugins. This can be a URL(name=url) or a path to a local
    directory(name=directory)
  </Accordion>
</AccordionGroup>

## Examples

```bash Generate a Qlty config for the current repository lines theme={"system"}
qlty init
```

```bash Generate a Qlty config and skip prompts lines theme={"system"}
qlty init --no
```

```bash Generate a Qlty config with no plugins lines theme={"system"}
qlty init --skip-plugins
```

## See Also

* [`deinit`](/cli/commands/deinit)
* [Global Options](/cli/global-options)
