Getting Started with the Qlty CLI

1

Install the CLI

First, install our CLI onto your local machine:

$curl https://qlty.sh | sh

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

We provide GitHub attestations powered by Sigstore that allow you to verify the authenticity of our installer before running it.

Prerequisites: GitHub CLI (gh) must be installed.

macOS & Linux:

$# Download the installer
>curl -o install.sh https://qlty.sh
>
># Verify the attestation
>gh attestation verify install.sh --owner qltysh
>
># Run the installer
>sh install.sh

Windows:

1# Download the installer
2Invoke-WebRequest -Uri https://qlty.sh -OutFile install.ps1
3
4# Verify the attestation
5gh attestation verify install.ps1 --owner qltysh
6
7# Run the installer
8.\install.ps1

A successful verification will display attestation details showing the installer was signed by GitHub Actions and built from the official Qlty repository.

Learn more: GitHub artifact attestations documentation

2

Initialize your repository

From your Git repository, run:

bash
$qlty init

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

3

Identify code smells and review quality metrics

Check the code quality (for supported programming languages):

Scan for code smells like duplication
$qlty smells --all
Review a summary of quality metrics
$qlty metrics --all --max-depth=2 --sort complexity --limit 10
4

Lint your project

Run linters on changed files on your current branch
$qlty check
Run linters on all files
$qlty check --all
Run only the shellcheck linter on all files
$qlty check --all --filter=shellcheck
Run linters on the web/ folder
$qlty check web/
5

Auto-format your code

Auto-format changed files on your current branch
$qlty fmt
Auto-format files in a directory
$qlty fmt web/

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 on Discord
  • Get community support: Open an issue or discussion on GitHub

Next steps