@dorely13/ai-imagegen-cli 0.1.0
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.
- package/dist/help.js +98 -0
- package/dist/index.js +1452 -0
- package/dist/index.js.map +1 -0
- package/package.json +43 -0
package/dist/help.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export const USAGE = `imagegen - provider-agnostic image generation CLI
|
|
2
|
+
|
|
3
|
+
Usage:
|
|
4
|
+
imagegen auth codex login [--timeout <minutes>] [--no-open]
|
|
5
|
+
imagegen auth codex status [--show-path]
|
|
6
|
+
imagegen auth codex logout
|
|
7
|
+
imagegen generate --prompt <text> --out <path|dir> [--provider <name>] [options]
|
|
8
|
+
imagegen edit --prompt <text> --source <file> [--mask <file>] --out <path|dir> [--provider <name>] [options]
|
|
9
|
+
imagegen providers
|
|
10
|
+
imagegen help [command]
|
|
11
|
+
|
|
12
|
+
Image options (generate, edit):
|
|
13
|
+
--prompt <text> Prompt text (required)
|
|
14
|
+
--out <path|dir> Output file or directory (required)
|
|
15
|
+
--provider <name> Repeatable. Defaults to the only configured provider;
|
|
16
|
+
required when several are configured.
|
|
17
|
+
--reference <file> Reference image for continuity (repeatable, max 4)
|
|
18
|
+
--size <size> auto, WIDTHxHEIGHT, aspect (16:9), or preset
|
|
19
|
+
square, portrait, landscape, wide (validated per
|
|
20
|
+
provider; bad aspects are rejected)
|
|
21
|
+
--quality <quality> Quality hint (provider-specific, default auto)
|
|
22
|
+
--format <format> png, jpeg, or webp (default png)
|
|
23
|
+
--count <n> Number of images, 1-4 (default 1)
|
|
24
|
+
|
|
25
|
+
Auth options:
|
|
26
|
+
--timeout <minutes> Login wait timeout (default 10)
|
|
27
|
+
--no-open Print the URL without opening a browser
|
|
28
|
+
--show-path Show where tokens are stored (auth status)
|
|
29
|
+
|
|
30
|
+
Global:
|
|
31
|
+
-h, --help Show help and exit 0
|
|
32
|
+
`;
|
|
33
|
+
const COMMAND_HELP = {
|
|
34
|
+
auth: `imagegen auth - manage provider credentials (one namespace per provider)
|
|
35
|
+
|
|
36
|
+
Usage:
|
|
37
|
+
imagegen auth codex login [--timeout <minutes>] [--no-open]
|
|
38
|
+
imagegen auth codex status [--show-path]
|
|
39
|
+
imagegen auth codex logout
|
|
40
|
+
`,
|
|
41
|
+
login: `imagegen auth codex login - connect Codex via browser OAuth
|
|
42
|
+
|
|
43
|
+
Usage:
|
|
44
|
+
imagegen auth codex login [--timeout <minutes>] [--no-open]
|
|
45
|
+
|
|
46
|
+
Starts a temporary localhost callback server, opens the browser,
|
|
47
|
+
exchanges the code, and stores tokens in the OS vault (file fallback).
|
|
48
|
+
`,
|
|
49
|
+
status: `imagegen auth codex status - show Codex connection state
|
|
50
|
+
|
|
51
|
+
Usage:
|
|
52
|
+
imagegen auth codex status [--show-path]
|
|
53
|
+
|
|
54
|
+
Prints JSON without secrets. --show-path reveals the token location.
|
|
55
|
+
`,
|
|
56
|
+
logout: `imagegen auth codex logout - remove stored Codex credentials
|
|
57
|
+
|
|
58
|
+
Usage:
|
|
59
|
+
imagegen auth codex logout
|
|
60
|
+
`,
|
|
61
|
+
generate: `imagegen generate - create images from a prompt
|
|
62
|
+
|
|
63
|
+
Usage:
|
|
64
|
+
imagegen generate --prompt <text> --out <path|dir> [--provider <name>] [options]
|
|
65
|
+
|
|
66
|
+
Options: --provider <name> (repeatable; run on several providers),
|
|
67
|
+
--reference <file> (repeatable, max 4), --size, --quality,
|
|
68
|
+
--format png|jpeg|webp, --count 1-4.
|
|
69
|
+
`,
|
|
70
|
+
edit: `imagegen edit - edit a source image with a prompt
|
|
71
|
+
|
|
72
|
+
Usage:
|
|
73
|
+
imagegen edit --prompt <text> --source <file> [--mask <file>] --out <path|dir> [--provider <name>] [options]
|
|
74
|
+
|
|
75
|
+
Same image options as generate.
|
|
76
|
+
`,
|
|
77
|
+
providers: `imagegen providers - list registered and configured providers
|
|
78
|
+
|
|
79
|
+
Usage:
|
|
80
|
+
imagegen providers
|
|
81
|
+
|
|
82
|
+
Prints JSON with each provider and whether it is configured.
|
|
83
|
+
`,
|
|
84
|
+
help: `imagegen help - show human-readable usage
|
|
85
|
+
|
|
86
|
+
Usage:
|
|
87
|
+
imagegen help [command]
|
|
88
|
+
`,
|
|
89
|
+
};
|
|
90
|
+
export function helpFor(topic) {
|
|
91
|
+
if (!topic)
|
|
92
|
+
return USAGE;
|
|
93
|
+
const text = COMMAND_HELP[topic];
|
|
94
|
+
if (!text)
|
|
95
|
+
return `Unknown help topic "${topic}".\n\n${USAGE}`;
|
|
96
|
+
return text;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=help.js.map
|