@genfeedai/cli 0.6.0 → 0.7.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 +169 -36
- package/dist/index.js +85472 -30129
- package/package.json +21 -18
package/README.md
CHANGED
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
> What image | video do you want to create? _
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
The Genfeed terminal content workspace. Use the interactive TUI for creative work and slash
|
|
17
|
+
commands, or the deterministic command tree for scripts and external agents.
|
|
17
18
|
|
|
18
19
|
## Last Verified
|
|
19
20
|
|
|
@@ -49,8 +50,8 @@ bun run --cwd packages/cli type-check
|
|
|
49
50
|
|
|
50
51
|
## Requirements
|
|
51
52
|
|
|
52
|
-
- Node.js
|
|
53
|
-
- A [Genfeed.ai](https://genfeed.ai) account
|
|
53
|
+
- Node.js 24+
|
|
54
|
+
- A [Genfeed.ai](https://genfeed.ai) account (existing users can log in; new users can sign up from the CLI)
|
|
54
55
|
|
|
55
56
|
## Installation
|
|
56
57
|
|
|
@@ -68,39 +69,65 @@ npm install -g @genfeedai/cli
|
|
|
68
69
|
|
|
69
70
|
## Quick Start
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
Open the interactive workspace:
|
|
72
73
|
|
|
73
74
|
```bash
|
|
74
|
-
|
|
75
|
+
gf
|
|
75
76
|
```
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
Inside it, normal text talks to the Genfeed agent and `/` commands perform direct actions:
|
|
78
79
|
|
|
79
|
-
```
|
|
80
|
-
|
|
80
|
+
```text
|
|
81
|
+
› Build a launch campaign for our new product
|
|
82
|
+
› /image cinematic product launch poster
|
|
83
|
+
› /workflow run weekly-content
|
|
84
|
+
› /credits buy 5000
|
|
81
85
|
```
|
|
82
86
|
|
|
83
|
-
|
|
87
|
+
The equivalent non-interactive commands are shell commands without a leading slash:
|
|
84
88
|
|
|
85
89
|
```bash
|
|
86
|
-
|
|
90
|
+
gf gen image "A futuristic cityscape at sunset"
|
|
91
|
+
gf gen video "A drone flying over mountains"
|
|
87
92
|
```
|
|
88
93
|
|
|
89
94
|
## Authentication
|
|
90
95
|
|
|
91
|
-
|
|
96
|
+
`genfeed` and `gf` share one command tree. The one-command path is browser login. No secret is pasted into chat:
|
|
92
97
|
|
|
93
98
|
```bash
|
|
94
99
|
genfeed login
|
|
95
100
|
```
|
|
96
101
|
|
|
97
|
-
|
|
102
|
+
That opens the app OAuth page (`/oauth/cli`), listens on localhost, checks `state`, and exchanges the code at `POST /auth/desktop/exchange` (PKCE S256, the same desktop exchange the web app already uses). The API key is written to `~/.gf/config.json`. `~/.gf` is mode `0700` and `config.json` is mode `0600`. There is no second credential file.
|
|
103
|
+
|
|
104
|
+
Show whether you are logged in, the stored organization, and the scopes of that key (scopes come from `GET /auth/whoami`):
|
|
98
105
|
|
|
99
106
|
```bash
|
|
100
|
-
genfeed
|
|
107
|
+
genfeed auth status
|
|
101
108
|
```
|
|
102
109
|
|
|
103
|
-
|
|
110
|
+
Log out. Both commands remove the stored API key and the active brand. A `GENFEED_API_KEY` in the environment is a process override and is not cleared:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
genfeed auth logout
|
|
114
|
+
genfeed logout
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Create an account in the same browser flow:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
gf signup
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
CI and other headless runs skip login. `GENFEED_API_KEY` overrides the key in `~/.gf/config.json` for that process, so the secret stays in the environment instead of shell history:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
export GENFEED_API_KEY=gf_live_xxx
|
|
127
|
+
genfeed whoami
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
`--key` and `--interactive` remain for machines without a browser. Prefer `GENFEED_API_KEY` in CI. A key passed on the command line is stored in shell history.
|
|
104
131
|
|
|
105
132
|
```bash
|
|
106
133
|
genfeed login --interactive
|
|
@@ -145,11 +172,12 @@ List, create, rotate, and revoke API keys for headless and MCP access:
|
|
|
145
172
|
```bash
|
|
146
173
|
genfeed keys list
|
|
147
174
|
genfeed keys create -n "CI publisher" -p content
|
|
175
|
+
genfeed keys create -n "MCP agent" -p mcp
|
|
148
176
|
genfeed keys rotate <id>
|
|
149
177
|
genfeed keys revoke <id>
|
|
150
178
|
```
|
|
151
179
|
|
|
152
|
-
`create` takes a scope preset via `-p` (`mcp`, `read`, `content`, `full`) or an explicit `--scopes` list, plus optional `--expires-at`, `--rate-limit`, and `--allow-ip`. The secret is printed once, on creation and on rotation.
|
|
180
|
+
`create` takes a scope preset via `-p` (`mcp`, `read`, `content`, `full`) or an explicit `--scopes` list, plus optional `--expires-at`, `--rate-limit`, and `--allow-ip`. The secret is printed once, on creation and on rotation. `genfeed keys create -p mcp` still works after `genfeed login`.
|
|
153
181
|
|
|
154
182
|
### CLI Configuration
|
|
155
183
|
|
|
@@ -184,58 +212,95 @@ Show the current organization:
|
|
|
184
212
|
gf organizations current
|
|
185
213
|
```
|
|
186
214
|
|
|
187
|
-
###
|
|
215
|
+
### Brands
|
|
188
216
|
|
|
189
217
|
List all brands:
|
|
190
218
|
|
|
191
219
|
```bash
|
|
192
|
-
|
|
220
|
+
gf brand list
|
|
193
221
|
```
|
|
194
222
|
|
|
195
223
|
Select active brand:
|
|
196
224
|
|
|
197
225
|
```bash
|
|
198
|
-
|
|
226
|
+
gf brand use <id-or-slug-or-label>
|
|
199
227
|
```
|
|
200
228
|
|
|
201
229
|
Show current brand:
|
|
202
230
|
|
|
203
231
|
```bash
|
|
204
|
-
|
|
232
|
+
gf brand current
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
The published `brands` spelling remains an alias, and `brand use` has an interactive picker when
|
|
236
|
+
the reference is omitted.
|
|
237
|
+
|
|
238
|
+
### Balance and credit checkout
|
|
239
|
+
|
|
240
|
+
`balance` is the fast read. `credits` owns credit-related actions:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
gf balance
|
|
244
|
+
gf credits packs
|
|
245
|
+
gf credits buy 5000
|
|
246
|
+
gf credits history --limit 20
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
`gf credits buy` asks the API for a server-priced Stripe Checkout session and opens the hosted
|
|
250
|
+
checkout page. The CLI never accepts card data or a caller-supplied Stripe price ID. Use
|
|
251
|
+
`--no-open --json` to return the secure URL for a remote/headless session. Cryptocurrency checkout
|
|
252
|
+
is not advertised as supported; it remains a separate payments/compliance decision rather than a
|
|
253
|
+
CLI-specific payment path.
|
|
254
|
+
|
|
255
|
+
### Workflows
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
gf workflow list
|
|
259
|
+
gf workflow run weekly-content --inputs '{"topic":"launch"}'
|
|
260
|
+
gf workflow runs --status completed
|
|
261
|
+
gf workflow status <execution-id>
|
|
205
262
|
```
|
|
206
263
|
|
|
264
|
+
`workflow run` accepts an exact workflow ID, key, or label. Ambiguous labels are rejected before a
|
|
265
|
+
run is created.
|
|
266
|
+
|
|
207
267
|
### Image Generation
|
|
208
268
|
|
|
209
269
|
Basic generation:
|
|
210
270
|
|
|
211
271
|
```bash
|
|
212
|
-
|
|
272
|
+
gf gen image "Your prompt here"
|
|
213
273
|
```
|
|
214
274
|
|
|
215
275
|
With options:
|
|
216
276
|
|
|
217
277
|
```bash
|
|
218
|
-
|
|
278
|
+
gf gen image "Your prompt" --model imagen-4 --width 1920 --height 1080 --output ./image.jpg
|
|
219
279
|
```
|
|
220
280
|
|
|
221
281
|
Don't wait for completion:
|
|
222
282
|
|
|
223
283
|
```bash
|
|
224
|
-
|
|
284
|
+
gf gen image "Your prompt" --no-wait
|
|
225
285
|
```
|
|
226
286
|
|
|
287
|
+
The image command exposes the generation API's creative controls, including references, output
|
|
288
|
+
count, seed, style, format, mood, camera, lens, scene, lighting, negative prompt, blacklist, tags,
|
|
289
|
+
automatic model routing and priority, brand/fidelity modes, and prompt templates. Run
|
|
290
|
+
`gf gen image --help` for the complete list.
|
|
291
|
+
|
|
227
292
|
### Video Generation
|
|
228
293
|
|
|
229
294
|
Basic generation:
|
|
230
295
|
|
|
231
296
|
```bash
|
|
232
|
-
|
|
297
|
+
gf gen video "Your prompt here"
|
|
233
298
|
```
|
|
234
299
|
|
|
235
300
|
With options:
|
|
236
301
|
|
|
237
302
|
```bash
|
|
238
|
-
|
|
303
|
+
gf gen video "Your prompt" --model google-veo-3 --duration 10 --resolution 1080p --output ./video.mp4
|
|
239
304
|
```
|
|
240
305
|
|
|
241
306
|
### Article Generation
|
|
@@ -285,6 +350,18 @@ Check article status:
|
|
|
285
350
|
genfeed status <id> --type article
|
|
286
351
|
```
|
|
287
352
|
|
|
353
|
+
### Assets and jobs
|
|
354
|
+
|
|
355
|
+
```bash
|
|
356
|
+
gf asset list --type image --limit 20
|
|
357
|
+
gf asset show <id>
|
|
358
|
+
gf asset download <id> --output ./asset.jpg
|
|
359
|
+
gf job status <id> --type image
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
`library` remains an alias for `asset`; the singular namespace keeps shell completion and nested
|
|
363
|
+
actions predictable.
|
|
364
|
+
|
|
288
365
|
### Agent Chat
|
|
289
366
|
|
|
290
367
|
Start the interactive Genfeed agent shell:
|
|
@@ -311,13 +388,13 @@ Answer a pending input request on an existing thread:
|
|
|
311
388
|
genfeed threads respond <thread-id> "Use the more technical angle" --json
|
|
312
389
|
```
|
|
313
390
|
|
|
314
|
-
###
|
|
391
|
+
### Turbo
|
|
315
392
|
|
|
316
393
|
```bash
|
|
317
|
-
genfeed
|
|
318
|
-
genfeed
|
|
319
|
-
genfeed
|
|
320
|
-
genfeed
|
|
394
|
+
genfeed turbo create -n 5 -p twitter,linkedin --topics ai,product --style professional
|
|
395
|
+
genfeed turbo list
|
|
396
|
+
genfeed turbo show <run-id>
|
|
397
|
+
genfeed turbo approve <run-id>
|
|
321
398
|
```
|
|
322
399
|
|
|
323
400
|
### Templates
|
|
@@ -331,14 +408,59 @@ genfeed template use <template-id> --variables '{"topic":"AI workflows"}'
|
|
|
331
408
|
### Scheduling and Insights
|
|
332
409
|
|
|
333
410
|
```bash
|
|
334
|
-
genfeed schedule
|
|
411
|
+
genfeed schedule optimal --platform twitter
|
|
335
412
|
genfeed insights
|
|
336
413
|
genfeed insights times --platform twitter
|
|
337
414
|
genfeed performance weekly
|
|
338
|
-
genfeed credits
|
|
415
|
+
genfeed credits usage
|
|
339
416
|
genfeed posts list --platform twitter --status published
|
|
340
417
|
```
|
|
341
418
|
|
|
419
|
+
### Admin (super admins)
|
|
420
|
+
|
|
421
|
+
One-off admin work over the API, with no deploy and no direct database access.
|
|
422
|
+
`genfeed admin login` signs you in as a super admin in your browser and stores a
|
|
423
|
+
revocable session (no API key is created). Each call swaps that session for a
|
|
424
|
+
short-lived token. Admin routes also require your IP in the API's
|
|
425
|
+
`ADMIN_ALLOWED_IPS`.
|
|
426
|
+
|
|
427
|
+
```bash
|
|
428
|
+
genfeed admin login
|
|
429
|
+
genfeed admin status
|
|
430
|
+
genfeed admin notifications [--expect users posts] # Discord bot ready? which operator channels have no ID (IDs are never shown)
|
|
431
|
+
genfeed admin pricing sync [--provider fal] # queue the provider price import now
|
|
432
|
+
genfeed admin pricing report --attention # models whose provider price needs review
|
|
433
|
+
genfeed admin pricing approve <model> # preview the pending rates
|
|
434
|
+
genfeed admin pricing approve <model> --yes # approve them
|
|
435
|
+
genfeed admin seed articles --owner-email you@x.com --brand-slug genfeed # dry run
|
|
436
|
+
genfeed admin seed articles --owner-email you@x.com --brand-slug genfeed --yes
|
|
437
|
+
genfeed admin seed templates [--yes] # platform (system) templates
|
|
438
|
+
genfeed admin seed workflows --brand-id <id> [--yes] # --all-brands for every brand
|
|
439
|
+
genfeed admin brand show # system brand kit
|
|
440
|
+
genfeed admin brand update <revision> --file draft.json --updated-at <iso>
|
|
441
|
+
genfeed admin brand approve <revision> --updated-at <iso>
|
|
442
|
+
genfeed admin marketplace listings # store listings waiting for review
|
|
443
|
+
genfeed admin marketplace approve <listing> # preview; add --yes to publish it
|
|
444
|
+
genfeed admin marketplace reject <listing> --reason "<text>" --yes
|
|
445
|
+
genfeed admin logout # revoke the session
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
The `marketplace` commands call the marketplace API with the same super admin
|
|
449
|
+
token. Its URL is derived from the profile API URL (`api.example.com` becomes
|
|
450
|
+
`api.shop.example.com`); pass `--marketplace-url <url>` to override it.
|
|
451
|
+
|
|
452
|
+
### Local AI bridge for the browser extension
|
|
453
|
+
|
|
454
|
+
```bash
|
|
455
|
+
gf host install # register the native host with Chrome, Chromium, Brave and Edge
|
|
456
|
+
gf host install --extension-id <id> # also allow another extension ID (for example a Chrome Web Store build)
|
|
457
|
+
gf host provider add openai-api --model <model> # optional bring-your-own-key provider (key stays in ~/.gf/host)
|
|
458
|
+
gf host status # where it is registered and which providers it finds (nothing is run)
|
|
459
|
+
gf host uninstall [--purge]
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
The host only relays text actions from the Genfeed extension to your own Claude Code, Codex or Gemini CLI (or a saved API key). It never calls Genfeed and reads no Genfeed credentials. Genfeed cloud stays the default; the extension uses the host only for the fallback provider you choose in its settings.
|
|
463
|
+
|
|
342
464
|
## Options
|
|
343
465
|
|
|
344
466
|
### Global Options
|
|
@@ -387,6 +509,13 @@ articles use the active brand; pass `--brand <id>` to override it.
|
|
|
387
509
|
| `--words <n>` | Target word count, 2500-10000 (`article-x` only) |
|
|
388
510
|
| `--no-header-image` | Skip the header image (`article-x` only) |
|
|
389
511
|
|
|
512
|
+
Image and video generation waits check durable API status before subscribing to live
|
|
513
|
+
updates, then check every two seconds while unfinished. Socket interruptions and
|
|
514
|
+
missed events recover through these reads without starting another generation.
|
|
515
|
+
The existing five-minute image and ten-minute video deadlines include status reads;
|
|
516
|
+
on timeout, use `gf status <id> --type image` (or `video`) to inspect the original job.
|
|
517
|
+
Authentication and access errors stop the wait immediately.
|
|
518
|
+
|
|
390
519
|
## Scripting
|
|
391
520
|
|
|
392
521
|
Use `--json` for machine-readable output:
|
|
@@ -409,8 +538,12 @@ The Genfeed CLI is designed for use by AI agents and automation tools.
|
|
|
409
538
|
|
|
410
539
|
### Non-Interactive Authentication
|
|
411
540
|
|
|
541
|
+
An agent on a machine with a browser runs `genfeed login` and waits for the human to approve. It does not ask for a pasted secret.
|
|
542
|
+
|
|
543
|
+
CI injects the key from a secret store. No login step is required:
|
|
544
|
+
|
|
412
545
|
```bash
|
|
413
|
-
|
|
546
|
+
export GENFEED_API_KEY=gf_live_xxx
|
|
414
547
|
```
|
|
415
548
|
|
|
416
549
|
### JSON Output
|
|
@@ -438,8 +571,8 @@ genfeed status $ID --json
|
|
|
438
571
|
### Agent Usage Example
|
|
439
572
|
|
|
440
573
|
```bash
|
|
441
|
-
# Authenticate
|
|
442
|
-
genfeed login
|
|
574
|
+
# Authenticate in a browser. Do not paste the key into chat.
|
|
575
|
+
genfeed login
|
|
443
576
|
|
|
444
577
|
# Generate an image
|
|
445
578
|
RESULT=$(genfeed generate image "Professional headshot, studio lighting" --json)
|
|
@@ -479,7 +612,7 @@ See the [MCP documentation](https://mcp.genfeed.ai/v1/docs) for details.
|
|
|
479
612
|
|
|
480
613
|
## Configuration
|
|
481
614
|
|
|
482
|
-
Config is stored in `~/.gf/config.json
|
|
615
|
+
Config is stored in `~/.gf/config.json`. The directory is created as mode `0700` and the file as mode `0600`. Existing installs keep this path; the CLI does not also write `~/.genfeed/credentials`.
|
|
483
616
|
|
|
484
617
|
```json
|
|
485
618
|
{
|
|
@@ -506,7 +639,7 @@ Config is stored in `~/.gf/config.json`:
|
|
|
506
639
|
|
|
507
640
|
| Variable | Description |
|
|
508
641
|
|----------|-------------|
|
|
509
|
-
| `GENFEED_API_KEY` | API key |
|
|
642
|
+
| `GENFEED_API_KEY` | CI override. Replaces the API key stored in `~/.gf/config.json` for the current process. Do not put the secret on the command line. |
|
|
510
643
|
| `GENFEED_API_URL` | API base URL |
|
|
511
644
|
| `GENFEED_APP_URL` | Web app URL serving `/oauth/cli` (derived from `GENFEED_API_URL` when unset) |
|
|
512
645
|
| `GENFEED_TOKEN` | Auth token |
|