google-gemini / google-gemini/gemini-cli
Feature Request: Add a command to list available models in machine-readable format (e.g., --list-models --json)
- Dominant language
- TypeScript
- Stars
- 107k
- Forks
- 14.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 45
Description
### What would you like to be added?
I would like to request a new command or flag (for example: gemini models --output-format json or gemini --list-models) that outputs a list of all currently available Gemini models in a structured, machine-readable format like JSON.
The output should ideally include:
- Model ID (to be used with the -m flag)
- Display Name
- Short Description
- Context Limits (input/output token limits)
### Why is this needed?
This feature is essential for developers building integrations or orchestrators around the Gemini CLI
Currently, third-party applications have to hardcode model names (e.g., gemini-1.5-pro, gemini-2.0-flash), which is problematic because:
1. New models are released frequently, making hardcoded lists quickly outdated.
2. Model availability varies based on the user's account, subscription plan, or region.
3. The existing interactive /model command is great for human users in a REPL but cannot be programmatically parsed by external tools.
Having a machine-readable way to discover models will allow apps to dynamically populate selection menus and ensure users always have access to the latest models available to them.
### Additional context
Contributor guide
Assessment
This issue has not been assessed yet.