--- title: Specifying command options in a CodeQL configuration file intro: 'You can save default command options in a {% data variables.product.prodname_codeql %} configuration file.' product: '{% data reusables.gated-features.codeql %}' versions: fpt: '*' ghes: '*' ghec: '*' topics: - Code Security - Code scanning - CodeQL redirect_from: - /code-security/codeql-cli/specifying-command-options-in-a-codeql-configuration-file - /code-security/codeql-cli/using-the-codeql-cli/specifying-command-options-in-a-codeql-configuration-file --- ## About specifying command options in a {% data variables.product.prodname_codeql %} configuration file You can save default or frequently used options for your commands in a per-user configuration file. You can specify {% data variables.product.prodname_codeql_cli %} command options in two ways: * Directly in the command line, using the appropriate flag. * In a configuration (or `config`) file that {% data variables.product.prodname_codeql %} scans for relevant options each time a command is executed. For options that are likely to change each time you execute a command, specifying the value on the command line is the most convenient way of passing the information to {% data variables.product.prodname_codeql %}. Saving options in a `config` file is a good way to specify options you use frequently. It’s also a good way to add custom {% data variables.product.prodname_codeql %} packs that you use regularly to your search path. ## Using a {% data variables.product.prodname_codeql %} configuration file You need to save the `config` file under your home (Linux and macOS) or user profile (Windows) directory in the `.config/codeql/` subdirectory. For example, `$HOME/.config/codeql/config`. The syntax for specifying options is as follows: ```shell