# @abhinavakhil/penna-ai

> Provider-agnostic AI extension for @abhinavakhil/penna-core (free Groq default, any OpenAI-compatible API)

Latest version **0.2.0** (published 2026-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @abhinavakhil/penna-ai
pnpm add @abhinavakhil/penna-ai
yarn add @abhinavakhil/penna-ai
bun add @abhinavakhil/penna-ai
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2026-09-24 |
| First published | 2026-09-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 88.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | abhinavakhil |
| Keywords | editor, wysiwyg, rich-text, prosemirror, markdown |

## Links

- npm: https://www.npmjs.com/package/@abhinavakhil/penna-ai
- Repository: https://github.com/abhinavakhil/Penna
- Homepage: https://github.com/abhinavakhil/Penna#readme
- npm.io page: https://npm.io/package/@abhinavakhil/penna-ai

## Dependencies (4)

- [prosemirror-view](https://npm.io/package/prosemirror-view.md) ^1.40.1
- [prosemirror-state](https://npm.io/package/prosemirror-state.md) ^1.4.3
- [prosemirror-keymap](https://npm.io/package/prosemirror-keymap.md) ^1.2.3
- [@abhinavakhil/penna-core](https://npm.io/package/@abhinavakhil/penna-core.md) 0.2.0

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 0.2.0 (latest) — 2026-09-24
- 0.1.0 — 2026-09-20

## README

# @abhinavakhil/penna-ai

AI writing for the [Penna](https://github.com/abhinavakhil/Penna#readme) editor: continue writing, improve, fix grammar, shorten, change tone, translate, or ask anything. Rewrites show a word-level diff before you accept them. Works with free providers.

```sh
npm i @abhinavakhil/penna-ai @abhinavakhil/penna-core
```

```ts
import { createEditor } from '@abhinavakhil/penna-core'
import { ai } from '@abhinavakhil/penna-ai'

createEditor('#editor', {
  extensions: [ai({ provider: 'groq', apiKey: '…' })],
})
```

Providers: `groq`, `gemini`, `openrouter`, `together` (free tiers), `openai`, `mistral`, `ollama` (local), and `openai-compatible` with `baseUrl`. Optional `model`.

Open it with <kbd>Ctrl</kbd>+<kbd>J</kbd>, the ✦ button in the bubble or toolbar, or `/ai`. Pass `actions` to replace the built-in prompts.

> Keys used in the browser are visible to users. In production, point `openai-compatible` at your own proxy.

MIT

---
_Source: https://npm.io/package/@abhinavakhil/penna-ai · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
