Agent guide

This guide is for people who already use an Agent such as Claude Code, Codex or Gemini CLI, and want that Agent to work with Galanty, the video previewer on your computer: open your project or video in place, play it, read your notes, edit the original and return to the changed second, and export when you ask. To start something new, you can also begin from a sample.

Galanty does not include a drafting model of its own. Once connected, your Agent (and whichever model service it is signed in to) writes the storyboard, writes the scene code and edits the copy for you. Rendering and video export run on your own Mac. Where narration happens depends on the engine you pick: on this computer by default; with a cloud voice service, the narration text goes to that service; whether a custom-command program goes online is up to that program. With "Review the finished video" on, your signed-in Agent receives frames from the video, the narration with its timing and any open notes — and, when it redoes a scene, that scene's code and parameters.

Local help and handing over notes

Help → Product and Agent guides opens the bundled manual offline. Markdown is in Galanty.app/Contents/Resources/help/, outside app.asar. Read quick-start.en.md first (the whole loop on one page), then README.md and package.json for the installed version and channel, and agent-guide.en.md and product-manual.en.md when needed. MCP resources: galanty://manual/quick/en, galanty://manual/index, galanty://manual/agent/en, galanty://manual/product/en (Chinese: zh).

The App Store sandbox prevents the app from launching an external Agent CLI. Connect your own Agent via MCP and reload its configuration. Then use Copy for Agent and send it the copied notes; connecting does not automatically process them. The Agent reads get_job({jobId, detail:true}) and galanty://guide/notes, claims notes, edits, compiles and replies. Review and play the updated picture in the app.

Choosing a voice

  1. Keep the original voice first. When copying a sample or opening an existing work, reuse its licensed narration seeds, existing audio and voice cache. If one sentence changes, regenerate only that sentence with the same engine, model, voice and rate; reuse the rest. Editing pictures does not require regenerating the whole narration.
  2. Check configured speech services next. In user settings → narration, choose Compatible voice service and enter an endpoint compatible with OpenAI /audio/speech, a model and a voice. Configuration is not permission to spend. Your own Agent can also use its configured tools for cloud TTS such as Gemini or ElevenLabs and bring the audio back into the original project. These are not dedicated built-in integrations, and those services are not guaranteed to support that interface directly. The Agent must explain which narration will be sent, the estimated cost and free options, offer an available free option first, and get explicit authorization before a paid call.
  3. Local neural voices are another option. The website download can use configured Qwen on Apple silicon, with a separately prepared Python environment and model. Kokoro is a separate local installation. The App Store version does not provide Qwen; do not ask users to install or launch it there. Check the current app for installation, disk and channel restrictions.
  4. If none is available, use captions and music first. Let the user play the pictures without automatically falling back to a system voice. System voices are only for draft listening explicitly chosen by the user, never for delivery; their license is limited to personal, noncommercial use. Agents must not select them by default. For delivery, turn off “Use the system voice if this fails” and check the actual engine in the report.

Normally keep one main voice per video; for dialogue, assign a consistent voice to each character. Match the narration language to the voice’s supported language. Listen to one sentence for pronunciation, emotion, pace and volume before generating the full narration. Listen to existing audio first rather than resynthesizing a test sentence. Explain the impact before paid use or changing a voice or engine; preserve the voice and reuse unchanged sentences from the cache.

Already have videos or projects? Open them as they are

Before Galanty, you may have had Claude Code or another Agent make plenty of videos. Galanty's rule: any normal video source should open and play directly, and any video can be annotated and previewed right away. Galanty's own storyboard and scene modules are a recommended way to write, not a requirement — don't ask your Agent to rewrite an existing project into Galanty's format.

