r
# Codex + Meowa 1 分钟快速入门
适用环境:
- 已安装 Codex
- Windows 11
## 1. 安装 Meowa skill
在 PowerShell 执行:
```powershell
& "C:\Users\你的用户名.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe" `
"C:\Users\你的用户名.codex\skills.system\skill-installer\scripts\install-skill-from-github.py" `
--repo Meowa-AI/meowa-skills `
--path skills/game-assets
2. 配置 API Key
先去 Meowa 创建 key:
然后执行:
ruby
[System.Environment]::SetEnvironmentVariable("MEOWART_API_KEY", "你的_meowa_key", "User")
$env:MEOWART_API_KEY = [System.Environment]::GetEnvironmentVariable("MEOWART_API_KEY", "User")
3. 安装依赖
arduino
& "C:\Users\你的用户名.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe" -m pip install requests
4. 重启 Codex
安装完 skill 和环境变量后,重启一次 Codex。
5. 验证余额
r
& "C:\Users\你的用户名.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe" `
"C:\Users\你的用户名.codex\skills\game-assets\meowart_api.py" `
credits-balance
6. 直接生成一组测试图
r
& "C:\Users\你的用户名.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe" `
"C:\Users\你的用户名.codex\skills\game-assets\meowart_api.py" `
pixel-gen-run `
--template-name "object" `
--requirement "cat item icons: yarn ball, fish treat, bell collar, paw badge, milk bowl, feather toy, scratch toy, cat bed" `
--output-dir "C:\Users\你的用户名\Documents\Codex\outputs\m"
7. 在 Codex 里直接说
bash
用 game-assets skill 生成 8 个像素猫咪道具图标,保存到 outputs/m/icons
常见问题
Python was not found
不要用系统 Python,直接用 Codex 自带的 Python 路径。
ModuleNotFoundError: No module named 'requests'
执行:
arduino
& "C:\Users\你的用户名.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe" -m pip install requests
insufficient_credits
说明 key 没问题,只是余额不足,先充值再试。
[WinError 206] 文件名或扩展名太长
把输出目录改短一点,比如:
python
--output-dir "C:\Users\你的用户名\Documents\Codex\outputs\m"