[PR #7281] added formatting to ollama ls #38245

Open
opened 2026-04-22 22:55:10 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/7281
Author: @robbiemu
Created: 10/20/2024
Status: 🔄 Open

Base: mainHead: clean-list


📝 Commits (4)

📊 Changes

1 file changed (+90 additions, -5 deletions)

View changed files

📝 cmd/cmd.go (+90 -5)

📄 Description

This groups output by model on disk, and does not pollute the filesize in the listing when the manifests point to the same model.

./ollama ls
NAME                                        ID              SIZE      MODIFIED
qwen2.5:32b-instruct-q4_K_M                 9f13ba1299af    19 GB     9 hours ago
bge-m3:latest                               790764642607    1.2 GB    3 weeks ago
llama3.2:3b-instruct-q8_0                   e410b836fe61    3.4 GB    3 weeks ago
reader-lm:1.5b-q8_0                         39ec9eda0492    1.6 GB    4 weeks ago
 └── reader-lm:1.5b-q8_0_defaults           05fe7cfa3bea    --        3 days ago
gemma2:27b-instruct-q6_K                    73a0cbed4b12    22 GB     3 months ago

Caveats

  • it seems the "basemodel" is not distinguished in the data except by modifiedBy -- which perhaps could be updated by the user without deleting or updating manifests they created (these descendent manifests are where you use "/set PARAMETER ..." and "/save ...").
  • I had to explicitly turn off AutoWrapText because it was wrapping in the column at the space around the prefixes (like "└── "), and setting min column width just for this model does not effect this wrapping behavior.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/7281 **Author:** [@robbiemu](https://github.com/robbiemu) **Created:** 10/20/2024 **Status:** 🔄 Open **Base:** `main` ← **Head:** `clean-list` --- ### 📝 Commits (4) - [`22146e9`](https://github.com/ollama/ollama/commit/22146e953e2c5e551edcbadfdd94d8dc8b733bb5) added formatting to ollama ls - [`a535dd8`](https://github.com/ollama/ollama/commit/a535dd8b216de6d21a1dc4c8af2050c969b6ed8f) Merge branch 'ollama:main' into clean-list - [`5c0df45`](https://github.com/ollama/ollama/commit/5c0df45aa3d3fb450a80cb388a1bc3655a142c6e) Clean list new (#2) - [`6815e5d`](https://github.com/ollama/ollama/commit/6815e5dfd061bee40f02a25a30cb5421c47fc080) errata ### 📊 Changes **1 file changed** (+90 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+90 -5) </details> ### 📄 Description This groups output by model on disk, and does not pollute the filesize in the listing when the manifests point to the same model. ``` ./ollama ls NAME ID SIZE MODIFIED qwen2.5:32b-instruct-q4_K_M 9f13ba1299af 19 GB 9 hours ago bge-m3:latest 790764642607 1.2 GB 3 weeks ago llama3.2:3b-instruct-q8_0 e410b836fe61 3.4 GB 3 weeks ago reader-lm:1.5b-q8_0 39ec9eda0492 1.6 GB 4 weeks ago └── reader-lm:1.5b-q8_0_defaults 05fe7cfa3bea -- 3 days ago gemma2:27b-instruct-q6_K 73a0cbed4b12 22 GB 3 months ago ``` Caveats - it seems the "basemodel" is not distinguished in the data except by modifiedBy -- which perhaps could be updated by the user without deleting or updating manifests they created (these descendent manifests are where you use "/set PARAMETER ..." and "/save ..."). - I had to explicitly turn off AutoWrapText because it was wrapping in the column at the space around the prefixes (like "└── "), and setting min column width just for this model does not effect this wrapping behavior. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-22 22:55:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#38245