@glbgpt/cli 0.1.0-test.5 → 0.1.1
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/README.md +81 -6
- package/dist/src/auth/authClient.d.ts +21 -2
- package/dist/src/auth/authClient.js +62 -2
- package/dist/src/auth/authClient.js.map +1 -1
- package/dist/src/auth/loginFlow.js +5 -2
- package/dist/src/auth/loginFlow.js.map +1 -1
- package/dist/src/auth/loopbackServer.d.ts +2 -1
- package/dist/src/auth/loopbackServer.js +6 -3
- package/dist/src/auth/loopbackServer.js.map +1 -1
- package/dist/src/commands/accountCommand.js +10 -4
- package/dist/src/commands/accountCommand.js.map +1 -1
- package/dist/src/commands/configCommand.d.ts +5 -0
- package/dist/src/commands/configCommand.js +15 -2
- package/dist/src/commands/configCommand.js.map +1 -1
- package/dist/src/commands/execCommand.d.ts +6 -0
- package/dist/src/commands/execCommand.js +64 -9
- package/dist/src/commands/execCommand.js.map +1 -1
- package/dist/src/commands/loginCommand.js +9 -6
- package/dist/src/commands/loginCommand.js.map +1 -1
- package/dist/src/commands/mediaCommand.js +3 -2
- package/dist/src/commands/mediaCommand.js.map +1 -1
- package/dist/src/commands/skillCommand.d.ts +30 -0
- package/dist/src/commands/skillCommand.js +160 -0
- package/dist/src/commands/skillCommand.js.map +1 -0
- package/dist/src/config/configFile.d.ts +12 -0
- package/dist/src/config/configFile.js +12 -0
- package/dist/src/config/configFile.js.map +1 -1
- package/dist/src/config/env.d.ts +18 -0
- package/dist/src/config/env.js +57 -7
- package/dist/src/config/env.js.map +1 -1
- package/dist/src/core/catalog.d.ts +8 -1
- package/dist/src/core/catalog.js +13 -2
- package/dist/src/core/catalog.js.map +1 -1
- package/dist/src/core/contextPrune.d.ts +13 -0
- package/dist/src/core/contextPrune.js +66 -0
- package/dist/src/core/contextPrune.js.map +1 -0
- package/dist/src/core/httpChatBackend.js +22 -5
- package/dist/src/core/httpChatBackend.js.map +1 -1
- package/dist/src/core/runChat.d.ts +9 -5
- package/dist/src/core/runChat.js +10 -7
- package/dist/src/core/runChat.js.map +1 -1
- package/dist/src/core/session.d.ts +11 -0
- package/dist/src/core/session.js +20 -1
- package/dist/src/core/session.js.map +1 -1
- package/dist/src/core/toolRegistry.d.ts +16 -3
- package/dist/src/core/toolRegistry.js +28 -15
- package/dist/src/core/toolRegistry.js.map +1 -1
- package/dist/src/core/turnLoop.d.ts +4 -0
- package/dist/src/core/turnLoop.js +78 -13
- package/dist/src/core/turnLoop.js.map +1 -1
- package/dist/src/core/types.d.ts +21 -0
- package/dist/src/core/updateCheck.d.ts +46 -0
- package/dist/src/core/updateCheck.js +139 -0
- package/dist/src/core/updateCheck.js.map +1 -0
- package/dist/src/exec/media.d.ts +32 -0
- package/dist/src/exec/media.js +70 -0
- package/dist/src/exec/media.js.map +1 -0
- package/dist/src/exec/output.d.ts +16 -0
- package/dist/src/exec/output.js +41 -0
- package/dist/src/exec/output.js.map +1 -1
- package/dist/src/fs/globTool.d.ts +8 -0
- package/dist/src/fs/globTool.js +117 -0
- package/dist/src/fs/globTool.js.map +1 -0
- package/dist/src/fs/grepTool.d.ts +4 -0
- package/dist/src/fs/grepTool.js +146 -0
- package/dist/src/fs/grepTool.js.map +1 -0
- package/dist/src/fs/index.d.ts +8 -0
- package/dist/src/fs/index.js +13 -0
- package/dist/src/fs/index.js.map +1 -0
- package/dist/src/fs/limits.d.ts +34 -0
- package/dist/src/fs/limits.js +74 -0
- package/dist/src/fs/limits.js.map +1 -0
- package/dist/src/fs/listDirTool.d.ts +2 -0
- package/dist/src/fs/listDirTool.js +68 -0
- package/dist/src/fs/listDirTool.js.map +1 -0
- package/dist/src/fs/readFileTool.d.ts +2 -0
- package/dist/src/fs/readFileTool.js +102 -0
- package/dist/src/fs/readFileTool.js.map +1 -0
- package/dist/src/fs/walk.d.ts +11 -0
- package/dist/src/fs/walk.js +38 -0
- package/dist/src/fs/walk.js.map +1 -0
- package/dist/src/fs/workspaceGuard.d.ts +27 -0
- package/dist/src/fs/workspaceGuard.js +96 -0
- package/dist/src/fs/workspaceGuard.js.map +1 -0
- package/dist/src/index.js +47 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcp/mediaTools.d.ts +63 -0
- package/dist/src/mcp/mediaTools.js +385 -0
- package/dist/src/mcp/mediaTools.js.map +1 -0
- package/dist/src/mcp/server.d.ts +6 -2
- package/dist/src/mcp/server.js +35 -11
- package/dist/src/mcp/server.js.map +1 -1
- package/dist/src/media/aiApiClient.d.ts +5 -0
- package/dist/src/media/aiApiClient.js +12 -1
- package/dist/src/media/aiApiClient.js.map +1 -1
- package/dist/src/media/budget.d.ts +42 -0
- package/dist/src/media/budget.js +95 -0
- package/dist/src/media/budget.js.map +1 -0
- package/dist/src/media/executor.d.ts +9 -0
- package/dist/src/media/executor.js +1 -1
- package/dist/src/media/executor.js.map +1 -1
- package/dist/src/media/generateImageTool.d.ts +8 -2
- package/dist/src/media/generateImageTool.js +51 -3
- package/dist/src/media/generateImageTool.js.map +1 -1
- package/dist/src/media/promptSanitizer.d.ts +11 -0
- package/dist/src/media/promptSanitizer.js +33 -0
- package/dist/src/media/promptSanitizer.js.map +1 -0
- package/dist/src/media/taskManager.d.ts +8 -1
- package/dist/src/media/taskManager.js +1 -1
- package/dist/src/media/taskManager.js.map +1 -1
- package/dist/src/tui/App.js +54 -21
- package/dist/src/tui/App.js.map +1 -1
- package/dist/src/tui/ParamEditor.d.ts +11 -2
- package/dist/src/tui/ParamEditor.js +17 -6
- package/dist/src/tui/ParamEditor.js.map +1 -1
- package/dist/src/tui/atPopup.d.ts +8 -0
- package/dist/src/tui/atPopup.js +1 -1
- package/dist/src/tui/atPopup.js.map +1 -1
- package/dist/src/tui/chatController.d.ts +58 -2
- package/dist/src/tui/chatController.js +231 -40
- package/dist/src/tui/chatController.js.map +1 -1
- package/dist/src/tui/models.d.ts +6 -0
- package/dist/src/tui/models.js +14 -6
- package/dist/src/tui/models.js.map +1 -1
- package/dist/src/tui/run.js +55 -16
- package/dist/src/tui/run.js.map +1 -1
- package/dist/src/util/brokenPipe.d.ts +10 -0
- package/dist/src/util/brokenPipe.js +19 -0
- package/dist/src/util/brokenPipe.js.map +1 -0
- package/dist/src/web/index.d.ts +8 -0
- package/dist/src/web/index.js +10 -0
- package/dist/src/web/index.js.map +1 -0
- package/dist/src/web/webFetchTool.d.ts +18 -0
- package/dist/src/web/webFetchTool.js +222 -0
- package/dist/src/web/webFetchTool.js.map +1 -0
- package/dist/src/web/webSearchTool.d.ts +22 -0
- package/dist/src/web/webSearchTool.js +123 -0
- package/dist/src/web/webSearchTool.js.map +1 -0
- package/package.json +3 -2
- package/skills/globalgpt/SKILL.md +99 -0
- package/skills/globalgpt/references/troubleshooting.md +34 -0
- package/skills/globalgpt-coding/SKILL.md +65 -0
- package/skills/globalgpt-coding/references/troubleshooting.md +34 -0
- package/skills/globalgpt-image/SKILL.md +109 -0
- package/skills/globalgpt-image/references/recipes.md +52 -0
- package/skills/globalgpt-image/references/troubleshooting.md +49 -0
- package/skills/globalgpt-video/SKILL.md +109 -0
- package/skills/globalgpt-video/references/recipes.md +50 -0
- package/skills/globalgpt-video/references/troubleshooting.md +49 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: globalgpt-image
|
|
3
|
+
description: >
|
|
4
|
+
Generates and edits images through the user's GlobalGPT account via the glbgpt CLI.
|
|
5
|
+
Use when the user wants to create, generate, edit, restyle, or touch up an image,
|
|
6
|
+
picture, photo, logo, illustration, poster, thumbnail, banner, or icon — including
|
|
7
|
+
image-to-image edits that build on a reference image. NOT for video, animation, or
|
|
8
|
+
animating a still image — use globalgpt-video for those. NOT for delegating code
|
|
9
|
+
work to a GlobalGPT model — that is globalgpt-coding, which the user invokes
|
|
10
|
+
explicitly.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# GlobalGPT image generation
|
|
14
|
+
|
|
15
|
+
Generate images through the user's GlobalGPT account with the `glbgpt` CLI.
|
|
16
|
+
|
|
17
|
+
<!-- shared:banner -->
|
|
18
|
+
> **Generation spends real credits.** Price a job without running it using
|
|
19
|
+
> `--estimate`; show the balance with `glbgpt account`.
|
|
20
|
+
<!-- /shared:banner -->
|
|
21
|
+
|
|
22
|
+
## Before the first call
|
|
23
|
+
|
|
24
|
+
<!-- shared:setup -->
|
|
25
|
+
Run `glbgpt whoami`. If the command is not found, tell the user to install it with
|
|
26
|
+
`npm i -g @glbgpt/cli`. If it reports that nobody is signed in, ask the user to
|
|
27
|
+
run `glbgpt login` themselves — it opens a browser. Never try to authenticate for
|
|
28
|
+
them.
|
|
29
|
+
<!-- /shared:setup -->
|
|
30
|
+
|
|
31
|
+
## Quick start
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
glbgpt image "a red fox in falling snow, cinematic lighting" # blocks until saved
|
|
35
|
+
glbgpt image "a red fox in snow" --estimate # price only, generates nothing
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The first line prints the saved path once it finishes. Files land in
|
|
39
|
+
`./glbgpt-output/` unless `-o <dir>` says otherwise.
|
|
40
|
+
|
|
41
|
+
## When invoked directly
|
|
42
|
+
|
|
43
|
+
If the user ran /globalgpt-image without saying what to make, run
|
|
44
|
+
`glbgpt model list image` and show the models as a menu — use your host's native option picker if it has one, else a numbered list — adding:
|
|
45
|
+
"pick one, or just tell me what to make and I'll use the default." Generate with
|
|
46
|
+
`-m <model>` when they pick. When this skill triggers from ordinary conversation
|
|
47
|
+
instead, skip the menu: use the default model and only ask something when the
|
|
48
|
+
subject itself is unclear.
|
|
49
|
+
|
|
50
|
+
## Before you spend
|
|
51
|
+
|
|
52
|
+
A generation you have to redo costs the full price again, so know what to generate
|
|
53
|
+
before you run the command — without interrogating the user:
|
|
54
|
+
|
|
55
|
+
- **Subject unclear or missing** ("make me an image"): ask what it should show — one
|
|
56
|
+
short question, not a menu of options.
|
|
57
|
+
- **Two plausible readings**: say how you read it and confirm before generating.
|
|
58
|
+
A word that does not parse cleanly, a likely typo, or anything you had to
|
|
59
|
+
reinterpret to make sense of COUNTS as two readings — even if one reading feels
|
|
60
|
+
obvious to you. Guessing and offering to redo doubles the cost of being wrong.
|
|
61
|
+
- **Subject clear**: go. Style, aspect ratio and model all have sensible defaults —
|
|
62
|
+
do not ask about them unless the user seems to care.
|
|
63
|
+
- Never ask more than one question per turn.
|
|
64
|
+
|
|
65
|
+
## Choosing a model
|
|
66
|
+
|
|
67
|
+
Run `glbgpt model list image` and choose from what it prints. `glbgpt model show
|
|
68
|
+
<model>` gives one model's parameters and limits, including which aspect ratios and
|
|
69
|
+
resolutions it accepts.
|
|
70
|
+
|
|
71
|
+
The catalog is served from the account and changes over time, so treat a model name
|
|
72
|
+
you remember as a guess: list first. Omit `-m/--model` entirely unless the user asked
|
|
73
|
+
for a specific model — the default is chosen for general use.
|
|
74
|
+
|
|
75
|
+
## Footguns
|
|
76
|
+
|
|
77
|
+
These are the mistakes that cost money or silently produce the wrong thing.
|
|
78
|
+
|
|
79
|
+
- **Reference images belong in a flag, never in the prompt.** Use `-i ./ref.png` for
|
|
80
|
+
image-to-image. A path or URL written into the prompt text reaches the media model
|
|
81
|
+
as literal words; it cannot fetch anything.
|
|
82
|
+
- **Do not describe a result you have not seen.** Never tell the user what the image
|
|
83
|
+
looks like, its resolution, or any detail you have not verified in the file itself.
|
|
84
|
+
Most settings came from the model's own defaults, not from you.
|
|
85
|
+
- **Do not build a polling loop.** `glbgpt image` generation blocks until the file is
|
|
86
|
+
saved. Reach for `--detach` only when you deliberately want several generations
|
|
87
|
+
running at once, then collect them with `glbgpt task wait <id>` and
|
|
88
|
+
`glbgpt task download <id>`.
|
|
89
|
+
- **Never retry a failed generation automatically.** A genuine failure is not charged,
|
|
90
|
+
but a generation that timed out or was interrupted may still be running on the server
|
|
91
|
+
and will be charged — retrying pays twice for the same thing. Report the failure and
|
|
92
|
+
let the user decide.
|
|
93
|
+
- **Ask before batches.** More than two or three generations is real money. Confirm
|
|
94
|
+
the plan with the user first.
|
|
95
|
+
- **Set only the parameters the user asked for.** Every flag you leave out falls back
|
|
96
|
+
to a default tuned for that model; invented values make results worse and can cost
|
|
97
|
+
more.
|
|
98
|
+
|
|
99
|
+
## Common jobs
|
|
100
|
+
|
|
101
|
+
Ready-made command lines for thumbnails, product shots, and image edits:
|
|
102
|
+
[references/recipes.md](references/recipes.md).
|
|
103
|
+
|
|
104
|
+
## When something fails
|
|
105
|
+
|
|
106
|
+
Read the error text — the CLI says what went wrong (not signed in, not enough
|
|
107
|
+
credits, a parameter the chosen model does not support). Fix the cause or report it
|
|
108
|
+
to the user; never retry blindly. Common failures and what they mean:
|
|
109
|
+
[references/troubleshooting.md](references/troubleshooting.md).
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Recipes
|
|
2
|
+
|
|
3
|
+
Intent → command. Check `glbgpt model list image` for what is available before
|
|
4
|
+
picking a model; these recipes deliberately leave `-m` off so the default applies.
|
|
5
|
+
|
|
6
|
+
## Images
|
|
7
|
+
|
|
8
|
+
**Square social image**
|
|
9
|
+
```bash
|
|
10
|
+
glbgpt image "<subject>, <style>" --ar 1:1
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
**Wide thumbnail or cover**
|
|
14
|
+
```bash
|
|
15
|
+
glbgpt image "<subject>, bold composition, high contrast" --ar 16:9
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Product shot on a clean background**
|
|
19
|
+
```bash
|
|
20
|
+
glbgpt image "<product>, studio lighting, plain white background, product photography" --ar 1:1 --res 2K
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Edit or restyle an existing image**
|
|
24
|
+
```bash
|
|
25
|
+
glbgpt image "<what to change>" -i ./original.png
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**Avoid something specific**
|
|
29
|
+
```bash
|
|
30
|
+
glbgpt image "<subject>" --negative-prompt "text, watermark, extra fingers"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Reproducible output** — reuse a seed the user gives you:
|
|
34
|
+
```bash
|
|
35
|
+
glbgpt image "<subject>" --seed 12345
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Pricing a job first
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
glbgpt image "<subject>" --estimate # prints the price, generates nothing
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Several at once
|
|
45
|
+
|
|
46
|
+
Only when the user has agreed to the batch:
|
|
47
|
+
```bash
|
|
48
|
+
glbgpt image "<a>" --detach # prints a task id immediately
|
|
49
|
+
glbgpt image "<b>" --detach
|
|
50
|
+
glbgpt task list # ids and status
|
|
51
|
+
glbgpt task download <id> # fetch a finished result
|
|
52
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
<!-- shared:troubleshooting-common -->
|
|
4
|
+
<!-- shared:login -->
|
|
5
|
+
## "Not signed in"
|
|
6
|
+
|
|
7
|
+
The user must run `glbgpt login` themselves — it opens a browser. On a headless box
|
|
8
|
+
or over SSH, `glbgpt login --code` prints a URL instead: the user opens it on any
|
|
9
|
+
machine with a browser, authorizes there, and pastes the code the page shows back
|
|
10
|
+
into the terminal. Do not
|
|
11
|
+
attempt to authenticate for them.
|
|
12
|
+
<!-- /shared:login -->
|
|
13
|
+
|
|
14
|
+
## Not enough credits, or a plan restriction
|
|
15
|
+
|
|
16
|
+
The command reports a payment problem instead of generating. Show the user
|
|
17
|
+
`glbgpt account` (balance and membership) and stop — do not retry, and do not try a
|
|
18
|
+
different model hoping it is cheaper unless the user asks.
|
|
19
|
+
|
|
20
|
+
## "Unknown model"
|
|
21
|
+
|
|
22
|
+
The catalog is server-driven and the name you used no longer exists (or never did).
|
|
23
|
+
Run `glbgpt model list image` or `glbgpt model list video` and use a name it prints.
|
|
24
|
+
|
|
25
|
+
## A parameter is rejected
|
|
26
|
+
|
|
27
|
+
Support differs per model — aspect ratios, resolutions, durations, audio and
|
|
28
|
+
reference-image behaviour are all per-model. Run `glbgpt model show <model>` and use a
|
|
29
|
+
value it lists, or drop the flag entirely so the model's default applies.
|
|
30
|
+
|
|
31
|
+
## The generation failed after submitting
|
|
32
|
+
|
|
33
|
+
A genuine failure is not charged — the CLI says so when it reports one. Report the
|
|
34
|
+
failure and its reason to the user and let them decide what to do; never retry
|
|
35
|
+
automatically, because a task that timed out or was interrupted may still be running
|
|
36
|
+
and would then be charged again. `glbgpt task show <id>` gives the status and reason
|
|
37
|
+
for a specific task, and `glbgpt task list` shows recent ones.
|
|
38
|
+
|
|
39
|
+
## The command seems to hang
|
|
40
|
+
|
|
41
|
+
Video generation takes minutes and the command blocks on purpose. Wait for it. If the
|
|
42
|
+
process was interrupted, the task keeps running on the server: `glbgpt task list`
|
|
43
|
+
finds it, `glbgpt task download <id>` fetches the result once it is ready.
|
|
44
|
+
|
|
45
|
+
## The file is not where you expected
|
|
46
|
+
|
|
47
|
+
Results are saved under `./glbgpt-output/` relative to the working directory unless
|
|
48
|
+
`-o <dir>` was passed. The command prints the absolute path when it finishes.
|
|
49
|
+
<!-- /shared:troubleshooting-common -->
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: globalgpt-video
|
|
3
|
+
description: >
|
|
4
|
+
Generates videos through the user's GlobalGPT account via the glbgpt CLI.
|
|
5
|
+
Use when the user wants to create or generate a video, clip, animation, or b-roll —
|
|
6
|
+
including animating a still image (image-to-video), turning a photo into motion,
|
|
7
|
+
and first/last-frame interpolation. NOT for still images — use globalgpt-image.
|
|
8
|
+
NOT for delegating code work to a GlobalGPT model — that is globalgpt-coding,
|
|
9
|
+
which the user invokes explicitly.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# GlobalGPT video generation
|
|
13
|
+
|
|
14
|
+
Generate video through the user's GlobalGPT account with the `glbgpt` CLI.
|
|
15
|
+
|
|
16
|
+
<!-- shared:banner -->
|
|
17
|
+
> **Generation spends real credits.** Price a job without running it using
|
|
18
|
+
> `--estimate`; show the balance with `glbgpt account`.
|
|
19
|
+
<!-- /shared:banner -->
|
|
20
|
+
|
|
21
|
+
## Before the first call
|
|
22
|
+
|
|
23
|
+
<!-- shared:setup -->
|
|
24
|
+
Run `glbgpt whoami`. If the command is not found, tell the user to install it with
|
|
25
|
+
`npm i -g @glbgpt/cli`. If it reports that nobody is signed in, ask the user to
|
|
26
|
+
run `glbgpt login` themselves — it opens a browser. Never try to authenticate for
|
|
27
|
+
them.
|
|
28
|
+
<!-- /shared:setup -->
|
|
29
|
+
|
|
30
|
+
## Quick start
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
glbgpt video "slow waves on a beach at sunset" --ar 16:9 # minutes; blocks until saved
|
|
34
|
+
glbgpt video "slow waves on a beach at sunset" --estimate # price only, generates nothing
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The first line prints the saved path once it finishes. Files land in
|
|
38
|
+
`./glbgpt-output/` unless `-o <dir>` says otherwise.
|
|
39
|
+
|
|
40
|
+
## When invoked directly
|
|
41
|
+
|
|
42
|
+
If the user ran /globalgpt-video without saying what to make, run
|
|
43
|
+
`glbgpt model list video` and show the models as a menu — use your host's native option picker if it has one, else a numbered list — adding:
|
|
44
|
+
"pick one, or just tell me what to make and I'll use the default." Generate with
|
|
45
|
+
`-m <model>` when they pick. When this skill triggers from ordinary conversation
|
|
46
|
+
instead, skip the menu: use the default model and only ask something when the
|
|
47
|
+
subject itself is unclear.
|
|
48
|
+
|
|
49
|
+
## Before you spend
|
|
50
|
+
|
|
51
|
+
A generation you have to redo costs the full price again, so know what to generate
|
|
52
|
+
before you run the command — without interrogating the user:
|
|
53
|
+
|
|
54
|
+
- **Subject unclear or missing** ("make me a video"): ask what it should show — one
|
|
55
|
+
short question, not a menu of options.
|
|
56
|
+
- **Two plausible readings**: say how you read it and confirm before generating.
|
|
57
|
+
A word that does not parse cleanly, a likely typo, or anything you had to
|
|
58
|
+
reinterpret to make sense of COUNTS as two readings — even if one reading feels
|
|
59
|
+
obvious to you. Guessing and offering to redo doubles the cost of being wrong.
|
|
60
|
+
- **Subject clear**: go. Style, aspect ratio and model all have sensible defaults —
|
|
61
|
+
do not ask about them unless the user seems to care.
|
|
62
|
+
- Never ask more than one question per turn.
|
|
63
|
+
|
|
64
|
+
## Choosing a model
|
|
65
|
+
|
|
66
|
+
Run `glbgpt model list video` and choose from what it prints. `glbgpt model show
|
|
67
|
+
<model>` gives one model's parameters and limits, including which aspect ratios,
|
|
68
|
+
resolutions and durations it accepts.
|
|
69
|
+
|
|
70
|
+
The catalog is served from the account and changes over time, so treat a model name
|
|
71
|
+
you remember as a guess: list first. Omit `-m/--model` entirely unless the user asked
|
|
72
|
+
for a specific model — the default is chosen for general use.
|
|
73
|
+
|
|
74
|
+
## Footguns
|
|
75
|
+
|
|
76
|
+
These are the mistakes that cost money or silently produce the wrong thing.
|
|
77
|
+
|
|
78
|
+
- **Reference frames belong in a flag, never in the prompt.** Use `--start-image
|
|
79
|
+
./frame.png` and `--end-image ./last.png` for image-to-video and first/last-frame
|
|
80
|
+
video. A path or URL written into the prompt text reaches the media model as
|
|
81
|
+
literal words; it cannot fetch anything.
|
|
82
|
+
- **Do not describe a result you have not seen.** Never tell the user whether the
|
|
83
|
+
video has sound, what its resolution is, or how it looks. Most settings came from
|
|
84
|
+
the model's own defaults, not from you.
|
|
85
|
+
- **Do not build a polling loop.** Video generation takes minutes and `glbgpt video`
|
|
86
|
+
blocks on purpose until the file is saved. Reach for `--detach` only when you
|
|
87
|
+
deliberately want several generations running at once, then collect them with
|
|
88
|
+
`glbgpt task wait <id>` and `glbgpt task download <id>`.
|
|
89
|
+
- **Never retry a failed generation automatically.** A genuine failure is not charged,
|
|
90
|
+
but a generation that timed out or was interrupted may still be running on the server
|
|
91
|
+
and will be charged — retrying pays twice for the same thing. Report the failure and
|
|
92
|
+
let the user decide.
|
|
93
|
+
- **Ask before batches.** More than two or three generations — especially videos — is
|
|
94
|
+
real money. Confirm the plan with the user first.
|
|
95
|
+
- **Set only the parameters the user asked for.** Every flag you leave out falls back
|
|
96
|
+
to a default tuned for that model; invented values make results worse and can cost
|
|
97
|
+
more.
|
|
98
|
+
|
|
99
|
+
## Common jobs
|
|
100
|
+
|
|
101
|
+
Ready-made command lines for still-to-video and first/last-frame video:
|
|
102
|
+
[references/recipes.md](references/recipes.md).
|
|
103
|
+
|
|
104
|
+
## When something fails
|
|
105
|
+
|
|
106
|
+
Read the error text — the CLI says what went wrong (not signed in, not enough
|
|
107
|
+
credits, a parameter the chosen model does not support). Fix the cause or report it
|
|
108
|
+
to the user; never retry blindly. Common failures and what they mean:
|
|
109
|
+
[references/troubleshooting.md](references/troubleshooting.md).
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Recipes
|
|
2
|
+
|
|
3
|
+
Intent → command. Check `glbgpt model list video` for what is available before
|
|
4
|
+
picking a model; these recipes deliberately leave `-m` off so the default applies.
|
|
5
|
+
|
|
6
|
+
## Video
|
|
7
|
+
|
|
8
|
+
**Text to video**
|
|
9
|
+
```bash
|
|
10
|
+
glbgpt video "<scene>, slow camera move" --ar 16:9
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
**Vertical clip for social**
|
|
14
|
+
```bash
|
|
15
|
+
glbgpt video "<scene>" --ar 9:16
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Animate a still image**
|
|
19
|
+
```bash
|
|
20
|
+
glbgpt video "<how it should move>" --start-image ./frame.png
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Interpolate between two frames**
|
|
24
|
+
```bash
|
|
25
|
+
glbgpt video "<transition>" --start-image ./first.png --end-image ./last.png
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**Length** — only when the user asks:
|
|
29
|
+
```bash
|
|
30
|
+
glbgpt video "<scene>" --duration 8
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Sound** — only on a model whose `glbgpt model show <model>` lists audio support; add
|
|
34
|
+
`--audio` (or `--no-audio`) together with `-m <that-model>`.
|
|
35
|
+
|
|
36
|
+
## Pricing a job first
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
glbgpt video "<scene>" --estimate # prints the price, generates nothing
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Several at once
|
|
43
|
+
|
|
44
|
+
Only when the user has agreed to the batch:
|
|
45
|
+
```bash
|
|
46
|
+
glbgpt video "<a>" --detach # prints a task id immediately
|
|
47
|
+
glbgpt video "<b>" --detach
|
|
48
|
+
glbgpt task list # ids and status
|
|
49
|
+
glbgpt task download <id> # fetch a finished result
|
|
50
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
<!-- shared:troubleshooting-common -->
|
|
4
|
+
<!-- shared:login -->
|
|
5
|
+
## "Not signed in"
|
|
6
|
+
|
|
7
|
+
The user must run `glbgpt login` themselves — it opens a browser. On a headless box
|
|
8
|
+
or over SSH, `glbgpt login --code` prints a URL instead: the user opens it on any
|
|
9
|
+
machine with a browser, authorizes there, and pastes the code the page shows back
|
|
10
|
+
into the terminal. Do not
|
|
11
|
+
attempt to authenticate for them.
|
|
12
|
+
<!-- /shared:login -->
|
|
13
|
+
|
|
14
|
+
## Not enough credits, or a plan restriction
|
|
15
|
+
|
|
16
|
+
The command reports a payment problem instead of generating. Show the user
|
|
17
|
+
`glbgpt account` (balance and membership) and stop — do not retry, and do not try a
|
|
18
|
+
different model hoping it is cheaper unless the user asks.
|
|
19
|
+
|
|
20
|
+
## "Unknown model"
|
|
21
|
+
|
|
22
|
+
The catalog is server-driven and the name you used no longer exists (or never did).
|
|
23
|
+
Run `glbgpt model list image` or `glbgpt model list video` and use a name it prints.
|
|
24
|
+
|
|
25
|
+
## A parameter is rejected
|
|
26
|
+
|
|
27
|
+
Support differs per model — aspect ratios, resolutions, durations, audio and
|
|
28
|
+
reference-image behaviour are all per-model. Run `glbgpt model show <model>` and use a
|
|
29
|
+
value it lists, or drop the flag entirely so the model's default applies.
|
|
30
|
+
|
|
31
|
+
## The generation failed after submitting
|
|
32
|
+
|
|
33
|
+
A genuine failure is not charged — the CLI says so when it reports one. Report the
|
|
34
|
+
failure and its reason to the user and let them decide what to do; never retry
|
|
35
|
+
automatically, because a task that timed out or was interrupted may still be running
|
|
36
|
+
and would then be charged again. `glbgpt task show <id>` gives the status and reason
|
|
37
|
+
for a specific task, and `glbgpt task list` shows recent ones.
|
|
38
|
+
|
|
39
|
+
## The command seems to hang
|
|
40
|
+
|
|
41
|
+
Video generation takes minutes and the command blocks on purpose. Wait for it. If the
|
|
42
|
+
process was interrupted, the task keeps running on the server: `glbgpt task list`
|
|
43
|
+
finds it, `glbgpt task download <id>` fetches the result once it is ready.
|
|
44
|
+
|
|
45
|
+
## The file is not where you expected
|
|
46
|
+
|
|
47
|
+
Results are saved under `./glbgpt-output/` relative to the working directory unless
|
|
48
|
+
`-o <dir>` was passed. The command prints the absolute path when it finishes.
|
|
49
|
+
<!-- /shared:troubleshooting-common -->
|