CodeX使用Skill生成游戏美术和音乐资源,一分钟入门

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"
相关推荐
小杍随笔1 天前
2025年Rust GUI框架实战万字避坑指南
开发语言·后端·rust
geovindu1 天前
CSharp: LogHelper
开发语言·后端·c#·.net
fliter1 天前
Go设计取舍之一: goroutine 为什么保持匿名、无状态
后端
fliter1 天前
Go设计取舍之二: maps.Keys和Values为什么返回迭代器
后端
热心市民lcj1 天前
Spring Boot 整合 Caffeine 本地缓存实战
spring boot·后端·缓存
Revolution611 天前
Nest.js 是什么:怎样用它写出第一个后端接口
后端·node.js·nestjs
aiopencode1 天前
SwiftUI Introspect生产环境完全指南:为什么它是安全可靠的选择
后端·ios
shengjk11 天前
x86架构发展史:从8086到x86-64,一文看懂40多年CPU指令集如何改变世界
后端
JackSparrow4141 天前
前端安全之JS混淆+请求加密+请求签名以提升爬虫难度
前端·javascript·后端·爬虫·python·安全
geovindu1 天前
go:loghelper
开发语言·后端·golang