The CodeQL Development Toolkit (QLT) is a command-line tool for CodeQL query development, testing, and automation. It provides scaffolding, lifecycle management, and CI/CD integration for CodeQL projects.
src/CodeQLToolkit.Core/- Main CLI application entry pointsrc/CodeQLToolkit.Features/- Feature implementations (Query, Test, Bundle, Validation)src/CodeQLToolkit.Shared/- Shared utilities, configuration, and base classestest/- Unit tests for each component.github/workflows/- CI/CD workflows for building and testing.github/actions/- Reusable actions for CodeQL and QLT installation
- .NET 6.0+: Primary development framework
- System.CommandLine: CLI framework for command parsing
- Scriban: Liquid template engine for code generation
- Newtonsoft.Json: JSON serialization for configuration
- NUnit: Testing framework
- Building: Use
dotnet buildanddotnet restore - Testing: Use
dotnet testfor unit tests - CLI Usage: The main executable is
qltwith features: query, test, bundle, validation, pack, codeql
Each feature follows a consistent pattern:
*FeatureMain.cs- Feature registration and command setupCommands/- Command implementationsLifecycle/- Automation lifecycle targetsTemplates/- Liquid templates for file generation
The toolkit supports multiple automation platforms:
- Actions: GitHub Actions integration
- Local: Local development workflows
qlt.conf.json- Project configuration file- Environment variables and CLI options for runtime configuration
- Template-based configuration file generation
- Follow existing code patterns and conventions
- Add unit tests for new functionality
- Update documentation for user-facing changes
- Ensure compatibility with existing workflows
- Test changes against sample CodeQL projects
qlt <feature> <action> [options]
Features: query, test, bundle, validation, pack, codeql Common actions: init, create, validate, run