What you haveHow to open it todayWhen you want changes
A finished video (MP4, MOV, WebM, from any tool)Open video file in the workbench, or have the Agent call make_video({videoFilePath:"/absolute/path/video.mp4"})Mark a moment and draw a box on the frame, write a note, then Copy for Agent. The Agent edits the original project that produced it and re-renders to the same file; Galanty reloads and resumes at the second you marked
An HTML animation project (web animation, Canvas, CSS animation)Open → Open HTML animation project on the workbench home, or ask your Agent to open the original HTML directoryPlay, pause, scrub, draw a box at a moment and write a note, then Copy for Agent. The Agent edits the original project; after it saves, Galanty refreshes and resumes at the note
A Remotion projectBy default, open the original project directory in place and keep watching it. When the original source is saved, it recompiles for free and resumes at the original second with the latest notes. You can also choose Open → Open Remotion project on the workbench home or have the Agent call import_storyboard({external:{dir:"/absolute/path/project"}})No storyboard needed: play, scrub and annotate. Click Copy as a Galanty project explicitly to detach from the original. Never rewrite the project into our format.

When an Agent edits an existing project, the goal is for Galanty to open it directly: if something blocks Galanty (for example fonts or script libraries loaded from the internet), fix just that compatibility point instead of restructuring the project. New videos written the recommended way gain sentence-level locating, narration, zero-AI palette and parameter tweaks in the player, and re-rendering only the changed segment.

1. What Galanty lets an Agent do

Once connected, your Agent uses these tools (15 MCP tools in total), grouped by what they do:

Opening and compiling

Starting new work: pick a sample or template

Watching and checking

Editing content and adding assets

Managing jobs and feedback

2. Website version vs. App Store version

Both channels can connect an Agent, but how you connect — and which files the Agent can reach — differ:

Website versionApp Store version
How MCP connectsCopy a configuration snippet and paste it into your Agent's config file (it connects to Galanty's own bundled Node process)Local bridge: either a direct HTTP connection, or npx -y @galanty/mcp forwarding (the local-bridge package is published on npm)
Can the Agent read and write files in your own projectYes — the Agent and the app share the same workspace folderThe direct HTTP connection can only reach files inside the app's own workspace. With the local bridge, local paths you pass to a tool are uploaded automatically, and finished videos and preview frames are downloaded back into your project's galanty-out/ folder
Do you need Node.js installedNo — it uses the Node bundled with GalantyNot for the direct connection; the local bridge needs Node.js 20 or later (run via npx)
Do you need a tokenNoYes — get or reset it from the "Connect an Agent" panel in Settings
Does Galanty need to stay openRecommended — the Agent can't connect while it's closedRequired; the bridge tries to launch Galanty in the background, direct HTTP needs the app open first
Can the app itself call an Agent's CLI to draft in one stepYes ("Draft with a signed-in Agent" in Advanced settings)No — the sandbox does not allow the app to run external programs; instead, you connect Galanty from inside your own Agent

3. Connecting your Agent

Copy the current MCP configuration into your own Agent's settings, then reload. The sections below cover each Agent.

Claude Code

Website version

  1. Open Galanty → Settings → More (developer) → "MCP: let your Agent use the workbench."
  2. Set the configuration target to Claude Code and click "Copy Galanty MCP settings."
  3. Paste it into .mcp.json, merging it into any existing mcpServers — don't overwrite other servers. The copied content looks like the example below. That's the source-checkout form; in the installed app, command is Galanty's own executable and there's an extra ELECTRON_RUN_AS_NODE entry. Paste exactly what you copied — no separate Node.js install needed.
{
  "mcpServers": {
    "galanty": {
      "command": "node",
      "args": ["<path where Galanty is installed on this computer>/scripts/mcp-server.mjs"],
      "cwd": "<path where Galanty is installed on this computer>",
      "env": {
        "DVS_WORKSPACE": "<your workspace path>",
        "DVS_DATA": "<data directory>"
      }
    }
  }
}
  1. Optional: click "Copy project instructions" and paste them into your project's AGENTS.md or CLAUDE.md, so Claude Code already knows how to use Galanty.
  2. Restart Claude Code, or have it reload its MCP configuration.

App Store version

Open Galanty → Settings → More (developer) → "Connect an Agent." The panel shows the local address and token. Use direct HTTP or the local bridge:

# Direct connection (nothing to install). The token only works on this computer; do not commit it to Git
claude mcp add --scope user --transport http galanty http://127.0.0.1:<port>/mcp --header "Authorization: Bearer <token>"

