CodeQL CLI commands manual Reference information for the commands available in the most recent release of CodeQL CLI.
Who can use this feature? CodeQL is available for the following repository types:
Convert result data from BQRS into other forms.
Compute the difference between two result sets.
[Plumbing] Compute a stable hash of a BQRS file.
Display metadata for a BQRS file.
[Plumbing] Interpret data in a single BQRS.
[Experimental] Add a piece of diagnostic information to a database.
Analyze a database, producing meaningful results in the context of the
source code.
Create a relocatable archive of a CodeQL database.
Compact a CodeQL database on disk.
Create a CodeQL database for a source tree that can be analyzed using
one of the CodeQL products.
[Experimental] Export diagnostic information from a database for a
failed analysis.
[Plumbing] Final steps in database creation.
[Advanced] [Plumbing] Import unfinalized database(s) into another
unfinalized database.
[Plumbing] Index standalone files with a given CodeQL extractor.
[Plumbing] Create an empty CodeQL database.
[Plumbing] Interpret computed query results into meaningful formats
such as SARIF or CSV.
[Plumbing] Print a summary of the baseline lines of code seen.
[Plumbing] Run a set of queries together.
[Plumbing] Run a single command as part of a traced build.
Extracts a CodeQL database archive.
Upgrade a database so it is usable by the current tools.
[Plumbing] Check a particular dataset for internal consistency.
[Plumbing] Clean up temporary files from a dataset.
[Plumbing] Import a set of TRAP files to a raw dataset.
[Plumbing] Collect statistics about the relations in a particular
dataset.
[Plumbing] Upgrade a dataset so it is usable by the current tools.
[Experimental] [Plumbing] Add a piece of diagnostic information.
[Experimental] Export diagnostic information for a failed analysis.
[Deep plumbing] Server for running multiple commands while avoiding
repeated JVM initialization.
[Plumbing] On-line support for the QL language in IDEs.
[Plumbing] Run one or more queries against a dataset.
[Plumbing] Support for running queries from IDEs.
[Plumbing] Support for running queries from IDEs.
[Plumbing] Run upgrade scripts on an existing raw QL dataset.
[Experimental] [Deep plumbing] Report the extensible predicates
found in the given pack.
[Advanced] Create a summary of a structured log file.
Generate end-user query help from .qhelp files.
[Deep plumbing] Merges multiple SARIF files into a single SARIF file.
Uploads a SARIF file to GitHub code scanning.
Adds a list of QL library packs with optional version
ranges as dependencies of the current package, and then installs them.
[Plumbing] Bundle a QL library pack.
Install dependencies for this pack, verifying that the
existing lock file is up to date.
[Plumbing] Builds the contents of a QL package from
source code.
Download the set of qlpacks referenced by the query
spec of the command line from the registry. Packs can be provided by
name or implicitly inside of a query suite (.qls) file.
Initializes a qlpack in the specified directory.
Install dependencies for this pack.
[Deep plumbing] List the CodeQL packages rooted at
this directory. This directory must contain a qlpack.yml or
.codeqlmanifest.json file.
[Plumbing] Compute the set of files to be included in
a QL query pack or library pack.
Publishes a QL library pack to a package registry.
[Plumbing] Compute the set of required dependencies
for this QL pack.
Update the dependencies for this pack to the latest
available versions.
Compile or check QL code.
[Plumbing] Read an intermediate representation of a compiled query
from a .qlo file.
Autoformat QL source code.
[Deep plumbing] Report metadata about the database.
[Experimental] [Deep plumbing] Determine accessible extensions. This
includes machine learning models and data extensions.
[Experimental] [Deep plumbing] Determine accessible extensions for
the given paths to pack roots. This includes machine learning models and
data extensions.
[Deep plumbing] Determine the extractor pack to use for a given
language.
[Deep plumbing] Expand a set of file inclusion/exclusion globs.
List installed CodeQL extractor packs.
[Deep plumbing] Determine QL library path and dbscheme for a query.
[Deep plumbing] Resolve and return the key-value metadata pairs from a
query source file.
[Deprecated] [Experimental] [Deep plumbing] Determine accessible
machine learning models.
Display a list of available CodeQL packs and their locations.
Create a list of installed QL packs and their locations.
[Deep plumbing] Dereferences a .qlref file to return a .ql one.
[Deep plumbing] Expand query directories and suite specifications.
[Deep plumbing] Prepare RAM options.
[Deep plumbing] Find QL unit tests in given directories.
[Deep plumbing] Determine upgrades to run for a raw dataset.
Accept results of failing unit tests.
[Plumbing] Build a dataset for a test directory.
Run unit tests for QL queries.
Show the version of the CodeQL toolchain.