This is the full developer documentation for hance # Skill Commands > Detailed reference for each /hance subcommand. The `/hance` skill routes to one of six subcommands based on what you ask for. ## `/hance setup` [Section titled “/hance setup”](#hance-setup) Verifies your environment is ready: checks for Bun (or Node as fallback), FFmpeg, and shows example commands. Use this the first time you run hance from your AI agent. ```plaintext > /hance setup ``` ## `/hance run` [Section titled “/hance run”](#hance-run) Apply a specific preset to a single file. The simplest path: name a look and a file. ```plaintext > /hance run portra-400 on my-video.mp4 > /hance run cinestill-800t sunset.mov ``` ## `/hance try` [Section titled “/hance try”](#hance-try) Explore looks for a file. The agent picks 3 candidate presets, renders still previews, and opens a side-by-side comparison UI in your browser so you can pick your favourite and fine-tune it. ```plaintext > /hance try a warm 70s look on sunset.mp4 > /hance try some looks for interview.mov ``` You can also provide a reference image to match: ```plaintext > /hance try match this reference photo.jpg on my-video.mp4 ``` ## `/hance refine` [Section titled “/hance refine”](#hance-refine) Perfect a single look on a single file. Where `try` explores options for you to pick from, `refine` takes one direction and dials it in — adjusting effects like grain, halation, vignette, white balance, and split tone on top of a base preset. The agent iterates on a still preview, judging each render against your intent, then offers to apply the result and save it as a reusable preset. ```plaintext > /hance refine portra-400 on sunset.jpg, classic film but less punchy > /hance refine the surf shot — add grain and a teal-orange split tone > /hance refine match the warmth of this reference.jpg ``` See [Grading workflow](/docs/agent/grading/) for how the agent evaluates and tunes a look. ## `/hance batch` [Section titled “/hance batch”](#hance-batch) Apply one preset to multiple files at once. ```plaintext > /hance batch apply portra-400 to everything in ./footage > /hance batch cinestill-800t clip*.mp4 ``` Note Batch processing requires a pro license. On the free tier, process one file at a time. See [Free vs Pro](/docs/free-vs-pro/). ## `/hance ui` [Section titled “/hance ui”](#hance-ui) Open the browser-based editor for interactive preview and tweaking. ```plaintext > /hance ui > /hance ui video.mp4 ``` # Grading workflow > How an AI agent evaluates and dials in a film look with hance. When you ask an agent to make a shot “look like film,” it doesn’t apply a preset and stop. Through the `/hance refine` command it works the way a colorist does: render, look, adjust, repeat. It judges its own output against your intent. This page explains what’s happening so you know what to ask for. ## The loop [Section titled “The loop”](#the-loop) The agent renders a **still** preview (never a full video while iterating), reads the result, names what’s wrong, changes a knob or two, and re-renders. Suspected artifacts get inspected at 1:1. It stops when the frame reads as film, then offers to apply the look to the whole file and save it as a reusable preset. ## What “film” usually means [Section titled “What “film” usually means”](#what-film-usually-means) A preset applied raw can look punchy and digital. A convincing film look usually adds: * **Lifted blacks** so shadows aren’t pure digital black. * **Highlight rolloff** for a gentle shoulder instead of clipped whites. * **Restrained saturation.** Oversaturation is the most common digital tell. * **Grain** for texture. * **Halation**, a soft glow bleeding from highlights. * **A subtle vignette** to frame the subject. ## Split tone, and matching mood [Section titled “Split tone, and matching mood”](#split-tone-and-matching-mood) A complementary split tone (warm highlights, cool teal shadows, the classic “teal-orange”) gives action, landscape, and city shots cinematic separation. But it fights warm, intimate scenes like a sunset portrait, which want consistent warmth instead. Part of refining is matching the toning to the mood rather than applying it everywhere. ## What to ask for [Section titled “What to ask for”](#what-to-ask-for) Be specific about the direction and let the agent handle the knobs: ```plaintext > /hance refine portra-400 on sunset.jpg, classic film but less punchy > /hance refine the surf shot, warmer, more grain, slightly stronger vignette > /hance refine match the look of this reference.jpg ``` When the agent has tuned a preset rather than used it stock, it will say so. The look is “portra-400, tuned,” and it can save your tuned version under its own name. # Overview > Use hance with an AI agent to describe the look you want in plain English. Hance ships with an [AI agent skill](https://www.skills.sh/) that lets you grade footage using natural language. No CLI knowledge needed. Describe the look you want and the agent handles the rest. ## Install the skill [Section titled “Install the skill”](#install-the-skill) Install via [skills.sh](https://skills.sh): ```bash npx skills add orva-studio/hance ``` Once installed, type `/hance` in your AI agent to get started. The skill is also baked into the `hance` binary itself. Any agent harness can pull the same instructions at runtime — version-matched to the installed CLI, no separate install — via `hance skills`: ```bash hance skills # the router / entry doc hance skills list # available subcommand + reference docs hance skills get refine # print one doc hance skills path # extract the docs to a local dir ``` ## How it works [Section titled “How it works”](#how-it-works) The skill uses `bunx @orva-studio/hance` (or `npx` as fallback) under the hood, so no global install is needed. It automatically detects your runtime and picks the fastest available runner. ## Subcommands [Section titled “Subcommands”](#subcommands) The `/hance` skill routes to one of six subcommands based on what you ask for. See the [Skill Commands](/docs/agent/commands/) page for full details. | Command | Description | | --------------- | ---------------------------------------------------- | | `/hance setup` | Verify your environment is ready | | `/hance run` | Apply a preset to a single file | | `/hance try` | Explore and compare looks in a browser UI | | `/hance refine` | Dial in one look on one file, iterating on a preview | | `/hance batch` | Apply one preset to multiple files | | `/hance ui` | Open the browser-based editor | ## Machine-readable docs [Section titled “Machine-readable docs”](#machine-readable-docs) These docs are published in formats built for LLMs and agents: * **[`/llms.txt`](/llms.txt)**: an index of the documentation, following the [llms.txt convention](https://llmstxt.org/), with links to every page. * **Plain Markdown**: append `.md` to any page URL to fetch its raw Markdown (frontmatter stripped). For example, this page is available at `/agent/overview.md`. Point your agent at `/llms.txt` to let it discover and pull in the relevant pages on demand. # Architecture > How hance is built: monorepo structure, FFmpeg codec I/O, GPU rendering, and IPC. Hance is a Bun workspaces monorepo with five packages: | Package | Purpose | | --------------- | --------------------------------------------------------------------------------- | | `packages/core` | Pure TypeScript effect/preset/arg logic and the shared WGSL shaders | | `packages/cli` | The compiled `hance` binary entry point | | `packages/gpu` | Render orchestration: drives the sidecar, runs the image pipeline, handles export | | `packages/ui` | Browser-based interactive preview | | `packages/wgpu` | Rust wgpu sidecar binary | ## How a frame flows (CLI render) [Section titled “How a frame flows (CLI render)”](#how-a-frame-flows-cli-render) When you render from the CLI, hance is not a pure-GPU tool: FFmpeg handles the codec work at both ends, and the GPU handles the pixels in between. `@hance/gpu` orchestrates the round trip for both video and image inputs. ``` flowchart TB cmd["$ hance <input>"] --> cli["packages/cli (parse args)"] cli -->|build render params| core["@hance/core (effects, presets, WGSL shaders)"] cli -->|start render: input + params| gpu["@hance/gpu (orchestrator)"] core -.->|params| gpu core -.->|WGSL shaders| sidecar[wgpu sidecar] gpu -->|spawns| decode[FFmpeg decode] decode -->|raw RGBA frames| gpu gpu <-->|"IPC: JSON init + RGBA"| sidecar gpu -->|graded RGBA frames| encode[FFmpeg encode] encode --> output[Output file] classDef pkg color:#e8843c; class cli,core,gpu,sidecar pkg; ``` ## How a frame flows (browser UI preview) [Section titled “How a frame flows (browser UI preview)”](#how-a-frame-flows-browser-ui-preview) The browser UI preview is a separate path. It loads the media into an `` or `