Complete command reference for the z3ed CLI tool, including all automation and AI-powered features.
z3ed rom readRead bytes from ROM at specified address.
Syntax:
Notes:
--data-format controls the hex/ascii view of bytes.--format controls the output structure (json/text).Examples:
Output:
z3ed rom writeWrite bytes to ROM at specified address.
Syntax:
Notes:
--sandbox writes to a sandbox copy instead of the original ROM.Examples:
z3ed rom infoShow basic ROM metadata.
Syntax:
Examples:
z3ed rom diffCompare two ROM files.
Syntax:
Examples:
z3ed rom compareCompare a ROM against a baseline to identify differences.
Syntax:
Examples:
z3ed rom validateValidate ROM integrity and structure.
Syntax:
Examples:
Output:
z3ed rom generate-goldenGenerate a golden ROM file for testing.
Syntax:
Examples:
These commands operate directly on ROM data (no GUI required).
dungeon-describe-room --room <hex>dungeon-list-sprites --room <hex>dungeon-list-objects --room <hex>dungeon-list-custom-collision --room <hex> [--tiles <hex,hex,...>] [--nonzero] [--all]dungeon-minecart-audit [--room <hex> | --rooms <hex,hex,...> | --all] [--only-issues]dungeon-map --room <hex> [--layer <0|1|2>] *(overlays Oracle custom collision tiles when present)*dungeon-list-chests --room <hex>dungeon-get-entrance --entrance <hex> [--spawn]dungeon-export-room --room <hex> --output <file>dungeon-get-room-tiles --room <hex> *(stubbed)*dungeon-set-room-property --room <hex> --property <name> --value <value> *(stubbed)*Example:
overworld-describe-map --map <hex>overworld-find-tile --tile <hex>overworld-list-warps --map <hex>overworld-list-sprites --map <hex>overworld-list-items --map <hex>overworld-get-entrance --entrance <hex>overworld-tile-stats --map <hex>Example:
gui-place-tile --tile <hex> --x <x> --y <y>gui-click (--target <path> | --widget-key <key>) [--click-type <left|right|middle|double>]gui-type (--target <path> | --widget-key <key>) --text <text> [--clear-first]gui-wait [--condition <condition>] [--widget-key <key>] [--timeout-ms <ms>] [--poll-interval-ms <ms>]gui-assert [--condition <condition>] [--widget-key <key>]gui-discover-tool [--window <name>] [--type <type>]gui-summarize-widgetsgui-screenshot [--region <region>]z3ed test-listList available tests.
z3ed test-runExecute tests.
Syntax:
z3ed test-statusCheck test execution status.
resource-list --type <type>resource-search --query <text> [--type <type>]message-list, message-read, message-search --query <text>message-encode --text <text>, message-decode --hex <hex_bytes>message-export-org --output <path>, message-import-org --file <path>message-export-bundle --output <path> [--range <all|vanilla|expanded>]message-import-bundle --file <path> [--apply] [--strict] [--range <all|vanilla|expanded>]message-write --id <id> --text <text>message-export-bin --output <path> [--range expanded]message-export-asm --output <path> [--range expanded]dialogue-list, dialogue-read, dialogue-search --query <text>hex-search --pattern <hex>Use scoped help directly from the CLI:
Agent commands are routed through the agent subcommand:
Use z3ed agent with no args for a full list of agent subcommands.
These commands connect to a running Mesen2-OoS instance via the local socket (/tmp/mesen2-<pid>.sock). They do not require a ROM argument. The debug alias is the recommended front door (Mesen2 is the default backend).
z3ed mesen-gamestateRead ALTTP game state from Mesen2.
Syntax:
Examples:
z3ed mesen-spritesList active sprites from Mesen2.
Syntax:
Examples:
z3ed mesen-cpuRead CPU register state.
Syntax:
Examples:
z3ed mesen-memory-readRead emulator memory.
Syntax:
Examples:
z3ed mesen-memory-writeWrite emulator memory (hex bytes).
Syntax:
Examples:
z3ed mesen-disasmDisassemble code at an address.
Syntax:
Examples:
z3ed mesen-traceFetch execution trace.
Syntax:
Examples:
z3ed mesen-breakpointManage breakpoints.
Syntax:
Examples:
z3ed mesen-controlControl emulation state.
Syntax:
Examples:
AI workflows are available via the z3ed agent commands (see Agent CLI).
These options work with all commands:
--rom <file> - Specify ROM file to use--sandbox - Run ROM commands against a sandbox copy--format <json|text> - Output format--data-format <hex|ascii|both> - Byte view for read commands--tui / --interactive - Removed (use z3ed help and command-scoped --help)--list-commands - List all available commands--export-schemas - Export command schemas as JSON--version - Show version information--self-test - Run CLI self-test--verbose - Enable verbose output--quiet - Suppress non-error output--ai_provider <name> - AI provider (auto, ollama, gemini, openai, anthropic, mock)--ai_model <name> - Provider-specific model override--gemini_api_key <key> - Gemini API key--anthropic_api_key <key> - Anthropic API key--ollama_host <url> - Ollama host URL--openai_base_url <url> - OpenAI-compatible base URL (LM Studio: http://localhost:1234)--gui_server_address <host:port> - GUI automation server--prompt_version <name> - Prompt version override--use_function_calling <true|false> - Enable Gemini function calling--mesen-socket <path> - Override Mesen2 socket path--help - Show help for command--http-port <port> - HTTP API port (if enabled in build)--http-host <host> - HTTP API display host (printed URLs only)Environment variable shortcuts for AI providers: GEMINI_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY, OPENAI_BASE_URL/OPENAI_API_BASE, OLLAMA_HOST, OLLAMA_MODEL.
0 - Success1 - Error (invalid args, missing ROM, failed command)