Open source · MIT

Visual editing
for Sanity.

Your clients edit text, images and sections right on your Astro site, with role-based permissions. No forms, and the design stays untouched.

$ gh repo clone seba-seb/okapi-sanity
Read the docs →

/ Role-based permissions,
defined by you. /

Each role only sees
what it can edit.

Your team owns styles, components and structure. Clients edit content and publish, or leave drafts for review. The AI chat follows the same rules.

Sanity roles → okapi.policy.ts
Administrator viewadministrator
Content
river-house.jpg
StyleAll screens ▾
Size
Color
Bottom margin
Structure
Publish
Editor vieweditor
Content
river-house.jpg
— Style · hidden
— Components · hidden
Publish

/ Visual editing without lock-in,
on a stack you control. /

01

Inline editing

Text, rich text, images and links are edited on the page, with undo and draft autosave.

02

Blocks and components

Insert, reorder and reuse sections. Change a component once and every instance follows.

~1 KB

of JS on pages that don't need it. The editor never ships in the public bundle.

04

AI chat

Changes by instruction, validated against the schema and permissions. Bring your own API key.

Sanity alone vs. Sanity + OkapiSame content, a different way to edit it.

Sanity aloneSanity + Okapi
EditingForms in the StudioOn the rendered page
PreviewSeparate from what you editIt is the page
PermissionsPer documentPer field and per action
Page buildingNeeds a developerWith the blocks your team defines
Small changesGo through your teamHandled by the client

/ Three steps,
guided by your agent. /

Clone// 001

Clone the repo

A complete Astro project, with sample blocks ready to be replaced.

$ gh repo clone seba-seb/okapi-sanity
Install// 002

Install it with your agent

Claude Code, Codex or Cursor follow INSTALL.md: they ask which modules you want (slider, components, AI chat, roles), install only those, connect Sanity and make your sections editable.

> Follow INSTALL.md and add Okapi
Hand off// 003

Invite your client

Add them as an editor in Sanity. They edit at /studio, and every publish triggers a deploy.

→ yoursite.com/studio
localhost:4321/studio#/editor