A Local Model Server Interface written in Go for managing and interacting with LLM model servers. This was initially built as a challenge for myself to code a useful tool in Go during a 6-hour flight with limited internet access (Chang Min).
golms is a CLI tool that provides a unified interface for managing and chatting with local LLM models across different model servers. It currently supports:
- MLX LM - Apple Silicon optimized model server
- Ollama - Cross-platform model server (WIP)
- π List available LLMs and model servers
- π Connect to model servers and chat with LLMs
- π― Automatic model server discovery and management
- π¬ Interactive chat interface with styled TUI
- π¨ Beautiful terminal UI with color-coded messages and status indicators
- π Support for multiple model server backends
Make sure you have the following installed:
- Go (1.25.1 or later)
- Model Server (at least one of the supported servers):
- LLM Models downloaded in
~/golms/<model_server>/directories- For example:
~/golms/mlx_lm/or~/golms/ollama/
- For example:
go install github.com/changminbark/golms@latestThis will install the latest version to $GOPATH/bin. Make sure $GOPATH/bin is in your $PATH.
# Clone the repository
git clone https://github.com/changminbark/golms.git
cd golms
# Build the binary
make build
# Or install to $GOPATH/bin
make installgo buildUses dependencies from ~/go/pkg/mod/
go build -mod=vendorUses dependencies from ./vendor/
golms listThis will show all available LLMs organized by model server and list all installed model servers.
golms serversShows all model servers that golms supports.
golms connectThis will:
- Prompt you to select a model server
- Show available LLMs for that server
- Start the model server (if not already running)
- Connect you to an interactive chat session
golms/
βββ cmd/
β βββ root.go # CLI commands and handlers
βββ pkg/
β βββ client/ # Client implementations for model servers
β β βββ client.go
β β βββ mlx_lm.go
β β βββ ollama.go
β βββ constants/ # Constants and configurations
β β βββ model_server.go
β βββ discovery/ # Model and server discovery
β β βββ discovery.go
β βββ server/ # Model server management
β β βββ manager.go
β β βββ mlx_lm.go
β β βββ ollama.go
β βββ ui/ # Terminal UI styles and formatting
β β βββ styles.go
β βββ utils/ # Utility functions
β βββ clean.go
β βββ clean_test.go
βββ main.go # Application entry point
βββ go.mod
βββ go.sum
βββ Makefile
βββ README.md
# Build the binary
make build
# Build with vendor dependencies
make build-vendor# Run all tests
make test
# Run tests with coverage
make test-coverage# Format code
make fmt
# Run go vet
make vet
# Run all checks (fmt, vet, test)
make check# Remove binary and clean build cache
make clean| Command | Description |
|---|---|
golms |
Show usage information |
golms list |
List all available LLMs and model servers |
golms servers |
List all supported model servers |
golms connect |
Connect to a model server and start chatting with an LLM |
Models should be placed in the following directory structure:
~/golms/
βββ mlx_lm/
β βββ model-1/
β βββ model-2/
βββ ollama/
βββ model-3/
βββ model-4/
Each model directory should contain the necessary model weights and configuration files required by the respective model server.
See LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.