# Or use the local bridge (needs Node.js 20+): it hands project files to the app and downloads finished videos and preview frames to galanty-out/
claude mcp add --scope user galanty -e GALANTY_MCP_TOKEN="<token>" -- npx -y @galanty/mcp

Use the exact address, port and token currently shown in the app's Settings panel — just copy them as given.

Allow Galanty tools once

At the first tool call, choose "Always allow" in Claude Code's confirmation dialog, if offered. You can also merge the following into your local ~/.claude/settings.json to automatically allow tools from the galanty server. Keep your existing permission entries and other settings. Remove this rule if you prefer to confirm each call.

{
  "permissions": {
    "allow": ["mcp__galanty__*"]
  }
}

See the official Claude Code permissions guide. Dialog wording and available options depend on your version and organization policy.

Codex

Website version

  1. Open Galanty → Settings → More (developer) → "MCP: let your Agent use the workbench."
  2. Set the configuration target to Codex and click "Copy Galanty MCP settings."
  3. Paste it into your local ~/.codex/config.toml. It looks like this (again, what you copied wins):
[mcp_servers.galanty]
command = "node"
args = ["<path where Galanty is installed on this computer>/scripts/mcp-server.mjs"]
cwd = "<path where Galanty is installed on this computer>"
startup_timeout_sec = 30
tool_timeout_sec = 600
# Approve Galanty tool calls automatically; remove the next line to confirm each call
default_tools_approval_mode = "approve"

[mcp_servers.galanty.env]
DVS_WORKSPACE = "<your workspace path>"
DVS_DATA = "<data directory>"
  1. Optional: paste the "project instructions" snippet into your project's AGENTS.md.
  2. Restart Codex, or start a new session.

App Store version

Get the address and token from the same "Connect an Agent" panel, then use direct HTTP or the local bridge:

# Direct connection (nothing to install). The token only works on this computer; do not commit it to Git
[mcp_servers.galanty]
url = "http://127.0.0.1:<port>/mcp"
http_headers = { Authorization = "Bearer <token>" }
tool_timeout_sec = 600
# Approve Galanty tool calls automatically; remove the next line to confirm each call
default_tools_approval_mode = "approve"

Or use the local bridge (needs Node.js 20+) by adding the following to your local ~/.codex/config.toml. Choose one connection type; do not define [mcp_servers.galanty] twice. The bridge uploads project files to the app and downloads finished videos and preview frames to galanty-out/.

[mcp_servers.galanty]
command = "npx"
args = ["-y", "@galanty/mcp"]
tool_timeout_sec = 600
default_tools_approval_mode = "approve"

[mcp_servers.galanty.env]
GALANTY_MCP_TOKEN = "<token>"

Allow Galanty tools once

The default_tools_approval_mode = &quot;approve&quot; line above is a server-level setting supported by the official Codex MCP documentation and configuration reference. It applies to Galanty tools. Change it to &quot;prompt&quot; to confirm each call. If an older version does not support it, choose "Always allow" at the first confirmation if offered, or follow that version's official documentation. Organization policy and individual tool settings may override it.

Gemini CLI

Website version

  1. Open Galanty → Settings → More (developer) → "MCP: let your Agent use the workbench."
  2. Set the configuration target to Gemini and click "Copy Galanty MCP settings."
  3. Paste it into your local ~/.gemini/settings.json, merging it into any existing mcpServers:
{
  "mcpServers": {
    "galanty": {
      "command": "node",
      "args": ["<path where Galanty is installed on this computer>/scripts/mcp-server.mjs"],
      "cwd": "<path where Galanty is installed on this computer>",
      "trust": true,
      "env": {
        "DVS_WORKSPACE": "<your workspace path>",
        "DVS_DATA": "<data directory>"
      }
    }
  }
}
  1. Optional: paste the "project instructions" snippet into your project's AGENTS.md.
  2. Restart Gemini CLI.

App Store version

Merge one of the following configurations into your local ~/.gemini/settings.json, keeping other servers. Direct HTTP needs nothing installed:

{
  "mcpServers": {
    "galanty": {
      "httpUrl": "http://127.0.0.1:<port>/mcp",
      "headers": {"Authorization": "Bearer <token>"},
      "trust": true
    }
  }
}

