# Codex CLI, asking for your game’s pixel art

> Give Codex CLI the asset tool: one MCP line or its own shell, a note in AGENTS.md, and it asks for pixel art, sheets and sounds, each quoted before it runs.

- URL: https://tyrbo.ai/ai-game-assets-for-codex
- Title: AI Game Assets for Codex CLI: Pixel Art and Sound
- Language: English (en)
- Updated: 2026-11-26

Codex CLI reads your repository, edits files and runs commands from the terminal, so asset gen fits it two ways. Registered as an MCP server, it gives Codex one tool named `asset` that takes the words after the command and the game’s folder. Left out of the config, Codex can still type the same `asset` lines into its shell. Either way the answer is identical, and the crystal cave on this page shows what a side view platformer’s first few calls return.

Send this to your agent

```
Set up Tyrbo asset gen for me so I can make my game's art, sprite sheets, animated characters, 3D models, UI and sound from here, all in one look.
1. Install the CLI: run `npm install -g @tyrbo/asset` (Node 20.11 or later).
2. Add the skill: in Claude Code, run `claude plugin marketplace add https://cdn.jsdelivr.net/npm/@tyrbo/asset/.claude-plugin/marketplace.json`, then `claude plugin install tyrbo-asset@tyrbo`. In another MCP client, add the MCP server `npx -y @tyrbo/asset mcp`. In any other agent, read `asset --help` before the first call.
3. Check it, free: in an empty scratch folder, not my game's, run `asset look grove "hand-painted fantasy forest, soft dappled light" --view top-down --mock`. It needs no key and writes stand-in files there.
4. Authenticate: ask me to make an asset key at https://app.tyrbo.ai/?from=/asset-generator#/settings/assets (Settings, Asset gen) and to run `asset login` in my own terminal, pasting the key there. Never ask me for the key in chat, and never run `asset login` yourself. Once I have, run `asset spend` to see it works.
Once that's done, let me know when it's ready.
```

[Get an asset key](https://app.tyrbo.ai/?from=/asset-generator#/settings/assets)[Read the docs](https://tyrbo.ai/asset-generator/docs)

## Set it up in Codex CLI

1. **Install the CLI** Install the asset command (Node 20.11 or later). `npm install -g @tyrbo/asset`
2. **Add the MCP server to Codex CLI** Run its own command, which writes the server into ~/.codex/config.toml, or .codex/config.toml in a trusted project. `codex mcp add tyrbo-asset -- npx -y @tyrbo/asset mcp`
3. **Try it free** In an empty scratch folder, a mock call checks the setup with no key: it writes stand-in files and spends nothing. `asset look grove "hand-painted fantasy forest, soft dappled light" --view top-down --mock`
4. **Log in in your own terminal** Make an asset key in the Tyrbo app (Settings, Asset gen) and paste it into asset login yourself. The agent never asks for the key and never runs the login. `asset login`

Codex CLI’s own docs, read November 25, 2026:

- [https://learn.chatgpt.com/docs/extend/mcp?surface=cli](https://learn.chatgpt.com/docs/extend/mcp?surface=cli)
- [https://learn.chatgpt.com/docs/codex/cli](https://learn.chatgpt.com/docs/codex/cli)

## The commands

```
asset look caverns "chunky 16-bit pixel art platformer, crisp pixels, limited palette, glowing crystal caves" --view side --mock
asset look caverns "chunky 16-bit pixel art platformer, crisp pixels, limited palette, glowing crystal caves" --view side
asset character miner "a small miner with a headlamp and a pickaxe" --view side --clips idle,walk
asset synth gem pickup
asset spend
```

## Made by the CLI, not drawn for this page

Real files the asset CLI wrote, each under the command that made it.

walk, 4 frames at 8 a second

### See prompt

`asset character miner "a small miner with a headlamp and a pickaxe" --view side --clips idle,walk`

![A side-view pixel-art cave of glowing blue crystals: ledges, a waterfall, a small hero and a spiny beast](https://tyrbo.ai/asset-gen/caverns/caverns.webp)

### See prompt

`asset look caverns "chunky 16-bit pixel art platformer, crisp pixels, limited palette, glowing crystal caves" --view side`

![A pixel-art miner in a blue hood with a headlamp, a red scarf and a pickaxe, seen from the side](https://tyrbo.ai/asset-gen/caverns/miner.webp)

## Server or shell: which one Codex uses

With the server added, Codex sees a tool and fills in its arguments, so it never has to quote a long description inside a shell line. Without it, Codex runs `asset` like any other program it finds on your PATH. Pick the server when you want art requests listed apart from ordinary commands in the session; pick the shell when you would rather keep config untouched. `codex mcp list` shows whether the server is registered.

One thing goes through neither: `asset login`. The server refuses to run it, and the key is pasted into your own terminal, so Codex never sees it.

## Tell it in AGENTS.md

Codex reads `AGENTS.md` for how a project likes to work. Paste the agent lines from the [docs](https://tyrbo.ai/asset-generator/docs) there: the look comes first, everything else is asked in it, the title screen comes last, and `asset --help` (or `asset <verb> --help`) is where the flags live. Because Codex checks the help before guessing, its calls match the version you installed, even after an update adds a verb.

## Approvals and the sandbox

Codex runs commands under a sandbox and an approval setting, and `/permissions` is where you change both. A `--mock` call stays on your machine, so it works under the tightest setting. A real call talks to the asset service, so it needs the network; if Codex reports it could not connect, that setting is the first place to look.

A sensible order for a new game: let Codex wire the cave level with `--mock` on every line, run it, then approve the real look. Once that scene is right, the miner and his sounds follow in the same palette. `asset synth` makes simple sound effects like a gem pickup offline and free, so the level has audio before you spend anything on it.

## What lands, and what it costs

The look writes `caverns.png` and `look.json`; the miner writes his front picture, a sheet with its atlas, and `miner.anim.json` for the clips. Codex gets one JSON line naming those paths and can open them straight away. A refused call prints its reason on stderr and exits 1, and Codex reads that like any failed command. Each paid ask is quoted first and stopped when your credits are short, a repeat of an earlier ask comes back from the cache at no charge, and `asset spend` prints the running total.

## Questions people ask

### Does Codex need the MCP server to make assets?

No. Its shell can run `asset` directly. The server just hands Codex a tool with typed arguments, which some people find tidier in a long session.

### Why does a real call fail when the mock one worked?

The mock never leaves your machine; a real call reaches the asset service. Check the sandbox and network setting under `/permissions`, and that you ran `asset login` yourself.

### Can Codex log in for me?

No, on purpose. The server refuses `asset login`, and the key belongs in your own terminal. Make it in the Tyrbo app under Settings, Asset gen, and paste it once.

## For your coding agent

- [Game assets for Claude Code](https://tyrbo.ai/ai-game-assets-for-claude-code)
- [Game assets for Cursor](https://tyrbo.ai/ai-game-assets-for-cursor)
- [Game assets for Gemini CLI](https://tyrbo.ai/ai-game-assets-for-gemini-cli)
- [Game assets for Cline](https://tyrbo.ai/ai-game-assets-for-cline)
- [Game assets for Kilo Code](https://tyrbo.ai/ai-game-assets-for-kilo-code)
- [Game assets for Roo Code](https://tyrbo.ai/ai-game-assets-for-roo-code)
- [Game assets for OpenCode](https://tyrbo.ai/ai-game-assets-for-opencode)
- [Game assets for Windsurf](https://tyrbo.ai/ai-game-assets-for-windsurf)
- [Game assets for GitHub Copilot](https://tyrbo.ai/ai-game-assets-for-github-copilot)
- [Game assets for Zed](https://tyrbo.ai/ai-game-assets-for-zed)
- [Game assets for Aider](https://tyrbo.ai/ai-game-assets-for-aider)
- [Game assets with Ollama](https://tyrbo.ai/ai-game-assets-with-ollama)

## More from the asset generator

- [Asset generator](https://tyrbo.ai/asset-generator)
- [Docs](https://tyrbo.ai/asset-generator/docs)
- [Top-down RPG character sprite sheet](https://tyrbo.ai/top-down-rpg-character-sprite-sheet)
- [AI 3D model generator for games](https://tyrbo.ai/ai-3d-model-generator-for-games)
- [Auto-rig a 3D model for games](https://tyrbo.ai/auto-rig-3d-model-for-games)
- [Game UI generator](https://tyrbo.ai/game-ui-generator)
- [AI sprites for Godot](https://tyrbo.ai/ai-sprites-for-godot)
- [Pixel art asset generator](https://tyrbo.ai/pixel-art-asset-generator)

## Install it, then ask for the look.

[Get an asset key](https://app.tyrbo.ai/?from=/asset-generator#/settings/assets)

Make a key in the Tyrbo app, then run asset login. Add --mock to try any command free first.

---

This is the Markdown version of https://tyrbo.ai/ai-game-assets-for-codex, from Tyrbo (The AI game engine). Cite and link the page itself. Every page: https://tyrbo.ai/llms.txt