falgen
Open source AI media generation from the terminal.
Install · Usage · Features · Commands · Contributing
Generate images, videos, audio, and more - just describe what you want. falgen picks the best model using Artificial Analysis quality rankings, handles the queue, and renders results inline in your terminal.
Install
Recommended - install as an isolated tool (won't pollute your Python environment):
pipx install falgen # via pipx
uv tool install falgen # via uv
Quick install - auto-detects the best method:
curl -fsSL https://raw.githubusercontent.com/ilkerzg/falgen/main/install.sh | bash
Other options:
pip install falgen # standard pip
npx falgen # run without installing (via npm)
Requires Python 3.11+.
Auth
# Option 1: falgen prompts for your key on first launch
falgen
# Option 2: environment variable
export FALGEN_KEY="your-key-here"
falgen
Get your API key at fal.ai/dashboard/keys. FAL_KEY is also supported. Use /logout to remove a saved key.
Usage
falgen # start a new session
falgen -s last # resume last session
falgen -m openai/gpt-5.4 # use a specific LLM
Then just type what you want:
> a cyberpunk city at sunset, neon reflections on wet streets
> generate a 10s video of ocean waves crashing
> create lofi hip-hop background music, chill vibes
> upscale my photo to 4K
Features
Smart model selection - Ranks models by quality using Artificial Analysis arena ELO ratings. Supports style-specific rankings (portraits, anime, photorealistic, etc.) so you always get the best model for your task.
The agent asks which model to use, ranked by Artificial Analysis ELO ratings, and proceeds based on your choice.
AI tools - The LLM agent has access to:
| Tool | Description |
|---|---|
best_models |
Quality rankings from Artificial Analysis arena |
search_models |
Search fal.ai's 600+ model catalog |
model_info |
Input schema, parameters, valid values |
generate |
Submit jobs, poll status, stream results |
ask_user |
Interactive choice picker for decisions |
get_skill |
Domain knowledge (cinematography, prompting, etc.) |
get_pricing |
Cost per image/minute/character |
Tool calls in action - the agent searches models, checks schemas, and submits a generation job with a live loading skeleton.
Generated image rendered inline via chafa. Click to open in your system viewer.
Terminal UI - Built with Textual. Inline media preview via chafa. Five themes: Tokyo Night, Catppuccin, Nord, Gruvbox, Everforest.
Slash commands with autocomplete for quick access to all features.
Input - Multi-line input (Shift+Enter), image paste from clipboard (Ctrl+V), local file path detection and upload, fuzzy-filtered choice menus.
Session management - SQLite persistence, resume previous sessions (/resume), media URLs tracked per session.
Context management - Automatic conversation summarization when approaching context limits.
Commands
| Command | Description |
|---|---|
/model |
Switch LLM |
/theme |
Switch color theme |
/search |
Search fal.ai models |
/info |
Model schema and details |
/price |
Check pricing |
/default |
Set default models per category |
/resume |
Resume a previous session |
/compact |
Toggle compact mode (hide tool calls) |
/usage |
Usage and cost |
/login |
Set API key |
/logout |
Remove API key |
/clear |
Clear conversation |
Keyboard: Shift+Enter new line · Esc cancel generation · Ctrl+L clear · Ctrl+V paste image · Ctrl+C quit
Preview Dependencies
- chafa - inline image/video/audio previews
- ffmpeg - video thumbnails and audio waveforms
- Optional: pngpaste - clipboard image paste on macOS
The app runs without these, but previews will be unavailable.
Contributing
Open source side project. Contributions, issues, and ideas are welcome.
git clone https://github.com/ilkerzg/falgen
cd falgen
pip install -e .
falgen
Acknowledgements
Model quality rankings powered by Artificial Analysis - independent benchmarks through crowd-sourced blind comparisons.
License
MIT
Metadata
Release files for falgen 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| falgen-0.1.1.tar.gz | 261.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| falgen-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 530.1 kB
Release files / falgen-0.1.1.tar.gz
| Download URL | falgen-0.1.1.tar.gz |
|---|---|
| Size | 261.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
442165baa35383f570f1e64c9bc2d2028d80b32ab390afdf22b8ff2a5fa966a1
|
|
BLAKE2b-256 checksum How to use checksums |
e21fcea5a5f6476a0077d13b79b54f94f69d4bbd732dc23f47848d7c06587761
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / falgen-0.1.1-py3-none-any.whl
| Download URL | falgen-0.1.1-py3-none-any.whl |
|---|---|
| Size | 268.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6fee19f17bf6820f147527825cd4930e92527814ce48c4d00e4f400efbd1cc9f
|
|
BLAKE2b-256 checksum How to use checksums |
f827400898fd3b728a48988f1a7a16348ef526246b2121edeb2ceb019cbe9a33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for falgen 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.