# pi-order-extension

A Pi extension for managing reusable prompt templates with the `/order` command.

## Features

- Create, edit, send, remove, and list local templates.
- Store an optional description for each template.
- Insert template content into the current Pi input box without auto-sending.
- Autocomplete `/order` subcommands and existing template names.
- Clear template body from the edit flow without deleting the template name or description.

## Commands

```text
/order create <name>   Create a template
/order edit <name>     Edit description and body, or clear body from the edit flow
/order send <name>     Insert template body into the input box
/order remove <name>   Delete a template
/order list            List templates
```

Template names may contain letters, numbers, `_`, and `-`.

## Install

From npm after publishing:

```bash
pi install npm:pi-order-extension
```

From GitHub tag:

```bash
pi install git:git@github.com:LinMingjing007/pi-order.git@v0.1.1
```

Reload Pi after installing:

```text
/reload
```

## Development

```bash
npm install
npm test
```
