Nuxt 2 reached End-of-Life on June 30th, 2024.


Nuxt module for Kirby's Query Language API


Nuxt KQL

npm version

Nuxt module for Kirby's Query Language API.


  • 🔒 Protect your Kirby credentials when sending queries
  • 🪢 Supports token-based authentication with Kirby Headless Starter (recommended)
  • 🤹 No CORS issues!
  • 🍱 Handle request just like with the useFetch composable
  • 🗃 Cached query responses
  • 🦦 Multiple starter kits available
  • 🦾 Strongly typed


!TIP📖 Read the documentation

npx nuxi@latest module add kql

Basic Usage

!TIP📖 Read the documentation

Add the Nuxt KQL module to your Nuxt config:

// `nuxt.config.ts`
export default defineNuxtConfig({
  modules: ['nuxt-kql']

And send queries in your template:

<script setup lang="ts">
const { data, pending, refresh, error } = await useKql({
  query: 'site'

    <h1>{{ data?.result?.title }}</h1>
    <pre>{{ JSON.stringify(data?.result, undefined, 2) }}</pre>

💻 Development

  1. Clone this repository
  2. Enable Corepack using corepack enable
  3. Install dependencies using pnpm install
  4. Run pnpm run dev:prepare
  5. Start development server using pnpm run dev


MIT License © 2022-PRESENT Johann Schopplich