loading…
Search for a command to run...
loading…
Codex plugin bundle for unifocl: installs MCP server config and unifocl workflow skills.
Codex plugin bundle for unifocl: installs MCP server config and unifocl workflow skills.
The programmable operations layer for Unity—built for keyboard-driven developers and autonomous AI agents.
Unity is a powerful engine, but its graphical, mouse-driven Editor can introduce friction for automation, LLM workflows, and developers who prefer the terminal. unifocl solves this by providing a structured, deterministic way to interact with, navigate, and mutate your Unity projects without relying on the GUI.
Whether you are a developer looking for a snappy Terminal User Interface (TUI) to manipulate scenes, or you are hooking up an AI agent via the Model Context Protocol (MCP) to autonomously write code and edit prefabs, unifocl provides the bridge.
unifocl is an independent project and is not associated with, affiliated with, or endorsed by Unity Technologies.
[UnifoclCommand] attribute to your C# editor methods. unifocl automatically discovers them and exposes them as live MCP tools with built-in dry-run sandboxing.[UnifoclRuntimeCommand] methods packaged into lazy-loadable categories.Shell Installer:
curl -fsSL https://raw.githubusercontent.com/Kiankinakomochi/unifocl/main/scripts/install.sh | sh
Homebrew:
brew tap Kiankinakomochi/unifocl
brew install unifocl
Winget:
winget install unifocl
PowerShell Installer:
iwr -useb https://raw.githubusercontent.com/Kiankinakomochi/unifocl/main/scripts/install.ps1 | iex
Download pre-built archives from the latest GitHub release and place the binary anywhere in your PATH.
unifocl agent setup /path/to/your-unity-project
Auto-detects installed agent tools (claude, codex) and writes the required config files into the project directory. Commit the generated .claude/settings.json and CLAUDE.md to share the integration with your team — each contributor runs agent setup once locally for their own permissions.
FindObjectsByType) are used when available, with automatic fallbacks for older versions. The Roslyn analyzer integration requires Unity 2022.2+.Launch the interactive shell to navigate your project at the speed of thought.
# Start the unifocl bridge in your project
unifocl
> /open ./MyUnityProject
> /hierarchy
> f PlayerController # Fuzzy find
> mk Cube # Create a GameObject
> /inspect 12 # Inspect the object
> set speed 5 # Change a component field
Agents can use the built-in MCP server or the one-shot exec path to read deterministic state and make safe changes.
# Run an agentic dry-run to see what will change
unifocl exec "rename 3 PlayerController --dry-run" --agentic --format json
unifocl returns a structured diff payload, letting the LLM verify the change before committing it:
{
"status": "success",
"action": "rename",
"diff": {
"format": "unified",
"summary": "Rename GameObject index 3",
"lines": ["--- before", "+++ after", "- name: \"Cube\"", "+ name: \"PlayerController\""]
}
}
Every mutation command supports --dry-run. The operation executes inside a Unity Undo group, captures a before/after diff, and immediately reverts—nothing touches the disk until you confirm.
[UnifoclCommand]Expose your own C# editor methods as live MCP tools:
[UnifoclCommand("myteam.reset-player", "Reset player to spawn point")]
public static void ResetPlayer(UnifoclCommandContext ctx)
{
var player = GameObject.FindWithTag("Player");
player.transform.position = Vector3.zero;
ctx.Return("Player reset to origin");
}
unifocl discovers these at runtime and makes them available as MCP tools—complete with automatic dry-run sandboxing. See docs/custom-commands.md for the full guide.
Execute arbitrary C# directly in the Unity Editor context—no script files needed:
# Simple read query
unifocl eval 'return Application.productName;'
# Dry-run: execute and revert all Unity Undo-tracked changes
unifocl eval 'Undo.RecordObject(Camera.main, "t"); Camera.main.name = "CHANGED";' --dry-run
Eval uses a dual-compiler strategy (Unity AssemblyBuilder in Bridge mode, bundled Roslyn in Host mode) and supports async/await, custom declarations, timeout protection, and --dry-run sandboxing. The entry point is always async Task<object>, so await works naturally.
AI agents working with Unity often need to understand what an asset looks like — is this sprite a character? A tileset? A UI icon? Normally this means sending the image to a multimodal LLM and burning tokens on cross-modal comprehension.
asset.describe solves this by running a local vision model (BLIP or CLIP) on your machine. Unity exports a thumbnail, the CLI captions it locally, and the agent receives a compact text description — zero vision tokens spent.
unifocl exec '{"operation":"asset.describe","args":{"assetPath":"Assets/Sprites/hero.png"},"requestId":"r1"}'
{
"status": "Completed",
"result": {
"description": "a cartoon character with a blue hat",
"assetType": "Texture2D",
"engine": "blip",
"model": "Salesforce/blip-image-captioning-base@82a37760"
}
}
Choose between two engines:
blip (default) — open-ended natural language captionsclip — zero-shot classification against game-asset labels (sprite, mesh, UI, material, etc.)Dependencies: Requires python3 (>= 3.10) and uv — run unifocl init to install them automatically. Runtime installs are driven by a hash-locked requirements file (uv run --with-requirements) pinned to transformers==5.5.0, torch==2.11.0 (CPU-compatible wheel selection by platform), and Pillow==12.2.0. The first invocation also downloads the model weights (~990 MB for BLIP, ~600 MB for CLIP) from HuggingFace; subsequent runs load entirely from cache with no network access. Model revisions are pinned to exact commit SHAs for supply-chain safety.
See the Command Reference — Asset Describe for full details.
To keep this README clean, detailed technical specifications and command lists have been split into dedicated documents:
| Document | Description |
|---|---|
| Command & TUI Reference | Full list of slash commands, contextual operations, keyboard shortcuts, dry-run mechanics, and eval details. |
| Agentic Workflow & Architecture | Deep dive into the daemon architecture, JSON envelopes, ExecV2 endpoints, concurrent worktrees, and the Persistence Safety Contract. |
| Custom Commands Guide | How to expose your C# methods as MCP tools with [UnifoclCommand]. |
| MCP Server Architecture | Built-in MCP server setup, agent JSON configuration, and multi-client guide. |
| Editor Compilation | Details on headless/CI compilation behavior and zero-touch recompilation. |
| Validate & Build Workflow | Project validation checks and build workflow commands. |
| Test Orchestration | Unity test runner integration (EditMode/PlayMode). |
| Project Diagnostics | Assembly graphs, scene deps, compile errors, and other read-only introspection. |
| Debug Artifact Workflow | Tiered debug report collection (prep → playmode → collect) for agents and CI. |
External contributions are accepted for version 0.3.0 and later.
Unless explicitly stated otherwise, any Contribution intentionally submitted for inclusion in version 0.3.0 and later is licensed under the Apache License 2.0.
Apache License 2.0 applies to version 0.3.0 and all later versions.
All content before version 0.3.0 is proprietary and all rights reserved.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"codex-plugin": {
"command": "npx",
"args": [
"-y",
"@unifocl/codex-plugin"
]
}
}
}PRs, issues, code search, CI status
Database, auth and storage
Reference / test server with prompts, resources, and tools.
Secure file operations with configurable access controls.