A CLI tool that works with the Arshes iOS app to edit and preview shaders from your PC. Supports file-watching mode (serve) and MCP server mode (mcp) for AI agent integration.
go install github.com/shivaduke28/arshes-cli/cmd/arshes@latest- Go 1.24 or later
- Arshes iOS app
- PC and iPhone on the same local network (Wi-Fi)
Start a WebSocket server that watches a shader file and sends updates to iPhone in real-time.
# Start server (auto-generates a new shader file)
arshes serve
# Specify an existing shader file
arshes serve shader.slang
# Custom port
arshes serve --port 9000
# Enable logging to arshes.log
arshes serve --logIf no file is specified, a timestamped file (e.g., shader_20260125200800.slang) is created automatically.
- Open the Remote Editor feature in the Arshes iOS app
- Enter the server address (e.g.,
192.168.1.5:10080) and connect
Once connected, saving the shader file on your PC automatically sends it to iPhone for compilation and preview.
| Flag | Description |
|---|---|
-p, --port int |
Server port (default: 10080) |
--log |
Enable logging to arshes.log |
Start an MCP (Model Context Protocol) server via stdio with a WebSocket bridge to iPhone. This allows AI agents like Claude Code to compile and preview shaders on the connected iPhone.
arshes mcp
# Custom port
arshes mcp --port 9000| Tool | Description |
|---|---|
compile_shader |
Send shader code to iPhone for compilation. Accepts code (inline) or file (path to .slang file). Optionally save rendered image to image path. |
get_shader |
Get the last synced shader code from iPhone. |
get_shader_spec |
Get the Slang shader API specification (available uniforms, parameter attributes, entry point signature). |
get_status |
Get iPhone connection status and WebSocket server address. |
Add to your .mcp.json:
{
"mcpServers": {
"arshes": {
"command": "arshes",
"args": ["mcp"]
}
}
}import Arshes;
[shader("fragment")]
float4 fragmentMain(float2 uv : TEXCOORD) : SV_Target {
return float4(uv, 0.5, 1.0);
}