Skip to content
anouk

← Use cases

AI writing assistant in the sidebar

Rewrite, expand, and tone-shift text on any page.

For: Indie devs shipping a productivity extension

A sidebar that rewrites the selected text — shorter, friendlier, more formal — using whatever model the user configured. No backend, the user's own key.

The problem

Writing helpers call a model on every keystroke or button press. Without caching and queueing that gets expensive and rate-limited fast, and shipping a backend just to hold an API key is overkill for a single-user tool.

How Anouk handles it

  • The user enters their provider URL, key, and model in the settings panel — you never handle their key.
  • AIService.call() sends the selection with an instruction like "rewrite in a friendlier tone".
  • Repeated rewrites of the same selection hit the per-request cache instead of re-billing.
  • The per-provider queue keeps a rapid-fire user from tripping a 429.

src/sidebar.js

import { AIService } from 'anouk';

async function rewrite(text, tone) {
  return AIService.call(
    `Rewrite this in a ${tone} tone`,
    text,
    `rewrite_${tone}_${hash(text)}`
  );
}

Anouk features used

AIService.call()Runtime settings panelResponse cacheRate-limit queue

Build this in an afternoon

Scaffold with anouk init, drop in the call above, and point it at a provider.