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

# Getting Started with the Qlty CLI

<Steps titleSize="h3">
  <Step title="Install the CLI">
    First, install our CLI onto your local machine:

    <CodeGroup>
      ```shell macOS & Linux lines theme={"system"}
      curl https://qlty.sh | sh
      ```

      ```shell Windows lines theme={"system"}
      powershell -c "iwr https://qlty.sh | iex"
      ```
    </CodeGroup>

    <div
      style={{
    position: "relative",
    paddingBottom: "calc(32.94010889292196% + 41px)",
    height: "0",
    width: "100%",
}}
    >
      <iframe
        src="https://demo.arcade.software/pdnImPNfyJblLkMTw5o5?embed&show_copy_link=true"
        title="curl https://qlty.sh | sh"
        frameBorder="0"
        loading="lazy"
        webkitallowfullscreen
        mozallowfullscreen
        allowFullScreen
        allow="clipboard-write"
        style={{
        position: "absolute",
        top: "0",
        left: "0",
        width: "100%",
        height: "100%",
        colorScheme: "light",
    }}
      />
    </div>

    Qlty CLI supports macOS and Linux on X64 and ARM64, with Windows support in development.

    <Accordion title="Alternative: Installing with verification">
      We provide GitHub attestations powered by Sigstore that allow you to verify the authenticity of the Qlty CLI before installing it.

      **Prerequisites:** [GitHub CLI (`gh`)](https://cli.github.com/manual/installation) must be installed.

      **Example (macOS Apple Silicon):**

      ```shell lines theme={"system"}
      # Download the archive from https://github.com/qltysh/qlty/releases
      curl -LO https://github.com/qltysh/qlty/releases/latest/download/qlty-aarch64-apple-darwin.tar.xz

      # Verify the attestation
      gh attestation verify --owner qltysh qlty-aarch64-apple-darwin.tar.xz

      # Unpack and install
      tar -xJf qlty-aarch64-apple-darwin.tar.xz
      sudo mv qlty-aarch64-apple-darwin/qlty /usr/local/bin/
      ```

      For other platforms, download the appropriate archive from [GitHub releases](https://github.com/qltysh/qlty/releases).

      Learn more: [GitHub artifact attestations documentation](https://docs.github.com/en/actions/concepts/security/artifact-attestations)
    </Accordion>
  </Step>

  <Step title="Initialize your repository">
    From your Git repository, run:

    ```shell bash lines theme={"system"}

    qlty init

    ```

    <div
      style={{
    position: "relative",
    paddingBottom: "calc(62.517006802721085% + 41px)",
    height: "0",
    width: "100%",
}}
    >
      <iframe
        src="https://demo.arcade.software/wIIO4wY9U47bKAij79rG?embed&show_copy_link=true"
        title="qlty init"
        frameBorder="0"
        loading="lazy"
        webkitallowfullscreen
        mozallowfullscreen
        allowFullScreen
        allow="clipboard-write"
        style={{
        position: "absolute",
        top: "0",
        left: "0",
        width: "100%",
        height: "100%",
        colorScheme: "light",
    }}
      />
    </div>

    This will generate a baseline configuration based on the file types within your project and store it as `.qlty/qlty.toml` in your repository.

    You can find more plugins with `qlty plugins list` and enable them with `qlty plugins enable [plugin]`.
  </Step>

  <Step title="Identify code smells and review quality metrics">
    Check the code quality (for [supported programming languages](/languages)):

    ```bash Scan for code smells like duplication lines theme={"system"}
    qlty smells --all
    ```

    ```bash Review a summary of quality metrics lines theme={"system"}
    qlty metrics --all --max-depth=2 --sort complexity --limit 10
    ```

    <div style={{position: "relative", paddingBottom: "calc(62.517006802721085% + 41px)", height: "0", width: "100%"}}>
      <iframe src="https://demo.arcade.software/NHZHtbmkgrJxpbuJOb4E?embed&show_copy_link=true" title="qlty smells remix/app/.server/jobs" frameBorder="0" loading="lazy" webkitallowfullscreen mozallowfullscreen allowFullScreen allow="clipboard-write" style={{position: "absolute", top: "0", left: "0", width: "100%", height: "100%", colorScheme: "light"}} />
    </div>
  </Step>

  <Step title="Lint your project">
    ```bash Run linters on changed files on your current branch lines theme={"system"}
    qlty check
    ```

    <div
      style={{
    position: "relative",
    paddingBottom: "calc(46.054421768707485% + 41px)",
    height: "0",
    width: "100%",
}}
    >
      <iframe
        src="https://demo.arcade.software/jj69R7wlgRGgEL6urQJr?embed&show_copy_link=true"
        title="qlty check remix/app/.server/jobs"
        frameBorder="0"
        loading="lazy"
        webkitallowfullscreen
        mozallowfullscreen
        allowFullScreen
        allow="clipboard-write"
        style={{
        position: "absolute",
        top: "0",
        left: "0",
        width: "100%",
        height: "100%",
        colorScheme: "light",
    }}
      />
    </div>

    ```bash Run linters on all files lines theme={"system"}
    qlty check --all
    ```

    ```bash Run only the shellcheck linter on all files lines theme={"system"}
    qlty check --all --filter=shellcheck
    ```

    ```bash Run linters on the web/ folder lines theme={"system"}
    qlty check web/
    ```
  </Step>

  <Step title="Auto-format your code">
    ```bash Auto-format changed files on your current branch lines theme={"system"}
    qlty fmt
    ```

    <div
      style={{
    position: "relative",
    paddingBottom: "calc(23.6734693877551% + 41px)",
    height: "0",
    width: "100%",
}}
    >
      <iframe
        src="https://demo.arcade.software/QXbWdDfpOFn67JHQuNE3?embed&show_copy_link=true"
        title="Arcade Flow (Thu Jul 11 2024)"
        frameBorder="0"
        loading="lazy"
        webkitallowfullscreen
        mozallowfullscreen
        allowFullScreen
        allow="clipboard-write"
        style={{
        position: "absolute",
        top: "0",
        left: "0",
        width: "100%",
        height: "100%",
        colorScheme: "light",
    }}
      />
    </div>

    ```bash Auto-format files in a directory lines theme={"system"}
    qlty fmt web/
    ```
  </Step>
</Steps>

## Getting help

* **Learn more:** Run `qlty` for a summary of the most commonly used commands and `qlty --help` for a full list.
  * Appending `--help` to any command will provide detailed information about that command.
* **Join the community:** [Chat with us](https://qlty.sh/discord) on Discord
* **Get community support:** [Open an issue or discussion](https://github.com/qltysh/codeclimate/issues/new/choose) on GitHub

## Next steps

* [Exclude irrelevant files](/excluding-files) in your repository
* Refer to the [Analysis Configuration](/analysis-configuration) guide
* Explore the 40+ linters and security scanners [available as plugins](/plugins)
