New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@hewliyang/codex-image-cli

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hewliyang/codex-image-cli

Standalone Node.js CLI/SDK for generating/editing images via the ChatGPT Codex image_generation backend.

latest
npmnpm
Version
0.1.1
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

@hewliyang/codex-image-cli

Standalone Node.js CLI/SDK for generating or editing images through the ChatGPT Codex subscription via the Responses API

tool_choice: { type: "image_generation" }

Install

npm install -g @hewliyang/codex-image-cli
img-gen --help

Usage

img-gen -o out.png -s 1024x1024 "draw a tiny red dragon sticker"
img-gen -i out.png -o edited.png "edit this into a blue dragon"
img-gen check

For local development:

npm install
npm run build
node dist/index.js -o out.png -s 1024x1024 "draw a tiny red dragon sticker"

Auth

Login to Codex with Pi or Codex, the CLI consumes their access tokens. Token refresh is not supported by calls via the CLI.

SDK

import { generateImage } from "@hewliyang/codex-image-cli";

const result = await generateImage({
  prompt: "draw a tiny red dragon sticker",
  outputPath: "out.png",
  size: "1024x1024",
});

FAQs

Package last updated on 03 May 2026

Related posts