[Skip to content](https://github.com/fal-ai-community/genmedia-cli#start-of-content)

## Navigation Menu

Toggle navigation

[Homepage](https://github.com/)

[Sign in](https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffal-ai-community%2Fgenmedia-cli)

Appearance settings

- Platform



  - AI CODE CREATION

    - [GitHub CopilotWrite better code with AI](https://github.com/features/copilot)
    - [GitHub Copilot appDirect agents from issue to merge](https://github.com/features/ai/github-app)
    - [MCP RegistryNewIntegrate external tools](https://github.com/mcp)

  - DEVELOPER WORKFLOWS

    - [ActionsAutomate any workflow](https://github.com/features/actions)
    - [CodespacesInstant dev environments](https://github.com/features/codespaces)
    - [IssuesPlan and track work](https://github.com/features/issues)
    - [Code ReviewManage code changes](https://github.com/features/code-review)

  - APPLICATION SECURITY

    - [GitHub Advanced SecurityFind and fix vulnerabilities](https://github.com/security/advanced-security)
    - [Code securitySecure your code as you build](https://github.com/security/advanced-security/code-security)
    - [Secret protectionStop leaks before they start](https://github.com/security/advanced-security/secret-protection)

  - EXPLORE

    - [Why GitHub](https://github.com/why-github)
    - [Documentation](https://docs.github.com/)
    - [Blog](https://github.blog/)
    - [Changelog](https://github.blog/changelog)
    - [Marketplace](https://github.com/marketplace)

[View all features](https://github.com/features)

- Solutions



  - BY COMPANY SIZE

    - [Enterprises](https://github.com/enterprise)
    - [Small and medium teams](https://github.com/team)
    - [Startups](https://github.com/enterprise/startups)
    - [Nonprofits](https://github.com/solutions/industry/nonprofits)

  - BY USE CASE

    - [App Modernization](https://github.com/solutions/use-case/app-modernization)
    - [DevSecOps](https://github.com/solutions/use-case/devsecops)
    - [DevOps](https://github.com/solutions/use-case/devops)
    - [CI/CD](https://github.com/solutions/use-case/ci-cd)
    - [View all use cases](https://github.com/solutions/use-case)

  - BY INDUSTRY

    - [Healthcare](https://github.com/solutions/industry/healthcare)
    - [Financial services](https://github.com/solutions/industry/financial-services)
    - [Manufacturing](https://github.com/solutions/industry/manufacturing)
    - [Government](https://github.com/solutions/industry/government)
    - [View all industries](https://github.com/solutions/industry)

[View all solutions](https://github.com/solutions)

- Resources



  - EXPLORE BY TOPIC

    - [AI](https://github.com/resources/articles?topic=ai)
    - [Software Development](https://github.com/resources/articles?topic=software-development)
    - [DevOps](https://github.com/resources/articles?topic=devops)
    - [Security](https://github.com/resources/articles?topic=security)
    - [View all topics](https://github.com/resources/articles)

  - EXPLORE BY TYPE

    - [Customer stories](https://github.com/customer-stories)
    - [Events & webinars](https://github.com/resources/events)
    - [Ebooks & reports](https://github.com/resources/whitepapers)
    - [Business insights](https://github.com/solutions/executive-insights)
    - [GitHub Skills](https://skills.github.com/)

  - SUPPORT & SERVICES

    - [Documentation](https://docs.github.com/)
    - [Customer support](https://support.github.com/)
    - [Community forum](https://github.com/orgs/community/discussions)
    - [Trust center](https://github.com/trust-center)
    - [Partners](https://github.com/partners)

[View all resources](https://github.com/resources)

- Open Source



  - COMMUNITY

    - [GitHub SponsorsFund open source developers](https://github.com/sponsors)

  - PROGRAMS

    - [Security Lab](https://securitylab.github.com/)
    - [Maintainer Community](https://maintainers.github.com/)
    - [Accelerator](https://github.com/accelerator)
    - [GitHub Stars](https://stars.github.com/)
    - [Archive Program](https://archiveprogram.github.com/)

  - REPOSITORIES

    - [Topics](https://github.com/topics)
    - [Trending](https://github.com/trending)
    - [Collections](https://github.com/collections)

- Enterprise



  - ENTERPRISE SOLUTIONS

    - [Enterprise platformAI-powered developer platform](https://github.com/enterprise)

  - AVAILABLE ADD-ONS

    - [GitHub Advanced SecurityEnterprise-grade security features](https://github.com/security/advanced-security)
    - [Copilot for BusinessEnterprise-grade AI features](https://github.com/features/copilot/copilot-business)
    - [Premium SupportEnterprise-grade 24/7 support](https://github.com/premium-support)

- [Pricing](https://github.com/pricing)

Search or jump to...

# Search code, repositories, users, issues, pull requests...

Search


Clear

[Search syntax tips](https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax)

# Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel
Submit feedback

# Saved searches

## Use saved searches to filter your results more quickly

Name

Query

To see all available qualifiers, see our [documentation](https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax).


Cancel
Create saved search

[Sign in](https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffal-ai-community%2Fgenmedia-cli)

[Sign up](https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=fal-ai-community%2Fgenmedia-cli)

Appearance settings

Resetting focus

You signed in with another tab or window. [Reload](https://github.com/fal-ai-community/genmedia-cli) to refresh your session.You signed out in another tab or window. [Reload](https://github.com/fal-ai-community/genmedia-cli) to refresh your session.You switched accounts on another tab or window. [Reload](https://github.com/fal-ai-community/genmedia-cli) to refresh your session.Dismiss alert

{{ message }}

### Uh oh!

There was an error while loading. [Please reload this page](https://github.com/fal-ai-community/genmedia-cli).

[fal-ai-community](https://github.com/fal-ai-community)/ **[genmedia-cli](https://github.com/fal-ai-community/genmedia-cli)** Public

- [Notifications](https://github.com/login?return_to=%2Ffal-ai-community%2Fgenmedia-cli) You must be signed in to change notification settings
- [Fork\\
2](https://github.com/login?return_to=%2Ffal-ai-community%2Fgenmedia-cli)
- [Star\\
57](https://github.com/login?return_to=%2Ffal-ai-community%2Fgenmedia-cli)


- [Code](https://github.com/fal-ai-community/genmedia-cli)
- [Issues1](https://github.com/fal-ai-community/genmedia-cli/issues)
- [Pull requests1](https://github.com/fal-ai-community/genmedia-cli/pulls)
- [Actions](https://github.com/fal-ai-community/genmedia-cli/actions)
- [Projects](https://github.com/fal-ai-community/genmedia-cli/projects)
- [Security and quality0](https://github.com/fal-ai-community/genmedia-cli/security)
- [Insights](https://github.com/fal-ai-community/genmedia-cli/pulse)

Additional navigation options

- [Code](https://github.com/fal-ai-community/genmedia-cli)
- [Issues](https://github.com/fal-ai-community/genmedia-cli/issues)
- [Pull requests](https://github.com/fal-ai-community/genmedia-cli/pulls)
- [Actions](https://github.com/fal-ai-community/genmedia-cli/actions)
- [Projects](https://github.com/fal-ai-community/genmedia-cli/projects)
- [Security and quality](https://github.com/fal-ai-community/genmedia-cli/security)
- [Insights](https://github.com/fal-ai-community/genmedia-cli/pulse)

# fal-ai-community/genmedia-cli

main

[**13** Branches](https://github.com/fal-ai-community/genmedia-cli/branches) [**15** Tags](https://github.com/fal-ai-community/genmedia-cli/tags)

[Go to Branches page](https://github.com/fal-ai-community/genmedia-cli/branches)[Go to Tags page](https://github.com/fal-ai-community/genmedia-cli/tags)

Go to file

Code

Open more actions menu

## Folders and files

| Name | Name | Last commit message | Last commit date |
| --- | --- | --- | --- |
| ## Latest commit<br>[![drochetti](https://avatars.githubusercontent.com/u/319413?v=4&size=40)](https://github.com/drochetti)[drochetti](https://github.com/fal-ai-community/genmedia-cli/commits?author=drochetti)<br>[chore: prepare v0.7.0 release](https://github.com/fal-ai-community/genmedia-cli/commit/63ef5e5b6a72df984c78dfa7fe8e6ed3c03647c0)<br>success<br>2 months agoMay 28, 2026<br>[63ef5e5](https://github.com/fal-ai-community/genmedia-cli/commit/63ef5e5b6a72df984c78dfa7fe8e6ed3c03647c0) · 2 months agoMay 28, 2026<br>## History<br>[55 Commits](https://github.com/fal-ai-community/genmedia-cli/commits/main/) <br>Open commit details<br>[View commit history for this file.](https://github.com/fal-ai-community/genmedia-cli/commits/main/) 55 Commits |
| [.agents/skills](https://github.com/fal-ai-community/genmedia-cli/tree/main/.agents/skills "This path skips through empty directories") | [.agents/skills](https://github.com/fal-ai-community/genmedia-cli/tree/main/.agents/skills "This path skips through empty directories") | [feat: assets API commands (browse, upload, collections, characters, t…](https://github.com/fal-ai-community/genmedia-cli/commit/59ef4e31dbf2999fa6d73a486edf54639e83062c "feat: assets API commands (browse, upload, collections, characters, tags) (#14)  * feat: added assets api commands  * skill around different input ids  * updated genmedia cli to remove asset ID (as removed in the api too)  * updated due to assets api changes  ---------  Co-authored-by: dimi-fal <282089508+dimi-fal@users.noreply.github.com>") | 2 months agoMay 28, 2026 |
| [.claude](https://github.com/fal-ai-community/genmedia-cli/tree/main/.claude ".claude") | [.claude](https://github.com/fal-ai-community/genmedia-cli/tree/main/.claude ".claude") | [feat: skills search and new registry repo](https://github.com/fal-ai-community/genmedia-cli/commit/7b782be9682248f9c86df8decbd335346f14e47a "feat: skills search and new registry repo") | 2 months agoMay 4, 2026 |
| [.github/workflows](https://github.com/fal-ai-community/genmedia-cli/tree/main/.github/workflows "This path skips through empty directories") | [.github/workflows](https://github.com/fal-ai-community/genmedia-cli/tree/main/.github/workflows "This path skips through empty directories") | [feat: optional PostHog analytics for CLI and web routes (](https://github.com/fal-ai-community/genmedia-cli/commit/df72085cea60f611d77382b8b3b428fecf750801 "feat: optional PostHog analytics for CLI and web routes (#6)  * feat: optional PostHog analytics for CLI and web routes  Open-source-safe by design: the PostHog key is injected at build time via `bun build --define` (CI uses a repo secret) and the analytics module no-ops at runtime when the key is absent or `GENMEDIA_NO_ANALYTICS=1` / `analyticsOptOut: true` is set. The web app reads `POSTHOG_KEY` at runtime from Vercel and no-ops when unset.  * chore: bump version") [#6](https://github.com/fal-ai-community/genmedia-cli/pull/6) [)](https://github.com/fal-ai-community/genmedia-cli/commit/df72085cea60f611d77382b8b3b428fecf750801 "feat: optional PostHog analytics for CLI and web routes (#6)  * feat: optional PostHog analytics for CLI and web routes  Open-source-safe by design: the PostHog key is injected at build time via `bun build --define` (CI uses a repo secret) and the analytics module no-ops at runtime when the key is absent or `GENMEDIA_NO_ANALYTICS=1` / `analyticsOptOut: true` is set. The web app reads `POSTHOG_KEY` at runtime from Vercel and no-ops when unset.  * chore: bump version") | 2 months agoMay 7, 2026 |
| [.husky](https://github.com/fal-ai-community/genmedia-cli/tree/main/.husky ".husky") | [.husky](https://github.com/fal-ai-community/genmedia-cli/tree/main/.husky ".husky") | [fix: remove stale skills index and genmedia-ref reference (](https://github.com/fal-ai-community/genmedia-cli/commit/8045afb582b2c1460d7b3bbd10e5e690ad12f2c1 "fix: remove stale skills index and genmedia-ref reference (#5)") [#5](https://github.com/fal-ai-community/genmedia-cli/pull/5) [)](https://github.com/fal-ai-community/genmedia-cli/commit/8045afb582b2c1460d7b3bbd10e5e690ad12f2c1 "fix: remove stale skills index and genmedia-ref reference (#5)") | 2 months agoMay 6, 2026 |
| [scripts](https://github.com/fal-ai-community/genmedia-cli/tree/main/scripts "scripts") | [scripts](https://github.com/fal-ai-community/genmedia-cli/tree/main/scripts "scripts") | [chore: refactor skill list command](https://github.com/fal-ai-community/genmedia-cli/commit/d522a969af14c7cbf04cdb571d8c0c5355843f7c "chore: refactor skill list command") | 2 months agoMay 4, 2026 |
| [src](https://github.com/fal-ai-community/genmedia-cli/tree/main/src "src") | [src](https://github.com/fal-ai-community/genmedia-cli/tree/main/src "src") | [feat: add `gallery` command for per-session HTML preview of generated…](https://github.com/fal-ai-community/genmedia-cli/commit/7beb2b4404c54c4d96d5411234f445457a0a1812 "feat: add `gallery` command for per-session HTML preview of generated assets (#11)  * feat: add `gallery` command for per-session HTML preview of generated assets  Every successful `run` and `status --download` now records its outputs into a per-session, self-contained static HTML page under `~/.genmedia/gallery/sessions/<session_id>/index.html`. The page aggregates every asset produced inside one agent session — across many runs and endpoints — into a filterable grid with a lightbox view, and auto-refreshes via a client-side poll on `./data.json` while the session is live.  Session resolution is agent-agnostic and walks the process tree so Claude Code's per-invocation Bash shells still map to the long-lived Claude parent. Override via `GENMEDIA_SESSION_ID`; disable recording with `GENMEDIA_NO_GALLERY=1`; tune retention with `GENMEDIA_GALLERY_RETENTION_DAYS`.  Adds subcommands: `gallery` / `gallery info` (session info), `gallery open [current|latest|<id>] [--print]`, `gallery list [--limit]`, `gallery clear [current|latest|all|<id>] --yes` (no interactive prompt). The `run` and `status` JSON responses also include the gallery `{ session_id, path, url }` block.  * feat(gallery): Gallery UX improvements (#12)  * make gallery command default to giving an open hint instead of full state JSON  * added image/video/audio thumbnail previews in the sessions page  * added session label + rename functionality for readability  * ui tweaks  * added previews for 3d and other files and minor ui tweak on session title font  * minor ui tweak  ---------  Co-authored-by: dimi-fal <282089508+dimi-fal@users.noreply.github.com>  ---------  Co-authored-by: dimi-fal <dimi@fal.ai> Co-authored-by: dimi-fal <282089508+dimi-fal@users.noreply.github.com>") | 2 months agoMay 28, 2026 |
| [web](https://github.com/fal-ai-community/genmedia-cli/tree/main/web "web") | [web](https://github.com/fal-ai-community/genmedia-cli/tree/main/web "web") | [feat(web): host defaults.json so CLI smart-default routing has a mani…](https://github.com/fal-ai-community/genmedia-cli/commit/0106d242d98c143a950b85f05d78459d5908abd9 "feat(web): host defaults.json so CLI smart-default routing has a manifest  The CLI's defaults-manifest fetcher (src/lib/defaults-manifest.ts) points at https://genmedia.sh/defaults.json but the URL was 404ing, leaving the remote- override mechanism dead code (CLI always falls through to BAKED_IN).  Add a Next.js route handler that serves the same JSON as BAKED_IN with a 5-minute CDN cache + 1-hour stale-while-revalidate. Behavior unchanged today; future default changes are now a single edit here, no CLI release required.  Keep this in lockstep with BAKED_IN in src/lib/defaults-manifest.ts - the hosted manifest overrides, the baked-in copy is the offline fallback.") | 2 months agoMay 13, 2026 |
| [.bun-version](https://github.com/fal-ai-community/genmedia-cli/blob/main/.bun-version ".bun-version") | [.bun-version](https://github.com/fal-ai-community/genmedia-cli/blob/main/.bun-version ".bun-version") | [chore: rename to genmedia](https://github.com/fal-ai-community/genmedia-cli/commit/765ed9ec287cb31a34030fa9b3bbd5b346976c54 "chore: rename to genmedia") | 3 months agoApr 15, 2026 |
| [.editorconfig](https://github.com/fal-ai-community/genmedia-cli/blob/main/.editorconfig ".editorconfig") | [.editorconfig](https://github.com/fal-ai-community/genmedia-cli/blob/main/.editorconfig ".editorconfig") | [chore: update readme and agents docs](https://github.com/fal-ai-community/genmedia-cli/commit/7ee094ebd46a0c8361c9fcd1dfb8185f54a0980b "chore: update readme and agents docs") | 3 months agoApr 17, 2026 |
| [.gitignore](https://github.com/fal-ai-community/genmedia-cli/blob/main/.gitignore ".gitignore") | [.gitignore](https://github.com/fal-ai-community/genmedia-cli/blob/main/.gitignore ".gitignore") | [chore: 0.3.1 release](https://github.com/fal-ai-community/genmedia-cli/commit/5b6f4602647186d9afbe2d2b92387575460dbcce "chore: 0.3.1 release  - install.sh: symlink binary into ~/.local/bin so it works in the   current shell without restart; tighten post-install messaging. - install.ps1: mention install dir and show PATH refresh hint for   non-iex invocations. - Ignore .vercel.") | 3 months agoApr 17, 2026 |
| [AGENTS.md](https://github.com/fal-ai-community/genmedia-cli/blob/main/AGENTS.md "AGENTS.md") | [AGENTS.md](https://github.com/fal-ai-community/genmedia-cli/blob/main/AGENTS.md "AGENTS.md") | [chore: 0.4.0 release](https://github.com/fal-ai-community/genmedia-cli/commit/ca3a0ac3c9499db5c5208b140077c220520fb52c "chore: 0.4.0 release  - Add `genmedia update` command with `--check` and `--force` flags.   JSON output for agents; spinner + pretty summary for TTY. - Add background auto-update: TTY-only, rate-limited to 1/hour,   downloads next release into `<binary>.new` and atomically swaps   it in on the following launch. Opt-in via `genmedia setup`   (default on). Respects `GENMEDIA_NO_UPDATE=1` and skips   non-TTY / `--json` / piped invocations. - Extract self-update into `src/lib/updater.ts`. Config gains   `autoUpdate`, `lastUpdateCheckAt`, and `latestKnownVersion`.") | 3 months agoApr 17, 2026 |
| [CLAUDE.md](https://github.com/fal-ai-community/genmedia-cli/blob/main/CLAUDE.md "CLAUDE.md") | [CLAUDE.md](https://github.com/fal-ai-community/genmedia-cli/blob/main/CLAUDE.md "CLAUDE.md") | [chore: update readme and agents docs](https://github.com/fal-ai-community/genmedia-cli/commit/7ee094ebd46a0c8361c9fcd1dfb8185f54a0980b "chore: update readme and agents docs") | 3 months agoApr 17, 2026 |
| [CODE\_OF\_CONDUCT.md](https://github.com/fal-ai-community/genmedia-cli/blob/main/CODE_OF_CONDUCT.md "CODE_OF_CONDUCT.md") | [CODE\_OF\_CONDUCT.md](https://github.com/fal-ai-community/genmedia-cli/blob/main/CODE_OF_CONDUCT.md "CODE_OF_CONDUCT.md") | [chore: update license and coc](https://github.com/fal-ai-community/genmedia-cli/commit/ae509749dadd42ce43b62ad74706254dc2395480 "chore: update license and coc") | 3 months agoApr 17, 2026 |
| [LICENSE](https://github.com/fal-ai-community/genmedia-cli/blob/main/LICENSE "LICENSE") | [LICENSE](https://github.com/fal-ai-community/genmedia-cli/blob/main/LICENSE "LICENSE") | [chore: update license and coc](https://github.com/fal-ai-community/genmedia-cli/commit/ae509749dadd42ce43b62ad74706254dc2395480 "chore: update license and coc") | 3 months agoApr 17, 2026 |
| [README.md](https://github.com/fal-ai-community/genmedia-cli/blob/main/README.md "README.md") | [README.md](https://github.com/fal-ai-community/genmedia-cli/blob/main/README.md "README.md") | [feat: add `gallery` command for per-session HTML preview of generated…](https://github.com/fal-ai-community/genmedia-cli/commit/7beb2b4404c54c4d96d5411234f445457a0a1812 "feat: add `gallery` command for per-session HTML preview of generated assets (#11)  * feat: add `gallery` command for per-session HTML preview of generated assets  Every successful `run` and `status --download` now records its outputs into a per-session, self-contained static HTML page under `~/.genmedia/gallery/sessions/<session_id>/index.html`. The page aggregates every asset produced inside one agent session — across many runs and endpoints — into a filterable grid with a lightbox view, and auto-refreshes via a client-side poll on `./data.json` while the session is live.  Session resolution is agent-agnostic and walks the process tree so Claude Code's per-invocation Bash shells still map to the long-lived Claude parent. Override via `GENMEDIA_SESSION_ID`; disable recording with `GENMEDIA_NO_GALLERY=1`; tune retention with `GENMEDIA_GALLERY_RETENTION_DAYS`.  Adds subcommands: `gallery` / `gallery info` (session info), `gallery open [current|latest|<id>] [--print]`, `gallery list [--limit]`, `gallery clear [current|latest|all|<id>] --yes` (no interactive prompt). The `run` and `status` JSON responses also include the gallery `{ session_id, path, url }` block.  * feat(gallery): Gallery UX improvements (#12)  * make gallery command default to giving an open hint instead of full state JSON  * added image/video/audio thumbnail previews in the sessions page  * added session label + rename functionality for readability  * ui tweaks  * added previews for 3d and other files and minor ui tweak on session title font  * minor ui tweak  ---------  Co-authored-by: dimi-fal <282089508+dimi-fal@users.noreply.github.com>  ---------  Co-authored-by: dimi-fal <dimi@fal.ai> Co-authored-by: dimi-fal <282089508+dimi-fal@users.noreply.github.com>") | 2 months agoMay 28, 2026 |
| [biome.json](https://github.com/fal-ai-community/genmedia-cli/blob/main/biome.json "biome.json") | [biome.json](https://github.com/fal-ai-community/genmedia-cli/blob/main/biome.json "biome.json") | [refactor: command reorg](https://github.com/fal-ai-community/genmedia-cli/commit/7ab762b5014d95b82bdcee8fc2e72c93fb3adf57 "refactor: command reorg") | 4 months agoMar 17, 2026 |
| [bun.lock](https://github.com/fal-ai-community/genmedia-cli/blob/main/bun.lock "bun.lock") | [bun.lock](https://github.com/fal-ai-community/genmedia-cli/blob/main/bun.lock "bun.lock") | [feat: optional PostHog analytics for CLI and web routes (](https://github.com/fal-ai-community/genmedia-cli/commit/df72085cea60f611d77382b8b3b428fecf750801 "feat: optional PostHog analytics for CLI and web routes (#6)  * feat: optional PostHog analytics for CLI and web routes  Open-source-safe by design: the PostHog key is injected at build time via `bun build --define` (CI uses a repo secret) and the analytics module no-ops at runtime when the key is absent or `GENMEDIA_NO_ANALYTICS=1` / `analyticsOptOut: true` is set. The web app reads `POSTHOG_KEY` at runtime from Vercel and no-ops when unset.  * chore: bump version") [#6](https://github.com/fal-ai-community/genmedia-cli/pull/6) [)](https://github.com/fal-ai-community/genmedia-cli/commit/df72085cea60f611d77382b8b3b428fecf750801 "feat: optional PostHog analytics for CLI and web routes (#6)  * feat: optional PostHog analytics for CLI and web routes  Open-source-safe by design: the PostHog key is injected at build time via `bun build --define` (CI uses a repo secret) and the analytics module no-ops at runtime when the key is absent or `GENMEDIA_NO_ANALYTICS=1` / `analyticsOptOut: true` is set. The web app reads `POSTHOG_KEY` at runtime from Vercel and no-ops when unset.  * chore: bump version") | 2 months agoMay 7, 2026 |
| [install.ps1](https://github.com/fal-ai-community/genmedia-cli/blob/main/install.ps1 "install.ps1") | [install.ps1](https://github.com/fal-ai-community/genmedia-cli/blob/main/install.ps1 "install.ps1") | [chore: 0.3.2 release](https://github.com/fal-ai-community/genmedia-cli/commit/85c0afc1f549572d5f3506726f4971632351faed "chore: 0.3.2 release  - Point installers at fal-ai-community/genmedia-cli (stop relying on   the GitHub redirect from the old cli repo). - Document the release flow in AGENTS.md.") | 3 months agoApr 17, 2026 |
| [install.sh](https://github.com/fal-ai-community/genmedia-cli/blob/main/install.sh "install.sh") | [install.sh](https://github.com/fal-ai-community/genmedia-cli/blob/main/install.sh "install.sh") | [chore: 0.3.2 release](https://github.com/fal-ai-community/genmedia-cli/commit/85c0afc1f549572d5f3506726f4971632351faed "chore: 0.3.2 release  - Point installers at fal-ai-community/genmedia-cli (stop relying on   the GitHub redirect from the old cli repo). - Document the release flow in AGENTS.md.") | 3 months agoApr 17, 2026 |
| [package.json](https://github.com/fal-ai-community/genmedia-cli/blob/main/package.json "package.json") | [package.json](https://github.com/fal-ai-community/genmedia-cli/blob/main/package.json "package.json") | [chore: prepare v0.7.0 release](https://github.com/fal-ai-community/genmedia-cli/commit/63ef5e5b6a72df984c78dfa7fe8e6ed3c03647c0 "chore: prepare v0.7.0 release") | 2 months agoMay 28, 2026 |
| [tsconfig.json](https://github.com/fal-ai-community/genmedia-cli/blob/main/tsconfig.json "tsconfig.json") | [tsconfig.json](https://github.com/fal-ai-community/genmedia-cli/blob/main/tsconfig.json "tsconfig.json") | [feat: version information and command](https://github.com/fal-ai-community/genmedia-cli/commit/a65f247a79ce8c9ac2022e68a2856e97c41707aa "feat: version information and command") | 4 months agoMar 17, 2026 |
| View all files |

## Repository files navigation

- [README](https://github.com/fal-ai-community/genmedia-cli#)
- [Code of conduct](https://github.com/fal-ai-community/genmedia-cli#)
- [MIT license](https://github.com/fal-ai-community/genmedia-cli#)

More items

# genmedia

[Permalink: genmedia](https://github.com/fal-ai-community/genmedia-cli#genmedia)

Agent-first CLI for fal.ai — search, run, and manage 1200+ model endpoints.

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.

## Install

[Permalink: Install](https://github.com/fal-ai-community/genmedia-cli#install)

For Linux and macOS:

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

For Windows:

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

## Setup

[Permalink: Setup](https://github.com/fal-ai-community/genmedia-cli#setup)

```
genmedia setup
```

Interactive wizard that configures:

- **API key** — saved encrypted to your local config (or skip and use `FAL_KEY` in your environment)
- **Auto-load `.env`** — automatically load `FAL_KEY` and related vars from a project `.env` file
- **Output mode** — `auto` (pretty in TTY, JSON when piped), `json` (always structured), or `standard` (always human-readable)
- **Automatic updates** — check for new versions in the background and swap in on next launch (default: on; set `GENMEDIA_NO_UPDATE=1` to disable)

Get your API key at [fal.ai/dashboard/keys](https://fal.ai/dashboard/keys).

To skip the wizard, set the key in your environment:

```
export FAL_KEY=your_fal_api_key
```

### Non-interactive setup (agents / CI)

[Permalink: Non-interactive setup (agents / CI)](https://github.com/fal-ai-community/genmedia-cli#non-interactive-setup-agents--ci)

```
genmedia setup --non-interactive --api-key "$FAL_KEY"
genmedia setup --non-interactive --output-format json --no-auto-load-env --auto-update
```

Every flag is optional — fields you don't pass keep their current values, so repeated invocations are idempotent.

| Flag | Description |
| --- | --- |
| `--non-interactive`, `-y` | Skip all prompts. Required when there is no TTY. |
| `--api-key <key>` | API key to save. Pass `""` to clear the saved key. |
| `--no-save-key` | With `--api-key`, don't persist the key to `config.json` (use `FAL_KEY` at runtime instead). |
| `--output-format <auto|json|standard>` | Default output mode. |
| `--auto-load-env` / `--no-auto-load-env` | Toggle auto-loading `FAL_KEY` from a project `.env`. |
| `--auto-update` / `--no-auto-update` | Toggle background update checks. |

## Commands

[Permalink: Commands](https://github.com/fal-ai-community/genmedia-cli#commands)

### `models` — Search and inspect models

[Permalink: models — Search and inspect models](https://github.com/fal-ai-community/genmedia-cli#models--search-and-inspect-models)

```
genmedia models "text to video"
genmedia models "flux" --category text-to-image
genmedia models --category text-to-speech --limit 5
genmedia models --status all                                      # include deprecated
genmedia models --endpoint_id fal-ai/flux/dev,fal-ai/flux/schnell # fetch specific models
genmedia models --endpoint_id fal-ai/flux/dev --expand openapi-3.0
genmedia models "flux" --cursor <token>                           # next page
```

| Option | Description |
| --- | --- |
| `--category` | Filter by category (e.g. `text-to-image`, `image-to-video`, `text-to-speech`) |
| `--status` | `active` (default), `deprecated`, or `all` |
| `--limit` | Max results (default: 20) |
| `--cursor` | Pagination cursor from a previous response |
| `--endpoint_id` | Fetch specific model(s) by ID — comma-separated or repeated |
| `--expand` | Expand additional fields: `openapi-3.0`, `enterprise_status` |

### `schema` — Inspect model inputs/outputs

[Permalink: schema — Inspect model inputs/outputs](https://github.com/fal-ai-community/genmedia-cli#schema--inspect-model-inputsoutputs)

```
genmedia schema fal-ai/flux/dev
genmedia schema fal-ai/flux/dev --format openapi
```

| Option | Description |
| --- | --- |
| `--format` | `compact` (default) or `openapi` — returns full OpenAPI JSON |

### `run` — Run a model

[Permalink: run — Run a model](https://github.com/fal-ai-community/genmedia-cli#run--run-a-model)

```
genmedia run fal-ai/flux/dev --prompt "a cat on the moon"
genmedia run fal-ai/flux/dev --prompt "a cat" --num_images 2
genmedia run fal-ai/flux/dev --prompt "a cat" --logs
genmedia run fal-ai/veo3.1 --prompt "a dog running" --async
genmedia run fal-ai/flux/dev --prompt "a cat" --download                               # save to cwd with source file names
genmedia run fal-ai/flux/dev --prompt "a cat" --num_images 3 --download "./out/{index}.{ext}"
genmedia run fal-ai/flux/dev --help    # introspect model inputs as CLI help
```

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.

| Option | Description |
| --- | --- |
| `--<param>` | Any model input parameter (e.g. `--prompt`, `--num_images`) |
| `--logs` | Stream logs while the model runs (pretty terminal mode only) |
| `--async` | Submit to queue without waiting — returns a `request_id` |
| `--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`. |

### `status` — Check an async job

[Permalink: status — Check an async job](https://github.com/fal-ai-community/genmedia-cli#status--check-an-async-job)

```
genmedia status fal-ai/veo3.1 <request_id>
genmedia status fal-ai/veo3.1 <request_id> --result
genmedia status fal-ai/veo3.1 <request_id> --logs
genmedia status fal-ai/veo3.1 <request_id> --cancel
genmedia status fal-ai/veo3.1 <request_id> --download ./out/   # implies --result
```

| Option | Description |
| --- | --- |
| `--result` | Fetch the completed result |
| `--logs` | Show logs verbosely |
| `--cancel` | Cancel the queued job |
| `--download [template]` | Same as on `run`. Implies `--result` — fetches the completed result and writes media files to disk. |

### `upload` — Upload files to fal.ai CDN

[Permalink: upload — Upload files to fal.ai CDN](https://github.com/fal-ai-community/genmedia-cli#upload--upload-files-to-falai-cdn)

```
genmedia upload ./photo.jpg
genmedia upload https://example.com/image.png
```

Accepts a local file path or a remote URL. Returns a CDN URL you can use as model input.

### `pricing` — Check model pricing

[Permalink: pricing — Check model pricing](https://github.com/fal-ai-community/genmedia-cli#pricing--check-model-pricing)

```
genmedia pricing fal-ai/flux/dev
```

### `docs` — Search documentation

[Permalink: docs — Search documentation](https://github.com/fal-ai-community/genmedia-cli#docs--search-documentation)

```
genmedia docs "how to use LoRA"
genmedia docs "webhook callbacks"
```

Searches fal.ai documentation, guides, and API references.

### `version` — Show version

[Permalink: version — Show version](https://github.com/fal-ai-community/genmedia-cli#version--show-version)

```
genmedia version
```

Shows the current version and flags any known update (populated by the background checker).

### `gallery` — Browse a per-session HTML preview of generated assets

[Permalink: gallery — Browse a per-session HTML preview of generated assets](https://github.com/fal-ai-community/genmedia-cli#gallery--browse-a-per-session-html-preview-of-generated-assets)

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://`.

```
genmedia gallery                          # pretty TTY: prints `→ Open: <url>`. JSON / non-TTY: full info payload.
genmedia gallery --json                   # structured info payload, agent-safe
genmedia gallery info                     # full info payload, even from a TTY (devs)
genmedia gallery open                     # open the all-sessions index in the default browser
genmedia gallery open current             # open the current session
genmedia gallery open latest              # open the most-recently recorded session (works across shells)
genmedia gallery open <session_id>        # open a specific session
genmedia gallery open latest --print      # resolve path/url without launching the browser
genmedia gallery list                     # list every recorded session (newest first, JSON-friendly)
genmedia gallery list --limit 10          # cap the list (default: 50)
genmedia gallery rename --label "demo run"        # rename the current session (cosmetic — id stays the same)
genmedia gallery rename latest --label "x"        # rename the most-recent session
genmedia gallery rename <session_id> --clear      # remove a session's label
genmedia gallery clear --yes              # delete the current session (--yes is required)
genmedia gallery clear latest --yes       # delete the most-recently recorded session
genmedia gallery clear <session_id> --yes # delete a specific session
genmedia gallery clear all --yes          # delete every recorded session
```

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.

> `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.

The `run` and `status --download` responses include the gallery info too:

```
{
  "status": "completed",
  "endpoint_id": "fal-ai/flux/dev",
  "request_id": "…",
  "gallery": {
    "session_id": "a1b2c3d4e5f6",
    "path": "/Users/you/.genmedia/gallery/sessions/a1b2c3d4e5f6/index.html",
    "url": "file:///Users/you/.genmedia/gallery/sessions/a1b2c3d4e5f6/index.html"
  }
}
```

**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:

1. `GENMEDIA_SESSION_ID` — explicit override (e.g. set from a hook script).
2. Per-agent env vars: `CODEX_THREAD_ID`, `CLAUDE_SESSION_ID`, `AMP_THREAD_ID`, `CURSOR_TRACE_ID`.
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.
4. Terminal-level: `TERM_SESSION_ID` / `ITERM_SESSION_ID` / `WT_SESSION` / `TMUX_PANE`.
5. Fallback: a deterministic hash of `<agent>:<ppid>`.

| Env var | Description |
| --- | --- |
| `GENMEDIA_NO_GALLERY=1` | Disable gallery recording and rendering entirely. |
| `GENMEDIA_SESSION_ID=<anchor>` | Force a specific session id (any string; it's hashed into the on-disk slug). |
| `GENMEDIA_GALLERY_RETENTION_DAYS=<n>` | Prune session directories older than `n` days (default: 60). |

### `update` — Check for and apply updates

[Permalink: update — Check for and apply updates](https://github.com/fal-ai-community/genmedia-cli#update--check-for-and-apply-updates)

```
genmedia update              # download and swap in the latest release
genmedia update --check      # only check, don't download
genmedia update --force      # reinstall even if already on the latest
```

| Option | Description |
| --- | --- |
| `--check` | Only check for a newer version; don't download |
| `--force` | Re-download and reinstall even if already on the latest |

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.

## Analytics

[Permalink: Analytics](https://github.com/fal-ai-community/genmedia-cli#analytics)

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.

**Events:**

- `command_run` — top-level command name, success/failure, duration
- `cli_first_run` — fired once when the install is first seen
- `setup_completed` — `setup` finished successfully
- `model_run` — `run` finished, with the model endpoint, success/failure, and duration (no inputs or outputs)
- `skills_searched` — `skills list [query]` — the query string and result count
- `skills_installed` / `skills_updated` / `skills_removed` — skill name and status
- `update_applied` — self-update succeeded, with from/to versions

**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.

**Opt out:**

```
export GENMEDIA_NO_ANALYTICS=1            # per-shell
# or persist in config:
genmedia setup    # (toggle is currently file-only — set "analyticsOptOut": true)
```

Builds from source without a `POSTHOG_KEY` environment variable (the open-source default) report nothing — the analytics module no-ops at runtime.

### `init` — Install the default genmedia skill bundle

[Permalink: init — Install the default genmedia skill bundle](https://github.com/fal-ai-community/genmedia-cli#init--install-the-default-genmedia-skill-bundle)

```
genmedia init
genmedia init --force   # overwrite existing files
```

Installs the default genmedia skill bundle:

| Skill | Purpose |
| --- | --- |
| `genmedia` | Guided workflow for model discovery, schema inspection, and execution |

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.

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.

### `skills` — Manage installed agent skills

[Permalink: skills — Manage installed agent skills](https://github.com/fal-ai-community/genmedia-cli#skills--manage-installed-agent-skills)

```
genmedia skills list                  # list everything in the registry
genmedia skills list image            # full-text search name + description
genmedia skills install genmedia
genmedia skills update
genmedia skills remove genmedia
```

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.

## Agent-first design

[Permalink: Agent-first design](https://github.com/fal-ai-community/genmedia-cli#agent-first-design)

All commands output structured JSON when piped or called with `--json`:

```
genmedia run fal-ai/flux/dev --prompt "a cat" --json
genmedia models "text to video" --json | jq '.models[]'
```

To get a machine-readable description of all commands for use in a system prompt or agent context:

```
genmedia --help --json
```

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.

## License

[Permalink: License](https://github.com/fal-ai-community/genmedia-cli#license)

MIT

## About

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


[genmedia.sh](https://genmedia.sh/ "https://genmedia.sh")

### Topics

[cli](https://github.com/topics/cli "Topic: cli") [ai](https://github.com/topics/ai "Topic: ai") [agents](https://github.com/topics/agents "Topic: agents") [agent-skills](https://github.com/topics/agent-skills "Topic: agent-skills")

### Resources

[Readme](https://github.com/fal-ai-community/genmedia-cli#readme-ov-file)

### License

[MIT license](https://github.com/fal-ai-community/genmedia-cli#MIT-1-ov-file)

### Code of conduct

[Code of conduct](https://github.com/fal-ai-community/genmedia-cli#coc-ov-file)

### Uh oh!

There was an error while loading. [Please reload this page](https://github.com/fal-ai-community/genmedia-cli).

[Activity](https://github.com/fal-ai-community/genmedia-cli/activity)

[Custom properties](https://github.com/fal-ai-community/genmedia-cli/custom-properties)

### Stars

[**57**\\
stars](https://github.com/fal-ai-community/genmedia-cli/stargazers)

### Watchers

[**1**\\
watching](https://github.com/fal-ai-community/genmedia-cli/watchers)

### Forks

[**2**\\
forks](https://github.com/fal-ai-community/genmedia-cli/forks)

[Report repository](https://github.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Ffal-ai-community%2Fgenmedia-cli&report=fal-ai-community+%28user%29)

## [Releases\  15](https://github.com/fal-ai-community/genmedia-cli/releases)

[v0.7.0\\
Latest\\
\\
on May 28May 29, 2026](https://github.com/fal-ai-community/genmedia-cli/releases/tag/v0.7.0)

[\+ 14 releases](https://github.com/fal-ai-community/genmedia-cli/releases)

## [Packages\  0](https://github.com/orgs/fal-ai-community/packages?repo_name=genmedia-cli)

No packages published

### Uh oh!

There was an error while loading. [Please reload this page](https://github.com/fal-ai-community/genmedia-cli).

## [Contributors\  6](https://github.com/fal-ai-community/genmedia-cli/graphs/contributors)

- [![@drochetti](https://avatars.githubusercontent.com/u/319413?s=64&v=4)](https://github.com/drochetti)
- [![@koumpas](https://avatars.githubusercontent.com/u/95102950?s=64&v=4)](https://github.com/koumpas)
- [![@dimi-fal](https://avatars.githubusercontent.com/u/282089508?s=64&v=4)](https://github.com/dimi-fal)
- [![@lovisdotio](https://avatars.githubusercontent.com/u/158358668?s=64&v=4)](https://github.com/lovisdotio)
- [![@claude](https://avatars.githubusercontent.com/u/81847?s=64&v=4)](https://github.com/claude)
- [![@ilkerzg](https://avatars.githubusercontent.com/u/105287654?s=64&v=4)](https://github.com/ilkerzg)

## Languages

- [TypeScript78.0%](https://github.com/fal-ai-community/genmedia-cli/search?l=typescript)
- [JavaScript10.6%](https://github.com/fal-ai-community/genmedia-cli/search?l=javascript)
- [CSS6.5%](https://github.com/fal-ai-community/genmedia-cli/search?l=css)
- [Go Template2.3%](https://github.com/fal-ai-community/genmedia-cli/search?l=go-template)
- [Shell1.7%](https://github.com/fal-ai-community/genmedia-cli/search?l=shell)
- [PowerShell0.9%](https://github.com/fal-ai-community/genmedia-cli/search?l=powershell)

## Footer

[GitHub Homepage](https://github.com/)
© 2026 GitHub, Inc.


### Footer navigation

- [Terms](https://docs.github.com/site-policy/github-terms/github-terms-of-service)
- [Privacy](https://docs.github.com/site-policy/privacy-policies/github-privacy-statement)
- [Security](https://github.com/security)
- [Status](https://www.githubstatus.com/)
- [Community](https://github.community/)
- [Docs](https://docs.github.com/)
- [Contact](https://support.github.com/?tags=dotcom-footer)
- Manage cookies

- Do not share my personal information


You can’t perform that action at this time.