Or use the local bridge (needs Node.js 20+) to upload project files to the app and download finished videos and preview frames to galanty-out/:

{
  "mcpServers": {
    "galanty": {
      "command": "npx",
      "args": ["-y", "@galanty/mcp"],
      "env": {"GALANTY_MCP_TOKEN": "<token>"},
      "trust": true
    }
  }
}

Allow Galanty tools once

According to the official Gemini CLI configuration reference, &quot;trust&quot;: true trusts this server and skips tool-call confirmations. Remove it or set it to false to confirm each call. If your version does not support it, choose "Always allow" at the first confirmation if offered. Organization policy may restrict these options.

The relevant Claude Code and Codex command flags were checked against local --help. Gemini's local help check was not completed; its examples use official JSON configuration. Flags and dialogs vary by version, so follow each Agent's official documentation. Keep all token-bearing configuration on this computer and out of Git. After resetting the token, copy the configuration again, replace the old token and reload your Agent.

Method three: CLI

The package is @galanty/cli; the command is galanty. Run it with npx without a global installation:

npx -y @galanty/cli open ./my-project --at 12.5

If you open projects from the terminal regularly, install the command globally:

npm install -g @galanty/cli
galanty open ./my-project --at 12.5

To connect your Agent through the CLI, set command to npx, with -y, @galanty/cli and mcp as the three args entries, in that order. With a global installation, set command to galanty and use mcp as the only argument.

Make it a habit: After every edit, open the project in Galanty and jump to the second you changed. Check the change, then keep watching or decide whether to export.

4. Verify the connection

Once configured, ask your Agent something simple to confirm it's connected, for example:

"What samples does Galanty have? Name a few."

The Agent should read the galanty://samples resource and name a few samples with IDs starting with S. If it says it doesn't know what Galanty is, or reports a missing tool, see Section 8, Troubleshooting.

5. First use: open or make

Once connected, try sending your Agent one of these prompts (with your own content):

  1. "Open /absolute/path/my-project in Galanty and play it from 0:12. After I annotate, edit the original project and come back to that second."
  2. "Pick the sample that looks most like a product explainer, copy it, and rewrite it for our new feature. Just show me a preview — don't export yet."
  3. "Turn this PDF into a 30-second vertical video: /absolute/path/to/my-document.pdf. Play it for me first."
  4. "On that last video, make the music more upbeat and hold an extra second after the line at 0:05, then show me again."

For an existing project, the Agent opens it in place without converting the format. For new work, it typically reads galanty://guide and the sample list first and copies the closest match. After each edit it compiles and opens the matching project from the changed position. It only spends an export from your allowance when you explicitly say "export" or "give me an MP4."

When editing an existing project, the Agent should pass focus:{atSeconds} or focus:{sceneId} for the actual change on the updated timeline. Use preview:false to skip automatic display for batch work. The workbench defers switching while you are typing or have unsaved changes. If no opening tool is available, the Agent should explain why and keep the playback link.

6. Common phrases

You don't need to know any tool names — just talk normally, and the Agent picks the right tool:

What you can sayWhat actually happens
"Change second 5" / "Rewrite the opening line"Locates the matching scene and sentence by time or by text, edits it, and recompiles for you to watch
"Swap the music" / "Make the music more upbeat"Picks a different track from the built-in library, or uses a music file you provide; the whole video shares one music bed. Then recompiles
"Write an original 120 BPM track in code, with a build-up and a drop"The Agent synthesizes the music in its own environment, imports it and swaps it in — no licensing worries, and the beat grid is exact (its environment needs to run something like Python)
"Switch to a blue palette" / "Change the colors"Updates the theme or storyboard palette and recompiles
"Make it vertical" / "Make it square"Changes the aspect ratio (9:16 or 1:1); some assets may need re-cropping
"Export it" / "Give me an MP4"Actually produces the file; it tells you first whether this counts against your monthly allowance, how many exports you have left, and whether it will carry a watermark
"Don't export yet, let me look first"Nothing extra needed — compiling and opening a preview is the default, free and uncounted

Asking for a better-looking video

These come from what worked on Galanty's own samples. They're suggestions — if you want something else, just say so:

