Skip to content
Back to search

genmedia-cli

Agent-first CLI for fal.ai — search, run, and manage 1000+ generative AI models

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/fal-ai-community/genmedia-cli with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/fal-ai-community/genmedia-cli'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/fal-ai-community--genmedia-cli/badge.svg)](/listings/fal-ai-community--genmedia-cli)

HTML

<a href="/listings/fal-ai-community--genmedia-cli"><img src="/api/listings/fal-ai-community--genmedia-cli/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

These steps run a script from the network that findsafeskills does not scan.

For Linux and macOS:

curl https://genmedia.sh/install -fsS | bash

For Windows:

irm https://genmedia.sh/install.ps1 | iex

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 367 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # genmedia
  2. Agent-first CLI for fal.ai — search, run, and manage 1200+ model endpoints.
  3. Works great for humans in a terminal and equally well for AI agents via shell commands. In a TTY, commands display a lightweight pretty view; when piped or called with `--json`, they emit structured JSON. No MCP required.
  4. ## Install
  5. For Linux and macOS:
  6. ```bash
  7. curl https://genmedia.sh/install -fsS | bash
  8. ```
  9. For Windows:
  10. ```bash
  11. irm https://genmedia.sh/install.ps1 | iex
  12. ```
  13. ## Setup
  14. ```bash
  15. genmedia setup
  16. ```
  17. Interactive wizard that configures:
  18. - **API key** — saved encrypted to your local config (or skip and use `FAL_KEY` in your environment)
  19. - **Auto-load `.env`** — automatically load `FAL_KEY` and related vars from a project `.env` file
  20. - **Output mode** — `auto` (pretty in TTY, JSON when piped), `json` (always structured), or `standard` (always human-readable)
  21. - **Automatic updates** — check for new versions in the background and swap in on next launch (default: on; set `GENMEDIA_NO_UPDATE=1` to disable)
  22. Get your API key at [fal.ai/dashboard/keys](https://fal.ai/dashboard/keys).
  23. To skip the wizard, set the key in your environment:
  24. ```bash
  25. export FAL_KEY=your_fal_api_key
  26. ```
  27. ### Non-interactive setup (agents / CI)
  28. ```bash
  29. genmedia setup --non-interactive --api-key "$FAL_KEY"
  30. genmedia setup --non-interactive --output-format json --no-auto-load-env --auto-update
  31. ```
  32. Every flag is optional — fields you don't pass keep their current values, so repeated invocations are idempotent.
  33. | Flag | Description |
  34. |---|---|
  35. | `--non-interactive`, `-y` | Skip all prompts. Required when there is no TTY. |
  36. | `--api-key <key>` | API key to save. Pass `""` to clear the saved key. |
  37. | `--no-save-key` | With `--api-key`, don't persist the key to `config.json` (use `FAL_KEY` at runtime instead). |
  38. | `--output-format <auto\|json\|standard>` | Default output mode. |
  39. | `--auto-load-env` / `--no-auto-load-env` | Toggle auto-loading `FAL_KEY` from a project `.env`. |
  40. | `--auto-update` / `--no-auto-update` | Toggle background update checks. |
  41. ## Commands
  42. ### `models` — Search and inspect models
  43. ```bash
  44. genmedia models "text to video"
  45. genmedia models "flux" --category text-to-image
  46. genmedia models --category text-to-speech --limit 5
  47. genmedia models --status all # include deprecated
  48. genmedia models --endpoint_id fal-ai/flux/dev,fal-ai/flux/schnell # fetch specific models
  49. genmedia models --endpoint_id fal-ai/flux/dev --expand openapi-3.0
  50. genmedia models "flux" --cursor <token> # next page
  51. ```
  52. | Option | Description |
  53. |---|---|
  54. | `--category` | Filter by category (e.g. `text-to-image`, `image-to-video`, `text-to-speech`) |
  55. | `--status` | `active` (default), `deprecated`, or `all` |
  56. | `--limit` | Max results (default: 20) |
  57. | `--cursor` | Pagination cursor from a previous response |
  58. | `--endpoint_id` | Fetch specific model(s) by ID — comma-separated or repeated |
  59. | `--expand` | Expand additional fields: `openapi-3.0`, `enterprise_status` |
  60. ### `schema` — Inspect model inputs/outputs
  61. ```bash
  62. genmedia schema fal-ai/flux/dev
  63. genmedia schema fal-ai/flux/dev --format openapi
  64. ```
  65. | Option | Description |
  66. |---|---|
  67. | `--format` | `compact` (default) or `openapi` — returns full OpenAPI JSON |
  68. ### `run` — Run a model
  69. ```bash
  70. genmedia run fal-ai/flux/dev --prompt "a cat on the moon"
  71. genmedia run fal-ai/flux/dev --prompt "a cat" --num_images 2
  72. genmedia run fal-ai/flux/dev --prompt "a cat" --logs
  73. genmedia run fal-ai/veo3.1 --prompt "a dog running" --async
  74. genmedia run fal-ai/flux/dev --prompt "a cat" --download # save to cwd with source file names
  75. genmedia run fal-ai/flux/dev --prompt "a cat" --num_images 3 --download "./out/{index}.{ext}"
  76. genmedia run fal-ai/flux/dev --help # introspect model inputs as CLI help
  77. ```
  78. Any model input parameter can be passed as a `--flag value` pair. Run `genmedia run <endpoint_id> --help` to see a model's accepted parameters rendered as CLI flags, or `genmedia schema <endpoint_id>` for the same info as structured JSON.
  79. | Option | Description |
  80. |---|---|
  81. | `--<param>` | Any model input parameter (e.g. `--prompt`, `--num_images`) |
  82. | `--logs` | Stream logs while the model runs (pretty terminal mode only) |
  83. | `--async` | Submit to queue without waiting — returns a `request_id` |
  84. | `--download [template]` | Download every media URL in the result. Optional value is a path or filename template with `{index}`, `{name}`, `{ext}`, `{request_id}` placeholders. Omitted → cwd with source file names. Trailing `/` or an existing directory → dir + source file names. Plain filename with multiple outputs → `_1`, `_2` suffixes on collision. Downloaded paths appear in JSON output under `downloaded_files`. |
  85. ### `status` — Check an async job
  86. ```bash
  87. genmedia status fal-ai/veo3.1 <request_id>
  88. genmedia status fal-ai/veo3.1 <request_id> --result
  89. genmedia status fal-ai/veo3.1 <request_id> --logs
  90. genmedia status fal-ai/veo3.1 <request_id> --cancel
  91. genmedia status fal-ai/veo3.1 <request_id> --download ./out/ # implies --result
  92. ```
  93. | Option | Description |
  94. |---|---|
  95. | `--result` | Fetch the completed result |
  96. | `--logs` | Show logs verbosely |
  97. | `--cancel` | Cancel the queued job |
  98. | `--download [template]` | Same as on `run`. Implies `--result` — fetches the completed result and writes media files to disk. |
  99. ### `upload` — Upload files to fal.ai CDN
  100. ```bash
  101. genmedia upload ./photo.jpg
  102. genmedia upload https://example.com/image.png
  103. ```
  104. Accepts a local file path or a remote URL. Returns a CDN URL you can use as model input.
  105. ### `pricing` — Check model pricing
  106. ```bash
  107. genmedia pricing fal-ai/flux/dev
  108. ```
  109. ### `docs` — Search documentation
  110. ```bash
  111. genmedia docs "how to use LoRA"
  112. genmedia docs "webhook callbacks"
  113. ```
  114. Searches fal.ai documentation, guides, and API references.
  115. ### `version` — Show version
  116. ```bash
  117. genmedia version
  118. ```
  119. Shows the current version and flags any known update (populated by the background checker).
  120. ### `gallery` — Browse a per-session HTML preview of generated assets
  121. Every successful `genmedia run` (and `genmedia status --download`) records its outputs into a per-session, self-contained static HTML page under `~/.genmedia/gallery/sessions/<session_id>/index.html`. The page aggregates every image / video / audio / 3D asset produced inside one agent session — across many runs and many endpoints — into a filterable grid with a lightbox view. No server, no dependencies, opens straight from `file://`.
  122. ```bash
  123. genmedia gallery # pretty TTY: prints `→ Open: <url>`. JSON / non-TTY: full info payload.
  124. genmedia gallery --json # structured info payload, agent-safe
  125. genmedia gallery info # full info payload, even from a TTY (devs)
  126. genmedia gallery open # open the all-sessions index in the default browser
  127. genmedia gallery open current # open the current session
  128. genmedia gallery open latest # open the most-recently recorded session (works across shells)
  129. genmedia gallery open <session_id> # open a specific session
  130. genmedia gallery open latest --print # resolve path/url without launching the browser
  131. genmedia gallery list # list every recorded session (newest first, JSON-friendly)
  132. genmedia gallery list --limit 10 # cap the list (default: 50)
  133. genmedia gallery rename --label "demo run" # rename the current session (cosmetic — id stays the same)
  134. genmedia gallery rename latest --label "x" # rename the most-recent session
  135. genmedia gallery rename <session_id> --clear # remove a session's label
  136. genmedia gallery clear --yes # delete the current session (--yes is required)
  137. genmedia gallery clear latest --yes # delete the most-recently recorded session
  138. genmedia gallery clear <session_id> --yes # delete a specific session
  139. genmedia gallery clear all --yes # delete every recorded session
  140. ```
  141. The page auto-refreshes via a tiny client-side poll on `./data.json` while a session is "live" (updated in the last 5 min), so new runs land in the open tab without a manual reload.
  142. > `gallery clear` always requires `--yes` and never prompts interactively — same shape for agents and humans. `GENMEDIA_NO_GALLERY=1` only disables *recording*; `list` / `open` / `clear` still work so you can inspect or purge prior galleries.
  143. The `run` and `status --download` responses include the gallery info too:
  144. ```json
  145. {
  146. "status": "completed",
  147. "endpoint_id": "fal-ai/flux/dev",
  148. "request_id": "…",
  149. "gallery": {
  150. "session_id": "a1b2c3d4e5f6",
  151. "path": "/Users/you/.genmedia/gallery/sessions/a1b2c3d4e5f6/index.html",
  152. "url": "file:///Users/you/.genmedia/gallery/sessions/a1b2c3d4e5f6/index.html"
  153. }
  154. }
  155. ```
  156. **Session detection (agent-agnostic).** The session id is resolved in this order, so the gallery groups outputs correctly across Claude Code, Codex, Cursor, Amp, Gemini, Aider, and anything else:
  157. 1. `GENMEDIA_SESSION_ID` — explicit override (e.g. set from a hook script).
  158. 2. Per-agent env vars: `CODEX_THREAD_ID`, `CLAUDE_SESSION_ID`, `AMP_THREAD_ID`, `CURSOR_TRACE_ID`.
  159. 3. **Process-tree walk** — looks for a known agent binary (claude, codex, cursor, amp, gemini, copilot, opencode, aider, cline) in the ancestor chain via `ps -e`. Critical for Claude Code, whose `Bash` tool spawns a fresh shell per call: `process.ppid` changes every invocation, but the Claude process itself lives for the whole conversation and becomes the stable anchor.
  160. 4. Terminal-level: `TERM_SESSION_ID` / `ITERM_SESSION_ID` / `WT_SESSION` / `TMUX_PANE`.
  161. 5. Fallback: a deterministic hash of `<agent>:<ppid>`.
  162. | Env var | Description |
  163. |---|---|
  164. | `GENMEDIA_NO_GALLERY=1` | Disable gallery recording and rendering entirely. |
  165. | `GENMEDIA_SESSION_ID=<anchor>` | Force a specific session id (any string; it's hashed into the on-disk slug). |
  166. | `GENMEDIA_GALLERY_RETENTION_DAYS=<n>` | Prune session directories older than `n` days (default: 60). |
  167. ### Certificate security update (0.7.1)
  168. The 0.7.1 source prepares replacements for all five compiled platforms after the
  169. eMudhra certificate incident. Bun's default roots still require remediation.
  170. The CLI supplies an exclusive clean CA store to each HTTP client, including
  171. the fal SDK, analytics, downloads, and the updater. Certificate verification
  172. stays enabled. Explicit private CA files remain supported through
  173. `NODE_EXTRA_CA_CERTS`, `SSL_CERT_FILE`, and per-request TLS configuration.
  174. The CLI removes affected public roots from those files before use.
  175. Source builds require the pinned Bun 1.4.3. Bun 1.3.11 does not enforce the
  176. same CA override, so the CLI refuses network access on that older runtime.
  177. The public CA list comes from the compiled Bun runtime and is filtered by
  178. fingerprint before each client uses it. No public CA snapshot is vendored.
  179. Missing or invalid extra CA files produce one warning and fall back to the
  180. filtered public store; explicit per-request CA settings still fail closed.
  181. ```bash
  182. CA_FILE=$(bun scripts/write-ca-bundle.ts)
  183. bun install --frozen-lockfile --cafile "$CA_FILE"
  184. bun run build
  185. bun scripts/check-tls.ts
  186. ```
  187. Release jobs build and run the certificate probe with each platform's native
  188. Bun executable. They use the already-installed executable for compilation,
  189. which avoids a separate compiler-runtime download.
  190. After 0.7.1 is published, explicitly replace older installations. The command
  191. below runs inside the installed binary: **0.7.0's updater still uses its old
  192. trust store**. It cannot establish a secure upgrade path during this incident;
  193. its downloaded checksum uses that same connection and is not independent proof.
  194. Prefer a replacement downloaded with a patched acquisition tool. Compare its
  195. SHA-256 with a value obtained independently from the publisher before running
  196. it. The release must publish those platform hashes through a separate trusted
  197. channel/site as well as the GitHub checksums file. Candidate hashes from earlier
  198. builds are invalid after source changes.
  199. If using the old updater, understand that limitation:
  200. ```bash
  201. genmedia update --force
  202. genmedia version
  203. ```
  204. Automatic updates do not cover clients with `GENMEDIA_NO_UPDATE=1`, disabled
  205. `autoUpdate`, or non-interactive use. Replace those installations explicitly.
  206. Before acquisition or reinstallation, update the native certificate store used
  207. by curl, wget, or PowerShell. A patched CLI does not correct those separate
  208. installer clients or the initial request that downloads an installer script.
  209. Keep private CA settings and TLS verification enabled.
  210. The separate Next.js server selects Node 22 and removes affected roots at
  211. startup, including on a provider patch that predates the fixed Node release.
  212. Deployment verification must still record the actual provider runtime and
  213. test both affected chain families from that deployed server.
  214. ### `update` — Check for and apply updates
  215. ```bash
  216. genmedia update # download and swap in the latest release
  217. genmedia update --check # only check, don't download
  218. genmedia update --force # reinstall even if already on the latest
  219. ```
  220. | Option | Description |
  221. |---|---|
  222. | `--check` | Only check for a newer version; don't download |
  223. | `--force` | Re-download and reinstall even if already on the latest |
  224. When automatic updates are enabled (default), every TTY invocation may trigger a rate-limited (1/hour) background check that stages the next release. The next `genmedia` launch atomically swaps it in. Set `GENMEDIA_NO_UPDATE=1` to disable all background checks; the manual `update` command still works.
  225. ## Analytics
  226. Released binaries report anonymous usage analytics (PostHog) to help us prioritize improvements. Each install gets a random UUID stored in `~/.genmedia/config.json`; we never collect command arguments, prompts, file paths, API keys, or error messages.
  227. **Events:**
  228. - `command_run` — top-level command name, success/failure, duration
  229. - `cli_first_run` — fired once when the install is first seen
  230. - `setup_completed` — `setup` finished successfully
  231. - `model_run` — `run` finished, with the model endpoint, success/failure, and duration (no inputs or outputs)
  232. - `skills_searched` — `skills list [query]` — the query string and result count
  233. - `skills_installed` / `skills_updated` / `skills_removed` — skill name and status
  234. - `update_applied` — self-update succeeded, with from/to versions
  235. **Caller context:** every event also carries the detected calling agent (e.g. `claude-code`, `codex`, `cursor-agent`, `gemini-cli`, `aider`), the host terminal (`vscode`, `iterm`, `warp`, …), CI flags (`ci`, `ci_provider`, `github_actions`), TTY status, and a per-process `invocation_id` so multiple events from the same CLI run can be stitched together. Detection is env-var based and never collects user content. Set `GENMEDIA_USER_AGENT=<name>` to override or self-attribute when running inside an agent we don't yet detect.
  236. **Opt out:**
  237. ```bash
  238. export GENMEDIA_NO_ANALYTICS=1 # per-shell
  239. # or persist in config:
  240. genmedia setup # (toggle is currently file-only — set "analyticsOptOut": true)
  241. ```
  242. Builds from source without a `POSTHOG_KEY` environment variable (the open-source default) report nothing — the analytics module no-ops at runtime.
  243. ### `init` — Install the default genmedia skill bundle
  244. ```bash
  245. genmedia init
  246. genmedia init --force # overwrite existing files
  247. ```
  248. Installs the default genmedia skill bundle:
  249. | Skill | Purpose |
  250. |---|---|
  251. | `genmedia` | Guided workflow for model discovery, schema inspection, and execution |
  252. The bundle is installed into `.agents/skills/` if the project has a `.agents/` directory, otherwise into `.claude/skills/`. If neither directory exists, the command exits with a message asking you to create one and try again.
  253. After running `init`, compatible agent sessions in that project can use the installed skills without needing to call `--help`. Commit the installed skills directory so teammates and other agents get the same context.
  254. ### `skills` — Manage installed agent skills
  255. ```bash
  256. genmedia skills list # list everything in the registry
  257. genmedia skills list image # full-text search name + description
  258. genmedia skills install genmedia
  259. genmedia skills update
  260. genmedia skills remove genmedia
  261. ```
  262. Installs, updates, lists, and removes agent skills from the genmedia registry. `skills list <query>` runs full-text search via the hosted index API (`GENMEDIA_SKILLS_API_URL`, default `https://genmedia.sh/skills`); the no-query form fetches `index.json` directly from the registry.
  263. ## Agent-first design
  264. All commands output structured JSON when piped or called with `--json`:
  265. ```bash
  266. genmedia run fal-ai/flux/dev --prompt "a cat" --json
  267. genmedia models "text to video" --json | jq '.models[]'
  268. ```
  269. To get a machine-readable description of all commands for use in a system prompt or agent context:
  270. ```bash
  271. genmedia --help --json
  272. ```
  273. This returns a full schema of every command, its arguments, and options. Agents that don't support MCP (Codex, Gemini CLI, etc.) can use fal.ai through `genmedia` via standard shell commands.
  274. ## License
  275. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.