Note: This documentation is for the legacy command-line tool odasa.
The final version was released in May 2020. Support for this tool expires in May 2021.

For documentation on the new generation CodeQL CLI, see CodeQL CLI .
In particular, you may find the Notes for legacy QL CLI users useful in planning your migration.

Skip to end of metadata
Go to start of metadata

This topic describes how to export a snapshot for use with the CodeQL plugins and extensions, or to upload to LGTM using the LGTM API.

This topic describes the QL command-line tools (odasa). For information about the new CodeQL CLI, that was released with Semmle 1.23, see


The CodeQL plugins and extensions allow you to write and run queries on project snapshots locally in your IDE. If you want to create and test queries in your IDE , then you need to have:

  • One or more Semmle snapshots to run queries against.
  • A copy of the license file (stored in a license directory—either a sub-directory of the odasa directory or the SEMMLE_HOME directory, or in the location explicitly defined by SEMMLE_LICENSE_DIR).

The best way to create a database to use in a CodeQL plugin or extension is to export a recent snapshot using the export command.

If you have built your snapshot using the QL command-line tools, you can also carry out continuous security analysis by uploading it to LGTM using the LGTM API. For more information, see About LGTM.

Exporting a snapshot

The export command has been designed to enable you to export a snapshot directory in the format required by CodeQL for Eclipse.

To export the most recent snapshot

The export command is commonly run from the odasa directory (although it can equally be run from the project directory, which removes the need to specify the project explicitly). At the command prompt, enter:

odasa export --project <project-config-dir> --latest

where <project-config-dir> is the path to the directory where the project configuration file is stored. This must be specified either as an absolute path, or as a path relative to the current working directory. The most recent snapshot built for that project is exported into a zip archive in the current working directory with the name <project-name>-<revision>.zip. You can override this default location using the --output flag.

If you want to export a snapshot other than the most recent one, you can omit the --latest flag and specify a particular snapshot directory to export instead.


If you exported the latest snapshot for the Hadoop project by running: odasa export --project projects/Hadoop --latest from the odasa directory, then the snapshot might be exported as odasa/