What you can sayWhy it helps
"When the narrator says 'storm', switch the picture to a storm"Changing the picture on the spoken word feels more natural than cutting on a timestamp, and it stays in sync when you edit the copy. That's how the weather changes in sample S107, The Lychees of Chang'an
"Cut by the music's sections — whole bars per scene, big reveal on the drop"In a promo with no narration, changes that land on downbeats and phrase turns hit hardest. See sample S106, “Fix a word. Play on.”
"Trim the music so the first big drum hit lands on the title"Moving the music to fit the picture is easier than the other way round; S107 shifted its score 4.55 seconds earlier
"Hold the title and the end credit two seconds longer" / "Pause after this line"Key text needs time to read. In S107 the end credit was gone less than 2 seconds after the narrator finished, and it felt rushed
"Duck the music a bit more under the voice"Music drowning out the narration hurts more than any visual flaw. By default the music dips 12 dB while someone speaks; you can go further
"Draw the interface in code, no screenshots"A mock interface drawn in code can hit the beat exactly, change its text and recolor. We tried stitching screenshots together; it looked much worse
"If it doesn't fit, cut shots — don't speed up the cuts"Swapping text in the same spot over and over is hard to follow; by default, leave about 2 seconds between hard cuts

7. Files and privacy

See the privacy policy for the full picture, and Support for general app questions.

8. Troubleshooting

Can't connect, or the Agent reports a missing tool

The token expired or was reset

After you click "Reset token" in Settings, the old token stops working immediately. Copy the configuration again and update the token in your local settings (Authorization for direct HTTP, or GALANTY_MCP_TOKEN for the bridge). Remove connections added with mcp add before adding them again, then reload your Agent. Keep token-bearing configuration out of Git.

The port changed

Galanty reuses the last port it used; if that port is taken by something else, it picks a new one. Just reopen the Settings panel and copy the address again.

The Agent can't find a file

The direct HTTP connection can only use files inside the app's workspace. To use files from your own project, import the file in the app first or forward local project files through the bridge npx -y @galanty/mcp.

Ran out of export allowance

The free plan gives you 7 exports a month, resetting on the 1st in your computer's time zone. Check the app for current export availability and watermark status. You can still compile, play and annotate after using your allowance.

macOS asks to access data from other apps

Without an explicit token, the bridge tries to read a connection discovery file in the app's sandbox container. macOS may ask whether your terminal or Agent can access data from other apps. The bridge configurations above supply GALANTY_MCP_TOKEN and skip reading that file; open Galanty first. If you already clicked "Allow", you can continue without repeating the step. If you declined or prefer to avoid reading the discovery file, copy the token-bearing configuration again and reload your Agent.

npx -y @galanty/mcp won't install or connect

Run node --version to confirm Node.js 20 or later, then run GALANTY_MCP_TOKEN=&quot;&lt;token&gt;&quot; npx -y @galanty/mcp --check with the current token. It checks app discovery, not token authentication; an actual tool call reports a rejected token and asks you to copy the connection command again. Open Galanty before checking. If it still fails, use the direct HTTP connection instead.

The command itself errors out

Claude Code's, Codex's and Gemini CLI's command syntax changes with their versions. The relevant Claude Code and Codex flags were checked against local --help; Gemini uses official JSON configuration and its local help was not verified. If your flags look different, trust that Agent's own help text. Still stuck? Email support@galanty.cn — see Support.

Before creating: workflow and making notes

After connecting, ask your Agent to read galanty://guide/craft. It covers starting from a complete document, a reference sample or an idea; considering the audience, key changes and sound; and checking the actual picture and audio before handing over a first version. Existing videos and projects can still be opened directly, without converting them to a Galanty format.

Open S127 in the sample library and expand “How it was made → Making notes” when available. The notes record the original request, problem, revision, conditions, trade-offs and what was checked. Older samples without notes work as before. Your connected Agent can look through galanty://samples/index, then read howMade.lessons with list_templates({id:&quot;S127&quot;}). Downloaded source packs keep the same public records in prompt.json.

Treat the lessons as suggestions, not creative rules or a promise that another subject will produce the same result. Keep what helps and continue toward your own style.