@fionoble/image-gen-cli 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +7 -0
  2. package/index.js +6 -1
  3. package/package.json +3 -2
package/README.md CHANGED
@@ -23,6 +23,13 @@ npx @fionoble/image-gen-cli -p "A cat in a spacesuit" -o cat.png
23
23
  export OPENAI_API_KEY="sk-..."
24
24
  ```
25
25
 
26
+ ## Environment Variables
27
+
28
+ | Variable | Description |
29
+ |----------|-------------|
30
+ | `OPENAI_API_KEY` | **Required.** Your OpenAI API key. |
31
+ | `OPENAI_BASE_URL` | Custom API base URL (for proxies). |
32
+
26
33
  ## CLI Usage
27
34
 
28
35
  ```
package/index.js CHANGED
@@ -23,6 +23,7 @@ Options:
23
23
 
24
24
  Environment:
25
25
  OPENAI_API_KEY Required. Your OpenAI API key.
26
+ OPENAI_BASE_URL Optional. Custom API base URL (for proxies).
26
27
 
27
28
  Examples:
28
29
  image-gen -p "A cat in a spacesuit"
@@ -211,7 +212,11 @@ async function main() {
211
212
  process.exit(1);
212
213
  }
213
214
 
214
- const client = new OpenAI();
215
+ const clientOptions = {};
216
+ if (process.env.OPENAI_BASE_URL) {
217
+ clientOptions.baseURL = process.env.OPENAI_BASE_URL;
218
+ }
219
+ const client = new OpenAI(clientOptions);
215
220
 
216
221
  try {
217
222
  if (args.image) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fionoble/image-gen-cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "CLI tool for OpenAI image generation and editing, with a Claude Code skill",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -24,7 +24,8 @@
24
24
  ],
25
25
  "repository": {
26
26
  "type": "git",
27
- "url": "https://github.com/Fionoble/image-gen-cli.git"
27
+ "url": "https://github.com/Fionoble/ai-cli-tools.git",
28
+ "directory": "packages/image-gen-cli"
28
29
  },
29
30
  "author": "Fionoble",
30
31
  "license": "ISC",