> For the complete documentation index, see [llms.txt](https://docs.kira.thiennguyen.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kira.thiennguyen.dev/extension-development/overview.md).

# Overview & Quickstart

Extensions let you add your own **action buttons** to Kira. Each action runs a small **Go script** that Kira interprets at runtime with an embedded Go interpreter ([Yaegi](https://github.com/traefik/yaegi)) — there's **no Go toolchain and no compile step** on the machine running Kira.

As an author you only need a text editor and some Go. Scripts may use the Go **standard library** (the Go 1.22 surface) plus a small `kira` SDK, and they reach back into Kira — secrets, account context, logging, dialogs — through a single handle, `*kira.Ctx`.

{% hint style="warning" %}
**Security — read this.** A trusted extension runs **arbitrary Go with the user's privileges** (filesystem, network, processes). This is by design. Kira shows the source and asks the user to confirm once before installing (the *trust gate*). Treat an extension like any executable you'd run — and be extra careful with extensions imported from a URL.
{% endhint %}

## How a run works

```mermaid
flowchart LR
    Btn[Action button] --> Yaegi[Yaegi interpreter]
    Yaegi --> Run["package action<br/>func Run(k *kira.Ctx) error"]
    Run --> Ctx[kira.Ctx SDK]
    Ctx --> Sec[Secrets Manager]
    Ctx --> AWS[Account context]
    Ctx --> UI[Dialogs / toasts / reports]
    Ctx --> Net[HTTP / stdlib]
```

A click resolves the account context (if any), Yaegi interprets the action's source, and your `Run` function drives the rest through `k`.

## Quickstart — your first extension

Create a folder with a manifest and one action:

```
hello-ext/
├── manifest.json
└── actions/
    └── hello.go
```

`manifest.json`:

```json
{
  "id": "hello-ext",
  "name": "Hello",
  "description": "My first Kira extension.",
  "version": "1",
  "actions": [
    { "id": "hello", "label": "Say hello", "entry": "actions/hello.go", "contextMode": "none" }
  ]
}
```

`actions/hello.go`:

```go
package action

import "kira"

func Run(k *kira.Ctx) error {
	k.Log("hello from my extension 👋")
	if err := k.Alert("It works!"); err != nil {
		return err
	}
	return nil
}
```

Package it as a `.kext` (just a zip):

```sh
cd hello-ext
zip -r ../hello-ext.kext manifest.json actions
```

Install it in Kira via **Extensions → Install extension → Choose file…**, review the code at the trust gate, confirm, then click **Say hello**. The [Output console](/user-guide/extensions-using.md#the-output-console) streams your `k.Log` output and the alert pops in Kira.

`"contextMode": "none"` means the action needs no AWS account, so Kira never prompts for one.

## Where to next

* [Manifest & Bundle Format](/extension-development/manifest-and-bundle.md) — every manifest field and the `.kext` layout.
* [The kira SDK](/extension-development/sdk-reference.md) — the full `*kira.Ctx` API with examples.
* [Authoring Workflow](/extension-development/authoring-workflow.md) — editor setup, debugging, and distributing.


---

# 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://docs.kira.thiennguyen.dev/extension-development/overview.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.
