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.

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