> For the complete documentation index, see [llms.txt](https://bkbn.gitbook.io/skribe/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bkbn.gitbook.io/skribe/index.md).

# Introduction

Skribe is the Yin to [Kompendium's](https://bkbn.gitbook.io/kompendium) Yang. It is a Gradle plugin for generating Ktor API Client boilerplate from an OpenAPI specification.

Unlike other OpenAPI generators, Skribe does not generate an entire app. Instead, it relies on Kotlin extension functions to provide type-safe generated functions for each API call. This allows you to use the generated code in a highly flexible manner, taking the routes that you wish to leverage, without having to translate them from the definition yourself.

{% hint style="danger" %}
Skribe is still *very* early in development. There are many OpenAPI features that are not supported, and likely many bugs in the code generation. If you encounter any issues, please open an issue [here](https://github.com/bkbnio/skribe/issues/new)
{% endhint %}

### Usage

Skribe is a gradle plugin available via the Gradle Plugin Portal. As such, it can be easily added to any Gradle project by declaring it in the plugins block

```kotlin
plugins {
    id("io.bkbn.scribe") version "latest.release"
}
```

To set up the plugin, you can then configure the extension properties

```kotlin
skribe {
  specUrl.set(file("../path/to/spec").absoluteFile.toString())  // Also works with remote specs over HTTP
  outputDir.set("$projectDir/src/main/gen")
  basePackage.set("com.mycompany.myapp.client")
  shouldCleanDir.set(true) // Will delete the outputDir before generating, so be careful!
}
```

Then, if you run `./gradlew skribeGenerate -q` you will see your glorious generated code!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://bkbn.gitbook.io/skribe/index.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
