@duckcodeailabs/dql-cli
v1.6.34
Published
Public CLI for parsing, formatting, testing, and certifying DQL blocks
Readme
@duckcodeailabs/dql-cli
Official command-line interface for DQL.
Use the CLI to scaffold projects, validate blocks, preview charts locally, and build static bundles without DuckCode Studio.
Install
For local preview with file/DuckDB-backed starter data, use Node 20 or 22 LTS. Node 23 is not supported for native local drivers. If you change Node versions after installing dependencies, rerun npm install or pnpm install so native modules are rebuilt for the active runtime.
npm i -D @duckcodeailabs/dql-cliOr run it without adding a dependency:
npx @duckcodeailabs/dql-cli --helpFrom this repo, you can also run:
pnpm exec dql --helpQuick Start
These commands use the project-local CLI installed by the starter templates.
npx create-dql-app@latest my-dql-project
cd my-dql-project
npm install
npm run doctor
npm run notebookIf you want the dbt-integrated starter instead, use the Jaffle Shop semantic-layer course repo:
git clone https://github.com/dbt-labs/Semantic-Layer-Online-Course.git jaffle-shop
cd jaffle-shop
pip install dbt-duckdb && dbt deps && dbt build --profiles-dir .
npm i -D @duckcodeailabs/dql-cli
npx dql init .
npx dql semantic import dbt .
npm run notebookCore Commands
dql init [directory]— create a starter DQL projectdql new block <name>— scaffold a new DQL block in the current projectdql new semantic-block <name>— scaffold a semantic block plus companion YAML filesdql new dashboard <name>— scaffold a new dashboard indashboards/dql new workbook <name>— scaffold a new workbook inworkbooks/dql doctor [path]— check local setup, config, and starter foldersdql parse <file.dql>— parse and validate a DQL blockdql fmt <file.dql>— format a DQL filedql validate [path]— validate DQL files and semantic referencesdql certify <file.dql>— run certification checksdql preview <file.dql>— preview a block in the browserdql build <file.dql>— build a static bundle indist/dql serve [directory]— serve a built bundle locally
Learn More
- Root docs:
../../README.md - Quickstart:
../../docs/01-quickstart.md - CLI reference:
../../docs/reference/cli.md - Project config:
../../docs/reference/file-formats.md
