How sammcj/gollama works
Gollama is a terminal application for managing Ollama models. Users start in the TUI, browse and select models, then inspect, edit, delete, copy, run, unload, or push them; command-line options also support listing, searching, and editing. A separate vRAM workflow estimates model memory and context/quantisation fit. The graph preserves documented capabilities even where their implementation was not sampled. Connections to Ollama and the registry follow the README or visible API calls; unsampled feature internals are represented at their source-file level.
Main entry points: app_model.go TUI state and actions · main.go CLI and startup · vramestimator.go VRAM estimator · styles.go Theme rendering
Components 17
Entry and configuration
- CLI and startup
main.go - Application config
config/config.go - Theme files
config/theme.go - Application logging
logging/logging.go - Path utilities
utils/utils.go
Terminal interface
- TUI state and actions
app_model.go - Model list rows
item_delegate.go - Running models view
top_view.go - Modelfile comparison
compare.go - Theme rendering
styles/styles.go
Model operations
- Model management
operations.go - Model records
model.go
VRAM analysis
- VRAM estimator
vramestimator/vramestimator.go - CUDA memory probe
vramestimator/cuda/cuda.go
Other components
- User
- Ollama API
- Ollama registry
Connections 22
- User → CLI and startup: starts
README.md - CLI and startup → Application config: loads
main.go - CLI and startup → TUI state and actions: runs TUI
main.go - CLI and startup → VRAM estimator: estimates VRAM
main.go - CLI and startup → Ollama API: requests model data
- TUI state and actions → Model list rows: renders rows
item_delegate.go - TUI state and actions → Running models view: shows running models
README.md - TUI state and actions → Modelfile comparison: compares Modelfiles
compare.go - TUI state and actions → Model management: dispatches model actions
README.md - TUI state and actions → Ollama API: runs model actions
README.md - Model management → Ollama API: calls model API
operations.go - Running models view → Ollama API: queries running models
top_view.go - Modelfile comparison → Ollama API: fetches model details
compare.go - Modelfile comparison → Ollama registry: fetches registry files
compare.go - TUI state and actions → Theme rendering: formats interface
app_model.go - Model list rows → Theme rendering: styles rows
item_delegate.go - Theme rendering → Theme files: reads theme settings
- Application config → Path utilities: gets config paths
config/config.go - CLI and startup → Application logging: initializes logging
main.go - VRAM estimator → Ollama API: fetches model info
vramestimator/vramestimator.go - VRAM estimator → CUDA memory probe: checks CUDA memory
- VRAM estimator → Theme rendering: formats estimates
vramestimator/vramestimator.go