god-tibo-imagen

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

god-tibo-imagen — AI Image Generation via Codex Backend

god-tibo-imagen — 基于Codex后端的AI图像生成

Zero dependencies. Reuses your Codex login. Works from CLI, Node.js, or Python.
god-tibo-imagen
generates images by sending requests to Codex's ChatGPT backend. It reads existing local authentication from
~/.codex/auth.json
— no separate API key setup required if you already use Codex CLI.
零依赖。复用你的Codex登录信息。支持CLI、Node.js或Python调用。
god-tibo-imagen
通过向Codex的ChatGPT后端发送请求生成图片。它读取
~/.codex/auth.json
中的现有本地认证信息——如果你已使用Codex CLI,则无需单独设置API密钥。

Installation

安装

Plugin (Claude Code)

插件(Claude Code)

bash
claude plugin marketplace add NomaDamas/god-tibo-imagen
bash
claude plugin marketplace add NomaDamas/god-tibo-imagen

npm (CLI — global)

npm(CLI — 全局安装)

bash
npm install -g god-tibo-imagen
bash
npm install -g god-tibo-imagen

Provides the
gti
command

提供
gti
命令

undefined
undefined

npm (Library)

npm(库)

bash
npm install god-tibo-imagen
bash
npm install god-tibo-imagen

Python SDK

Python SDK

bash
pip install god-tibo-imagen
bash
pip install god-tibo-imagen

Skill (any platform)

Skill(任意平台)

bash
npx skills add https://github.com/akillness/oh-my-skills --skill god-tibo-imagen
bash
npx skills add https://github.com/akillness/oh-my-skills --skill god-tibo-imagen

Requirements

要求

  • Node.js 20+ (CLI / library)
  • Python 3.10+ (Python SDK)
  • Existing Codex CLI login at
    ~/.codex/auth.json
  • Node.js 20+(CLI / 库)
  • Python 3.10+(Python SDK)
  • ~/.codex/auth.json
    中存在有效的Codex CLI登录信息

When to use

使用场景

  • Generate AI images without a separate API key — reuses Codex auth
  • Automate image generation from shell scripts, Node.js, or Python workflows
  • Use reference images as context for guided generation (up to multiple images)
  • Run dry-run validation before submitting real generation requests
  • Integrate image generation into agent pipelines via the Python
    Client
    class
  • 无需单独API密钥即可生成AI图片——复用Codex认证
  • 在shell脚本、Node.js或Python工作流中自动化图片生成
  • 使用参考图片作为引导生成的上下文(支持多张图片)
  • 在提交真实生成请求前运行试运行验证
  • 通过Python
    Client
    类将图片生成集成到Agent流水线中

Do not use when

不适用场景

  • You need a supported public API (this uses an undocumented internal backend — may change)
  • You do not have an active Codex / ChatGPT subscription with a valid
    ~/.codex/auth.json
  • You need guaranteed SLA or production-grade image generation → use DALL-E API or Stable Diffusion
  • 你需要受支持的公开API(本工具使用未公开的内部后端——可能会变更)
  • 你没有有效的Codex / ChatGPT订阅,或
    ~/.codex/auth.json
    无效
  • 你需要有服务等级协议(SLA)保障或生产级别的图片生成 → 使用DALL-E API或Stable Diffusion

CLI usage

CLI使用示例

bash
undefined
bash
undefined

Basic generation

基础生成

gti --prompt "blue square icon on white background" --output ./out.png
gti --prompt "白色背景上的蓝色方形图标" --output ./out.png

With reference image(s)

带参考图片

gti --prompt "make it round" --input ./ref1.png --input ./ref2.jpg --output ./out.png
gti --prompt "把它改成圆形" --input ./ref1.png --input ./ref2.jpg --output ./out.png

Dry-run (validate without generating)

试运行(仅验证不生成)

gti --prompt "sunset over mountains" --dry-run
gti --prompt "山间日落" --dry-run

Debug output (redacts sensitive data)

调试输出(自动脱敏敏感数据)

gti --prompt "cartoon cat" --output ./cat.png --debug
undefined
gti --prompt "卡通猫" --output ./cat.png --debug
undefined

Node.js library

Node.js库使用示例

javascript
import { createProvider, resolveConfig } from 'god-tibo-imagen'

const config = await resolveConfig()
const provider = createProvider(config)
const result = await provider.generate({ prompt: 'abstract art' })
javascript
import { createProvider, resolveConfig } from 'god-tibo-imagen'

const config = await resolveConfig()
const provider = createProvider(config)
const result = await provider.generate({ prompt: '抽象艺术' })

Python SDK

Python SDK使用示例

python
from god_tibo_imagen import Client

client = Client()
client.generate_image(
    prompt="blue square icon",
    output="./out.png"
)
python
from god_tibo_imagen import Client

client = Client()
client.generate_image(
    prompt="蓝色方形图标",
    output="./out.png"
)

Supported formats

支持的格式

FormatInputOutput
PNG
JPG
GIF
WebP
格式输入输出
PNG
JPG
GIF
WebP

Operating rules

使用规则

  1. Verify
    ~/.codex/auth.json
    exists and is valid before running
  2. Use
    --dry-run
    to validate prompt and config without consuming quota
  3. Treat the backend as undocumented — avoid hard dependencies in production code
  4. Use
    --debug
    to inspect request shape; sensitive tokens are automatically redacted
  5. Pass multiple
    --input
    flags for multi-image reference context
  1. 运行前验证
    ~/.codex/auth.json
    存在且有效
  2. 使用
    --dry-run
    验证提示词和配置,不消耗配额
  3. 该后端为未公开接口——避免在生产代码中硬依赖
  4. 使用
    --debug
    查看请求结构;敏感令牌会自动脱敏
  5. 传递多个
    --input
    标志以使用多张参考图片作为上下文

References

参考链接