CLI
Command-line interface for Gerbil.
Installation
One-off — no install required:
npx @tryhamster/gerbil "Your prompt here"Global install — use gerbil directly:
npm install -g @tryhamster/gerbilgerbil (assumes global install). Use npx @tryhamster/gerbil if not installed.Generate Text
The default command generates text from a prompt:
# Basic usagegerbil "Write a haiku about coding"
# With optionsgerbil "Explain recursion" --model qwen3-0.6b --max-tokens 200
# With thinking modegerbil "What is 17 × 23?" --thinking
# Stream outputgerbil "Tell me a story" --stream
# Output as JSONgerbil "Extract the name" --jsonOptions
| Option | Description | Default |
|---|---|---|
-m, --model | Model to use | qwen3-0.6b |
-n, --max-tokens | Maximum tokens | 256 |
-t, --temperature | Sampling temperature | 0.7 |
-s, --system | System prompt | - |
--thinking | Enable thinking mode | false |
--stream | Stream output | false |
--json | Output as JSON | false |
REPL (Interactive Mode)
Launch the full interactive REPL with model management, chat, skills, and more:
# Launch REPLgerbil repl
# Or justgerbilSee the REPL documentation for full details.
REPL View Shortcuts
Jump directly to any REPL view:
gerbil chat # Chat viewgerbil skills # Skills viewgerbil tools # Tools viewgerbil model # Model viewgerbil integrate # Frameworks viewgerbil benchmark # Benchmark viewgerbil info # Info viewgerbil serve # Serve viewAll REPL features are available—press Esc to access the main menu.
Interactive Chat
Opens the REPL directly in chat view:
# Start chat (opens REPL in chat view)gerbil chat
# With optionsgerbil chat --model qwen3-0.6b --thinkinggerbil chat --system "You are a pirate"
# Agent mode with tool callinggerbil chat --agentText-to-Speech
Generate speech with Kokoro or Supertonic:
# Speak text with default voicegerbil speak "Hello world"
# Specify voice and speedgerbil speak --voice bf_emma --speed 1.2 "Cheerio!"
# Save to file instead of playinggerbil speak --output hello.wav "Hello world"
# Use Supertonic modelgerbil speak --model supertonic-66m --voice F1 "Hello"Speech-to-Text
Transcribe audio files with Whisper:
# Transcribe audio filegerbil transcribe recording.wav
# With timestampsgerbil transcribe recording.wav --timestamps
# Save to filegerbil transcribe recording.wav --output transcript.txt
# Use specific modelgerbil transcribe recording.wav --model whisper-base.en
# List available modelsgerbil transcribe --list-modelsVoice Chat
Complete voice conversation loop (STT → LLM → TTS):
# Voice chat from audio filegerbil voice question.wav
# Customize models and voicegerbil voice question.wav --model qwen3-1.7b --voice bf_emma
# With custom system promptgerbil voice question.wav --system "You are a pirate!"
# Enable thinking modegerbil voice question.wav --thinkingThis transcribes your audio (Whisper), generates a response (LLM), and speaks it back (Kokoro TTS).
Built-in Skills
# Generate commit message from staged changesgerbil commitgerbil commit --type conventional
# Summarize a filegerbil summarize README.mdgerbil summarize doc.pdf --length short
# Explain codegerbil explain src/index.tsgerbil explain src/utils.ts --level beginner
# Code reviewgerbil review src/index.tsgerbil review src/ --focus security,performanceModel Management
# List available modelsgerbil models
# List installed modelsgerbil models --installed
# Search modelsgerbil models --search "code"
# Download a modelgerbil pull qwen3-0.6bgerbil pull hf:microsoft/Phi-3-mini
# Remove a modelgerbil rm smollm2-135mServer Mode
# Opens REPL Serve view (interactive)gerbil serve
# CLI mode (non-interactive)gerbil serve --http --port 3000 --model qwen3-0.6bgerbil serve --mcp --model qwen3-0.6bSystem Info
# Opens REPL Info view (interactive)gerbil info
# CLI mode (text output)gerbil info --cligerbil info --cli --model qwen3-0.6b
# Session statsgerbil stats
# Benchmark a modelgerbil benchgerbil bench --model qwen3-0.6bCache Management
# Show cache infogerbil cache
# Show cache statsgerbil cache stats
# Clean old cache entriesgerbil cache cleangerbil cache clean --older-than 7d
# Clear all cachegerbil cache clearPipes & Redirection
Gerbil works great with Unix pipes:
# Pipe inputecho "Explain this" | gerbilcat README.md | gerbil "Summarize this"
# Use with gitgit diff --staged | gerbil "Write a commit message"
# Chain commandscat error.log | gerbil "Explain this error" | tee explanation.txtConfiguration
# View configgerbil config
# Set defaultsgerbil config set model qwen3-0.6bgerbil config set device gpugerbil config set cache.enabled true
# Get a valuegerbil config get model
# Reset to defaultsgerbil config resetUpdates
Gerbil checks for updates automatically but never installs without your permission.
REPL
Version shown in header. When update available, press u to update:
Gerbil v1.0.0 · Update v1.0.1 → Press u
# Press 'u'⬇ Updating...✅ Updated! Restart to use v1.0.1CLI
After commands, shows update notification if available:
$ gerbil "Hello"Hello! How can I help you today?
💡 Update available: v1.0.0 → v1.0.1 Run 'gerbil update' to installManual Update Command
Dedicated command with clear progress feedback:
$ gerbil update✔ Checking for updates...ℹ Update available: v1.0.0 → v1.0.1⠋ Installing v1.0.1...✔ ✅ Updated to v1.0.1
Restart your terminal or run 'gerbil' to use the new version.Why no auto-update?
- ✓ User control — never downloads without permission
- ✓ Non-disruptive — background check doesn't block workflow
- ✓ CI/CD safe — won't break automation with surprise updates
- ✓ Bandwidth friendly — only downloads when approved