[GH-ISSUE #11844] cli model name autocompletion or list models with a command #33621

Closed
opened 2026-04-22 16:29:22 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @Sohaib90 on GitHub (Aug 10, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11844

I’d like to suggest a usability improvement for the Ollama CLI: adding tab-completion for model names in commands like rm, stop, show, and run. The idea is that when a user types one of these commands and presses Tab, Ollama would list available model names. If someone starts typing a model name and hits Tab, it would autocomplete based on what’s available. As of now, on my MacOS I cant seem to do that, and it would be very useful not to always list the models to do that. Of course this can also be done with complicated cli commands with grep and filtering but I believe it can be simpler than that.

Why is this important?

  • Makes the CLI more user-friendly, especially for users managing multiple models.
  • Reduces friction and speeds up command execution.
  • Improves discoverability of local models.

How it could work:

  • Typing ollama rm [Tab] would show a list of all models.
  • Typing ollama rm llama[Tab] would autocomplete to llama2 (if that model is available).
  • This would work for any command that expects a model name as an argument.

How will it be tested?

  • Manual testing of tab completion for each relevant command.
  • Unit/integration tests to ensure the correct model names are suggested and autocompleted.

Would you be open to a PR for this feature?
Is there a preferred way to implement shell completion (e.g., Bash, Zsh, Fish)?
Are there other commands that would benefit from this that I should include?

Thanks for considering! Looking forward to a response

Originally created by @Sohaib90 on GitHub (Aug 10, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11844 I’d like to suggest a usability improvement for the Ollama CLI: adding tab-completion for model names in commands like rm, stop, show, and run. The idea is that when a user types one of these commands and presses Tab, Ollama would list available model names. If someone starts typing a model name and hits Tab, it would autocomplete based on what’s available. As of now, on my MacOS I cant seem to do that, and it would be very useful not to always list the models to do that. Of course this can also be done with complicated cli commands with grep and filtering but I believe it can be simpler than that. Why is this important? - Makes the CLI more user-friendly, especially for users managing multiple models. - Reduces friction and speeds up command execution. - Improves discoverability of local models. How it could work: - Typing ollama rm [Tab] would show a list of all models. - Typing ollama rm llama[Tab] would autocomplete to llama2 (if that model is available). - This would work for any command that expects a model name as an argument. How will it be tested? - Manual testing of tab completion for each relevant command. - Unit/integration tests to ensure the correct model names are suggested and autocompleted. Would you be open to a PR for this feature? Is there a preferred way to implement shell completion (e.g., Bash, Zsh, Fish)? Are there other commands that would benefit from this that I should include? Thanks for considering! Looking forward to a response
GiteaMirror added the feature request label 2026-04-22 16:29:22 -05:00
Author
Owner
<!-- gh-comment-id:3172646587 --> @rick-github commented on GitHub (Aug 10, 2025): #4444 https://github.com/ollama/ollama/issues/8541#issuecomment-2802836461 #925 #4690 #11537 #11832
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#33621