> ## Documentation Index
> Fetch the complete documentation index at: https://klyx.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> An overview of the Klyx extension system and its APIs

Klyx is a mobile code editor for Android with a plugin system that lets you extend its capabilities. Plugins can add custom screens, toolbar actions, file openers, terminal sessions, language servers, and more.

This documentation covers everything you need to build, bundle, and distribute plugins for Klyx.

## How plugins work

Plugins are Android APKs packaged into `.klyx` bundles. Klyx loads them at runtime. Each extension declares metadata in a `plugin.json` file and implements the `KlyxPlugin` interface. The app manages the full lifecycle: loading, starting, stopping, and unloading.

## Architecture overview

Every plugin starts with a `plugin.json` manifest and a class that implements `KlyxPlugin`. At runtime, Klyx injects services into your plugin through property delegates. You register screens, toolbar actions, file openers, and event subscribers during the lifecycle hooks.

| Concept            | Description                                                                              |
| ------------------ | ---------------------------------------------------------------------------------------- |
| `KlyxPlugin`       | Interface your entry class implements. Defines `onLoad`, `onStart`, `onStop`, `onUnload` |
| `PluginDescriptor` | Metadata: id, name, version, entry class, author, permissions                            |
| `PluginService`    | Global services available to all plugins (screens, toolbar, settings, etc.)              |
| `PluginContext`    | Per-plugin runtime context with access to app, event bus, and coroutine scope            |
| `.klyx` bundle     | The distribution format: an archive containing APK + metadata                            |

## What you can build

* Custom screens and UI panels
* Toolbar actions with icons
* Custom file openers for new file types
* Terminal session management
* Language server integrations
* Background process execution
* Event-driven features responding to file opens, terminal events, and more
* Theme-aware UI using Klyx's color system and typography
* And more

## Prerequisites

Before you begin, make sure you are comfortable with the following technologies and concepts:

* [Kotlin](https://kotlinlang.org/docs/home.html) - for implementing core plugins logic
* [Android Fundamentals](https://developer.android.com/guide/components/fundamentals) - e.g. Activities, Services, Context, ...

## Next steps

<Card title="Quickstart" icon="rocket" href="/quickstart">
  Build your first plugin in minutes
</Card>

<Card title="Creating an Extension" icon="puzzle-piece" href="/extensions/creating-an-extension">
  Step-by-step guide to creating a Klyx extension
</Card>

<Card title="API Reference" icon="book-open" href="/extensions/api-reference/index">
  Complete API reference for all Klyx extension APIs
</Card>
