Codex Pet WebGitHub ↗

A tiny JavaScript SDK · Kavana included

Any Codex pet.
Any website.

One Web Component brings transparent atlas animation, roaming, drag, sleep, tuck, persistence, keyboard controls, touch support, and reduced motion.

Install in one minute

CDN quick-start

Two tags. No framework.

<script src="https://unpkg.com/codex-pet-companion@0.3.1/dist/codex-pet-companion.global.js"
  integrity="sha384-HCdZidL2jzxEW9SQR6w9TAZGehFjyRvAFQwUvc+nBeiFZdpNVy5sSRFZtQRZD4II"
  crossorigin="anonymous"></script>
<codex-pet-companion></codex-pet-companion>

Quick-start network behavior: this pinned CDN bundle also loads Kavana’s default pet.json and spritesheet.webp from unpkg. It is not a self-hosted setup.

Strict-CSP / self-hosted

<script src="/vendor/codex-pet-companion.global.js"></script>
<codex-pet-companion
  manifest-url="/pets/kavana/pet.json"
  atlas-url="/pets/kavana/spritesheet.webp">
</codex-pet-companion>

Self-host the bundle and both pet files, then use manifest-url and atlas-url. Other observed attributes are name, mode, state, and scale. Or run npm install codex-pet-companion.

Accessible by default

Native buttons, keyboard movement, focus restoration, coarse-pointer controls, and a quiet reduced-motion mode.

Strict-CSP ready

Self-host the JavaScript bundle, pet.json, and atlas, then provide their local URLs explicitly. No tracker, backend, or private Codex API.

Agent install

The hosted codex-pet-web skill validates the pet, preserves the site design, and shows Kavana doing zoomies while commands run.