Interactive, safe "rename" for Ollama models. Under the hood it copies a model to a new name, then (optionally) deletes the original.
- Alpha software: use at your own risk.
- Fuzzy-pick a model, get a clean suggested name, and copy it safely.
- Copy + optional delete (i.e., move) with running-model guard and
--yesauto-confirm. - New subcommands:
list(pretty or--output json) anddoctor(health/version check). - JSON output for scripting via
--output json; CLI fallback via--use-cli-fallback. - Uses Ollama APIs (
/api/copy,/api/delete,/api/tags,/api/ps,/api/version) with CLI fallbacks. - Windows & Linux.
- Ollama installed.
- Rust toolchain (for building from source).
Double-click install.bat or run:
.\install.batIt builds the binary and places it in %USERPROFILE%\bin (adds to PATH if needed).
cargo build --release
install -Dm755 target/release/ollama-rename ~/.local/bin/ollama-renameInteractive (recommended):
# Launch the guided picker (safe by default)
ollama-rename
# Tip: Press Esc to cancel at any prompt.Non-interactive rename (copy/move):
# copy
ollama-rename rename --from "hf.co/NikolayKozloff/NextCoder-14B-Q4_K_M-GGUF:Q4_K_M" --to "NextCoder"
# move (copy + delete original)
ollama-rename rename --from "qwen3-coder:latest" --to "qwen3-coder" --delete-original
# replace destination if it exists
ollama-rename rename --from "gpt-oss:latest" --to "gpt-oss" --overwrite
# JSON report for scripts
ollama-rename rename --from "gpt-oss:latest" --to "gpt-oss" --output jsonOther commands:
# list models (marking running ones)
ollama-rename list
ollama-rename list --running-only --output json
# quick health/version check
ollama-rename doctorUseful flags: --host <URL>, --use-cli-fallback, --force (delete even if loaded), --dry-run, --yes (auto-confirm), --output json.
- Format:
cargo fmt - Test (with mocks):
cargo test - Release build:
cargo build --release
- The Ollama CLI path can be overridden with
OLLAMA_BIN(helps when Ollama is installed in a custom location or a path with spaces).